Re: Variable substitution in psql backtick expansion
Corey Huinker <corey.huinker@gmail.com>
From: Corey Huinker <corey.huinker@gmail.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, Greg Stark <stark@mit.edu>, Daniel Verite <daniel@manitou-mail.org>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-04-11T13:50:34Z
Lists: pgsql-hackers
On Tue, Apr 11, 2017 at 2:56 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote: > > Hello Pavel, > > I think so some local expression evaluation could be - but it should not be >> placed in \if statement >> > > Why? > > \expr issupported :VERSION_NUM >= 10000 >> > > Hmmm. Although I do not buy this, it could work as a replacement for \set > which it seems cannot be upgraded because some people may rely on it to > just store whatever comes after it in a variable. > I have no strong opinion on how expressive expressions should be, but having a separate \expr (or \setexpr, etc) gives us a green field to develop them.
Commits
-
Add psql variables showing server version and psql version.
- a6c678f018d3 10.0 landed
- 9ae9d8c1549c 11.0 landed
-
Reformat psql's --help=variables output.
- 3955c8c4eda2 11.0 landed
-
Remove reinvention of stringify macro.
- cd6baed78150 10.0 landed
-
Allow psql variable substitution to occur in backtick command strings.
- f833c847b8fa 10.0 landed