Re: SQL conformity regarding SQLSTATE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL conformity regarding SQLSTATE
Дата
Msg-id 2414.1513875032@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SQL conformity regarding SQLSTATE  (Jürgen Purtz <juergen@purtz.de>)
Ответы Re: SQL conformity regarding SQLSTATE  (Jürgen Purtz <juergen@purtz.de>)
Список pgsql-sql
=?UTF-8?Q?J=c3=bcrgen_Purtz?= <juergen@purtz.de> writes:
> I rearranged 'errcodes.txt' according to SQLSTATE without eliminating 
> any row. Please read section 42 and its comments carefully. Maybe you 
> want to rearrange the 4 rows which have no fourth column. The attachment 
> contains the changes as raw file and as patch.

I looked at this a bit and am completely unwilling to split up the
ERRCODE_UNDEFINED_xxx and ERRCODE_DUPLICATE_xxx codes as you propose.
I think it's important to keep them together so that programmers looking
at the list will select the right one.  It's easy to foresee someone
mistakenly using the generic ERRCODE_UNDEFINED_OBJECT code if the one they
should have used is some distance away.  Some of the other places where
numeric code order is violated are probably there for similar reasons
about keeping logically related codes together.  (I think others are just
a result of SQL99 having listed the codes in a random order to begin
with...)

I think what might make sense is to rewrite generate-errcodes-table.pl
so that it sorts the entries for itself rather than relying on the
input file to determine the order.

            regards, tom lane


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

Предыдущее
От: Jürgen Purtz
Дата:
Сообщение: Re: SQL conformity regarding SQLSTATE
Следующее
От: Jürgen Purtz
Дата:
Сообщение: Re: SQL conformity regarding SQLSTATE