Re: Variable substitution in psql backtick expansion
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL Developers <pgsql-hackers@postgreSQL.org>
Date: 2017-04-03T22:19:39Z
Lists: pgsql-hackers
> \set d sqrt(1 + random(1000) * 17) > \echo :d > sqrt(1+random(1000)*17) > > I assume we want to keep that pre-existing behavior of \set in > psql, Ok. So no interpreted expression ever in psql's \set for backward compatibility. > that is, making a copy of that string and associating a name to it, > whereas I guess pgbench computes a value from it and stores that value. Actually it stores the parsed tree, ready to be executed. -- 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