Re: Patch - Tcl 8.6 version support for PostgreSQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>, Paresh More <paresh(dot)more(at)enterprisedb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch - Tcl 8.6 version support for PostgreSQL
Date: 2017-04-25 14:28:09
Message-ID: 15919.1493130489@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> On Tue, Apr 25, 2017 at 2:57 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>> Any chance of formulating these in a version agnostic way, instead of
>> copying the same stanza for every version? E.g. using a wildcard or
>> such...

> Using glob() would be enough for this purpose.

Not really, because glob() wouldn't enforce any preference over which
of multiple versions to pick. If anything, it would do exactly the
wrong thing, preferring an older tclsh version over a newer one.

But I agree with Andres' complaint that just duplicating the code isn't
the best way. The configure script has a loop that's basically like

for f in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
do
... break if $f is the right one
done

Seems to me that a similar coding pattern in the MSVC script is a
reasonable way to go.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2017-04-25 14:31:00 Re: Link to commits in PG 10 release notes
Previous Message Bruce Momjian 2017-04-25 14:15:12 Re: PG 10 release notes