Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)

Поиск
Список
Период
Сортировка
От Jan Urbański
Тема Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)
Дата
Msg-id 4D19C93C.5000703@wulczer.org
обсуждение исходный текст
Ответ на Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)  (Jan Urbański <wulczer@wulczer.org>)
Ответы Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)  (Jan Urbański <wulczer@wulczer.org>)
Список pgsql-hackers
On 26/12/10 21:33, Jan Urbański wrote:
> On 26/12/10 21:17, Tom Lane wrote:
>> =?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= <wulczer@wulczer.org> writes:
>>> Makes sense. Wait, no, errcodes.sgml includes the entries for success
>>> and warnings, but the plpgsql conditions list does not. So we need a
>>> separate column to differentiate.
>>
>> OK.  But not 0/1 please.  Maybe 'E', 'W', or 'S' ?  And again, fixed
>> width columns first, so something like
>>
>>     sqlstate  E/W/S  errcode_macro_name  plpgsql_condition_name
>>
>> where I guess we could still make the plpgsql condition name optional.
>
> All right, E/W/S sounds good. I'm actually faulty of a misnomer by
> calling the field plpgsql_condition_name. It's more like spec_name, and
> it will be used to generate plpgsql condition names for E entries and
> rows in errcodes.sgml for all entries.
>
> Remember that there will also be Section: lines there, because
> errcodes.sgml needs to know where particular the error classes start and
> end.

Here's the basic errcodes.txt file and three scripts to generate
errcodes.h, plerrcodes.h and part of errcodes.sgml.

I tried wiring it into the build system, but failed, I can't figure out
which Makefiles should be updated in order to make errcodes.h and
plerrcodes.h generated headers. Could someone help with that?

This will actually remove a few entries from plerrcodes.h, that were
aliases of other entries (like array_element_error which was an alias of
array_subscript_error). Since they did not appear in errcodes.sgml, it
shouldn't be a problem.

It also adds a forgotten entry for nonstandard_use_of_escape_character
in plerrcodes.h.

Cheers,
Jan

Вложения

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

Предыдущее
От: Itagaki Takahiro
Дата:
Сообщение: Re: SQL/MED - core functionality
Следующее
От: Robert Haas
Дата:
Сообщение: Re: SQL/MED - core functionality