Re: [HACKERS] Variable substitution in psql backtick expansion - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] Variable substitution in psql backtick expansion
Date
Msg-id alpine.DEB.2.20.1711130703260.15385@lancre
Whole thread Raw
In response to Re: [HACKERS] Variable substitution in psql backtick expansion  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Hello Tom & Michaël,

>> I think this patch should be rejected.
> +1 for rejection [...]

The noes have it!

Note that the motivation was really symmetric completion:
 fabien=# \echo :VERSION_NAME 11devel fabien=# \echo :VERSION_NUM 110000 fabien=# \echo :VERSION PostgreSQL 11devel on
x86_64-pc-linux-gnu,compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609, 64-bit fabien=# \echo
:SERVER_VERSION_NAME10.1 fabien=# \echo :SERVER_VERSION_NUM 100001
 

But
 fabien=# \echo :SERVER_VERSION :SERVER_VERSION

To get it into a variable the work around is really:
 fabien=# SELECT version() AS "SERVER_VERSION" \gset fabien=# \echo :SERVER_VERSION PostgreSQL 10.1 on
x86_64-pc-linux-gnu,compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609, 64-bit
 

-- 
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 by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: [HACKERS] Proposal: Improve bitmap costing for lossy pages
Next
From: Amit Khandekar
Date:
Subject: Re: [HACKERS] Parallel Append implementation