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 4D179B46.8050005@wulczer.org
обсуждение исходный текст
Ответ на Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 26/12/10 20:33, Tom Lane wrote:
> Jan Urbański <wulczer@wulczer.org> writes:
>> I then tried to do the same for plerrcodes.h, but found discrepancies.
> 
> You shouldn't assume that errcodes.h necessarily includes all the info
> needed to create the other two files.
> 
> The way I'd envision this working is that we have a master file
> containing the five-letter SQLSTATE code, the ERRCODE macro name,
> the string name to use in plerrcodes.h, and any other required items,
> and then generate all three of the existing files from that.

How about a format like this then:

# Comment
Section: Class 2F - SQL Routine Exception
macro_name sqlstate plpgsqlname is_error

That is: # and blank lines are comments, lines starting with "Section:"
are section names (needed for SGML output), the rest are whitespace
separated strings. is_error is 0 or 1, if it's 0 we don't generate a
plpgsql condition for it.

If we go for that format, we'll end up with one new plpgsql error
(nonstantard_use_of_escape_character) that was omitted from previous
releases.

Jan


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: knngist - 0.8
Следующее
От: Tom Lane
Дата:
Сообщение: Re: autogenerating error code lists (was Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.)