Re: BUG #12379: pgbench should hint to pgbench -i

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #12379: pgbench should hint to pgbench -i
Дата
Msg-id 20150718224836.GB2301@postgresql.org
обсуждение исходный текст
Ответ на Re: BUG #12379: pgbench should hint to pgbench -i  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
Следующее
От: Tobias Pfeiffer
Дата:
Сообщение: Re: BUG #13504: Types in math functions table is incorrect