Re: Variable substitution in psql backtick expansion
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Corey Huinker <corey.huinker@gmail.com>,
Pavel Stehule <pavel.stehule@gmail.com>,
Daniel Verite <daniel@manitou-mail.org>,
PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-04-03T07:43:39Z
Lists: pgsql-hackers
Hello Tom,
> about version numbers [...] Of course, there are probably other ways to
> do that, but my point is that you haven't made a case why we need to put
> this in now rather than later.
Indeed, I have not. What about having the ability to test for minor
versions?
\if false
-- pre 10.0
\q
\endif
SELECT :VERSION_NUM < 100002 AS minor_not_ok \gset
\if :minor_not_ok
\echo script requires at least pg 10.2
\q
\endif
Otherwise it will wait for next CF. Note that the patch is pretty minor
and straightforward, no need to spend much time on it.
--
Fabien.
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