Re: Variable substitution in psql backtick expansion

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, Daniel Verite <daniel@manitou-mail.org>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-04-02T16:29:09Z
Lists: pgsql-hackers
Hello Corey,

> I'm anxious to help with these patches, but they seem a bit of a moving
> target. Happy to jump in and review as soon as we've settled on what should
> be done.

The "v3" I sent basically adds both client & server version numbers in 
client-side variables, basically same code as suggested by Pavel for the 
server version, and some documentation.

The questions are:

  - which version should be provided (10.0 100000 ...)

  - how should they be named?

    In v3 there is VERSION{,_NAME,_NUM} for client and
    SERVER_VERSION_{NUM,NAME} or SVERSION_NUM suggested
    by Pavel for server.

  - how desirable/useful is it to have this in 10?

    Despite that this was not submitted in the relevant CF...
    I created an entry in the July one, but this is for 11.

-- 
Fabien.


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.