pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Remove win32ver.rc from version_stamp.pl
Date: Tue, 10 Mar 2020 11:07:00 -0400
Message-ID: <24807.1583852820@sss.pgh.pa.us> (raw)
In-Reply-To: <19048.1583851745@sss.pgh.pa.us>
References: <E1jBc1e-0006Yd-MY@gemulon.postgresql.org>
	<50ecb345-4dc5-1f7d-64ca-7018195fcc8d@2ndquadrant.com>
	<19048.1583851745@sss.pgh.pa.us>

I wrote:
> I'd suggest reverting the change in how PG_VERSION_NUM is computed
> in configure.in --- that was certainly not necessary to the patch,
> and evidently you're falling foul of some weird behavior around
> nesting double-quotes and backquotes.

Actually, you can just get rid of the nesting, because there's no
need to be picky about what white-space gets fed to awk.  The
attached seems to be enough to fix it (tested on gaur).

			regards, tom lane

Attachments:

  [text/x-diff] fix-version-num.patch (1.0K, ../24807.1583852820@sss.pgh.pa.us/2-fix-version-num.patch)
  download | inline diff:
diff --git a/configure b/configure
index d6d3f26..1a0aca9 100755
--- a/configure
+++ b/configure
@@ -18887,7 +18887,7 @@ _ACEOF
 
 # Supply a numeric version string for use by 3rd party add-ons
 # awk -F is a regex on some platforms, and not on others, so make "." a tab
-PG_VERSION_NUM="`echo "$PG_MAJORVERSION	$PG_MINORVERSION" |
+PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
 $AWK '{printf "%d%04d", $1, $2}'`"
 
 cat >>confdefs.h <<_ACEOF
diff --git a/configure.in b/configure.in
index 78902fb..b27708e 100644
--- a/configure.in
+++ b/configure.in
@@ -2322,7 +2322,7 @@ AC_DEFINE_UNQUOTED(PG_VERSION_STR,
 
 # Supply a numeric version string for use by 3rd party add-ons
 # awk -F is a regex on some platforms, and not on others, so make "." a tab
-[PG_VERSION_NUM="`echo "$PG_MAJORVERSION	$PG_MINORVERSION" |
+[PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
 $AWK '{printf "%d%04d", $1, $2}'`"]
 AC_DEFINE_UNQUOTED(PG_VERSION_NUM, $PG_VERSION_NUM, [PostgreSQL version as a number])
 AC_SUBST(PG_VERSION_NUM)

view thread (4+ messages)

Message-ID: <24807.1583852820@sss.pgh.pa.us>
Permalink:  ../24807.1583852820@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24807.1583852820@sss.pgh.pa.us

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove win32ver.rc from version_stamp.pl
  In-Reply-To: <24807.1583852820@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox