Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL
Дата
Msg-id 15919.1493130489@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL
Список pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> On Tue, Apr 25, 2017 at 2:57 PM, Andres Freund <andres@anarazel.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] PG 10 release notes
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Link to commits in PG 10 release notes