summaryrefslogtreecommitdiff
path: root/libpq/version.h.in
blob: c704c627a4a4aabe824178e2b56c6982e25727c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* file      : libpq/version.h.in -*- C -*-
 * copyright : Copyright (c) 2016-2018 Code Synthesis Ltd
 * license   : PostgreSQL License; see accompanying COPYRIGHT file
 */

#ifndef PG_MAJORVERSION /* Note: using the version macro itself. */

/*
 * Note that staring PostgreSQL 10 the release version schema changed (see
 * build/bootstrap.build for details).
 */
#if $libpq.version.major$ < 10
# define PG_MAJORVERSION "$libpq.version.major$.$libpq.version.minor$"
#else
# error "change PG_MAJORVERSION macro definition"
# define PG_MAJORVERSION "$libpq.version.major$"
#endif

/*
 * Is valid for both old and new version schemes (see above).
 */
#define PG_VERSION_NUM (10000 * $libpq.version.major$ + \
                          100 * $libpq.version.minor$ + \
                                $libpq.version.patch$)

#endif /* PG_MAJORVERSION */