Re: Variable substitution in psql backtick expansion

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>, Pavel Stehule <pavel.stehule@gmail.com>, Daniel Verite <daniel@manitou-mail.org>, PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-04-02T18:54:02Z
Lists: pgsql-hackers
Corey Huinker <corey.huinker@gmail.com> writes:
> Looking at #define STRINGIFY(), I got curious where else STRINGIFY was used:
> Without digging too deep, it seems like the redefinition wouldn't be
> harmful, but it might make sense to not use the name STRINGIFY() if only to
> avoid confusion with Solution.pm.

More to the point, we already have that.  See c.h:

#define CppAsString(identifier) #identifier
#define CppAsString2(x)			CppAsString(x)

			regards, tom lane


Commits

  1. Add psql variables showing server version and psql version.

  2. Reformat psql's --help=variables output.

  3. Remove reinvention of stringify macro.

  4. Allow psql variable substitution to occur in backtick command strings.