Re: Variable substitution in psql backtick expansion
Corey Huinker <corey.huinker@gmail.com>
From: Corey Huinker <corey.huinker@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2017-03-31T11:50:44Z
Lists: pgsql-hackers
On Thu, Mar 30, 2017 at 1:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > single-quoted according to Unix shell conventions. (So the > processing would be a bit different from what it is for the > same notation in SQL contexts.) > +1 Having been bit by format '%L' prepending an 'E' to any string that happens to have a backslash in it, I'm in favor of this difference. Any reason we wouldn't do :"VARIABLE" as well? People might expect it given its use elsewhere, and it would make possible things like SELECT '$HOME/lamentable application name dir/bin/myprog' as myprog \gset `:"myprog" arg1 arg2` both for expanding $HOME and keeping the lamentable dir path as one arg.
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