Re: Variable substitution in psql backtick expansion

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Daniel Verite <daniel(at)manitou-mail(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Variable substitution in psql backtick expansion
Date: 2017-04-02 11:13:47
Message-ID: alpine.DEB.2.20.1704021303300.4632@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Pavel,

>> \echo :VERSION
>> PostgreSQL 10devel on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
>> 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609, 64-bit
>>
>> Probably some :VERSION_NUM would make some sense. See attached PoC patch.
>> Would it make sense?
>
> Maybe better name for you CLIENT_VERSION_NUM

If it was starting from nothing I would tend to agree with you, but there
is already an existing :VERSION variable, so it seemed logical to keep on
and create variants with the same prefix.

> Can be SERVER_VERSION_NUM taken from connection info?

Probably it could. It seems a little less straightforward than defining a
client-side string at compile time. The information is displayed when the
connection is established, so the information is there somewhere.

psql (10devel, server 9.6.2)

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-04-02 11:19:09 Re: Performance improvement for joins where outer side is unique
Previous Message Pavel Stehule 2017-04-02 10:13:19 Re: Variable substitution in psql backtick expansion