pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Corey Huinker <corey.huinker@gmail.com>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Subject: Re: Variable substitution in psql backtick expansion
Date: Sat, 26 Aug 2017 11:08:56 -0400
Message-ID: <20786.1503760136@sss.pgh.pa.us> (raw )
In-Reply-To: <alpine.DEB.2.20.1708260747110.3627@lancre >
References: <bc15034d-b421-42ac-89b1-c3485fa1728b@manitou-mail.org >
<CAFj8pRDCfLLNfMyNAjDwgHXS7inThdqgCaSbfKpiYXkb6Mvmwg@mail.gmail.com >
<alpine.DEB.2.20.1704020917220.4632@lancre >
<CAFj8pRCVFp+68Tt29sZfn9tE28c2D7u_VzTcXrqjyCVBzAzRsA@mail.gmail.com >
<alpine.DEB.2.20.1704021303300.4632@lancre >
<CAFj8pRACH1M=egydH4dAAoo9rRVTkuYCaoyZQK2Yf4BTQuRM5w@mail.gmail.com >
<CADkLM=dzsbgJdP7KAJnbihxU1XFnWZgit9ye5cWnvkjZXyPbGw@mail.gmail.com >
<alpine.DEB.2.20.1704021805550.4632@lancre >
<CADkLM=c+hm2rc0tkKgC-ZgrLttHT2KkfppE+BC-=i-xj+7V-TQ@mail.gmail.com >
<3926.1491159242@sss.pgh.pa.us >
<alpine.DEB.2.20.1704022151080.9265@lancre >
<CAFj8pRDyaC+FaSxd92CLcuV+UFGhwY7NVVBhqFvxPkhvKNhyww@mail.gmail.com >
<alpine.DEB.2.20.1705211737030.6053@lancre >
<CA+TgmobT3rD6jaZMCs=PWH_khMu6Bb4TwX+r4tbTNA41hx32=w@mail.gmail.com >
<13303.1503698976@sss.pgh.pa.us >
<CA+TgmobXCcEM7uB8_g+tKfB-1gvEyp+Qmmre9bcXU9mgpmW38Q@mail.gmail.com >
<14596.1503701034@sss.pgh.pa.us >
<alpine.DEB.2.20.1708260747110.3627@lancre >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Fabien COELHO <coelho@cri.ensmp.fr> writes:
>> OK, but if human-friendly display is the use-case then it ought to
>> duplicate what psql itself would print in, eg, the startup message about
>> server version mismatch. The v4 patch does not, in particular it neglects
>> PQparameterStatus(pset.db, "server_version"). This would result in
>> printing, eg, "11.0" when the user would likely rather see "11devel".
> I understand that you would prefer VERSION_NAME to show something like
> "11devel, server 9.6.4"
No, that's not what I said. I'm just complaining that as the patch stands
it will set SERVER_NAME to "11.0", where I think it should say "11devel"
(as of today).
> In summary, my prefered option is to have:
> CLIENT_VERSION "PostgreSQL 11devel on ..."
> CLIENT_VERSION_NAME "11devel"
> CLIENT_VERSION_NUM 110000
I don't think we want to drop :VERSION; that would accomplish little
beyond breaking existing scripts. Plausible choices include duplicating
it, like:
VERSION "PostgreSQL 11devel on ..."
CLIENT_VERSION "PostgreSQL 11devel on ..."
CLIENT_VERSION_NAME "11devel"
CLIENT_VERSION_NUM 110000
or just ignoring the discrepancy:
VERSION "PostgreSQL 11devel on ..."
CLIENT_VERSION_NAME "11devel"
CLIENT_VERSION_NUM 110000
or just leaving "CLIENT" implicit for all of these variables:
VERSION "PostgreSQL 11devel on ..."
VERSION_NAME "11devel"
VERSION_NUM 110000
Robert seems to prefer the last of those, and that'd be fine with me.
(Note that CLIENT is ambiguous anyway: does it mean psql itself, or
libpq?)
> SERVER_VERSION_NAME "9.6.4"
> SERVER_VERSION_NUM 090604
I'm on board with this, except I don't think we should have any leading
zero in the numeric form. There are contexts where somebody might think
that means octal.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
view thread (96+ messages) latest in thread
Message-ID: <20786.1503760136@sss.pgh.pa.us>
Permalink: ../20786.1503760136@sss.pgh.pa.us/
Also on: postgresql.org/message-id/20786.1503760136@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, coelho@cri.ensmp.fr, robertmhaas@gmail.com, pavel.stehule@gmail.com, corey.huinker@gmail.com, daniel@manitou-mail.org
Subject: Re: Variable substitution in psql backtick expansion
In-Reply-To: <20786.1503760136@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox