Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a5d489c

Browse files
committed
Make numeric form of PG version number readily available in Makefiles.
Expose PG_VERSION_NUM (e.g., "90600") as a Make variable; but for consistency with the other Make variables holding similar info, call the variable just VERSION_NUM not PG_VERSION_NUM. There was some discussion of making this value available as a pg_config value as well. However, that would entail substantially more work than this two-line patch. Given that there was not exactly universal consensus that we need this at all, let's just do a minimal amount of work for now. Michael Paquier, reviewed by Pavel Stehule
1 parent ac50f84 commit a5d489c

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

configure

+2
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ ac_includes_default="\
627627

628628
ac_subst_vars='LTLIBOBJS
629629
vpath_build
630+
PG_VERSION_NUM
630631
PROVE
631632
OSX
632633
XSLTPROC
@@ -15521,6 +15522,7 @@ _ACEOF
1552115522

1552215523

1552315524

15525+
1552415526
# Begin output steps
1552515527

1552615528
{ $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5

configure.in

+1
Original file line numberDiff line numberDiff line change
@@ -2136,6 +2136,7 @@ AC_DEFINE_UNQUOTED(PG_VERSION_STR,
21362136
tr '.' ' ' |
21372137
$AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"]
21382138
AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version as a number])
2139+
AC_SUBST(PG_VERSION_NUM)
21392140

21402141

21412142
# Begin output steps

src/Makefile.global.in

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ all:
3838
# PostgreSQL version number
3939
VERSION = @PACKAGE_VERSION@
4040
MAJORVERSION = @PG_MAJORVERSION@
41+
VERSION_NUM = @PG_VERSION_NUM@
4142

4243
# Support for VPATH builds
4344
# (PGXS VPATH support is handled separately in pgxs.mk)

0 commit comments

Comments
 (0)