From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Julien Rouhaud <julien.rouhaud@dalibo.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Cc: mail@bwe.im, Oleksandr Shulgin <oleksandr.shulgin@zalando.de>
Cc: PostgreSQL Bugs List <pgsql-bugs@postgresql.org>
Subject: Re: BUG #12379: pgbench should hint to pgbench -i
Date: Sun, 19 Jul 2015 00:48:36 +0200
Message-ID: <20150718224836.GB2301@postgresql.org> (raw)
In-Reply-To: <11036.1437237151@sss.pgh.pa.us>
References: <55984046.60901@dalibo.com>
<CAECtzeWOm0JmJpDwM=woq8mfqfjPHOxLvSAaPrs=qOHvbWzxkw@mail.gmail.com>
<559908D4.7020901@dalibo.com>
<alpine.DEB.2.10.1507051821230.27775@sto>
<23314.1436142811@sss.pgh.pa.us>
<alpine.DEB.2.10.1507060709030.7427@sto>
<55AA32E0.7070006@dalibo.com>
<alpine.DEB.2.10.1507181347020.6263@sto>
<55AA7BC9.6090307@dalibo.com>
<11036.1437237151@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Tom Lane wrote:
> You could imagine including errcodes.h by itself after supplying a
> suitable definition for MAKE_SQLSTATE(); but I think you'd want it to
> reconstitute the five characters into a string literal, and I'm not
> sure that there's any easy way to do that in C. If we wanted to
> go in this direction, it might be easier to create another Perl
> script that puts out an errcodes-fe.h with the errcode symbols
> #defined as string literals.
>
> The larger reason we've not done this is that, once a given errcode
> is wired into some client-side code, it effectively becomes part of
> the protocol and can't be reassigned. See the comments around the
> places in libpq where specific errcodes are referenced. So it's
> not very clear that we want to encourage frontend code to use this
> technique a lot.
Maybe we could mark individual errcodes in errcodes.txt as "exported for
clients" with some new token, and the new errcodes-fe.h list would only
include those. That way, we only fix a limited number of codes instead
of all of them.
We could add such marks to all codes defined by the standard, since we
can't change those anyway.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, julien.rouhaud@dalibo.com, coelho@cri.ensmp.fr, guillaume@lelarge.info, oleksandr.shulgin@zalando.de
Subject: Re: BUG #12379: pgbench should hint to pgbench -i
In-Reply-To: <20150718224836.GB2301@postgresql.org>
References: <55984046.60901@dalibo.com> <CAECtzeWOm0JmJpDwM=woq8mfqfjPHOxLvSAaPrs=qOHvbWzxkw@mail.gmail.com> <559908D4.7020901@dalibo.com> <alpine.DEB.2.10.1507051821230.27775@sto> <23314.1436142811@sss.pgh.pa.us> <alpine.DEB.2.10.1507060709030.7427@sto> <55AA32E0.7070006@dalibo.com> <alpine.DEB.2.10.1507181347020.6263@sto> <55AA7BC9.6090307@dalibo.com> <11036.1437237151@sss.pgh.pa.us> <20150718224836.GB2301@postgresql.org>
* 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