Re: [HACKERS] Variable substitution in psql backtick expansion

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: [HACKERS] Variable substitution in psql backtick expansion
Дата
Msg-id alpine.DEB.2.20.1709061837520.17848@lancre
обсуждение исходный текст
Ответ на Re: [HACKERS] Variable substitution in psql backtick expansion  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Variable substitution in psql backtick expansion  (Gerdan Santos <gerdan@gmail.com>)
Список pgsql-hackers
>> Seeing it as is, it calls for having "SERVER_VERSION" as well, but I'm not
>> sure of the better way to get it. I tried with "SELECT VERSION() AS
>> SERVER_VERSION \gset" but varnames are lowerized.
>
> The problem there is you can't get version() without an extra round trip
> to the server --- and an extra logged query --- which people are going to
> complain about.

Here is a PoC that does it through a guc, just like "server_version" (the 
short version) is transmitted, with a fallback if it is not there.

Whether it is worth it is debatable, but I like the symmetry of having
the same informations accessible the same way for client and server sides.

-- 
Fabien.
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump