Re: SQL conformity regarding SQLSTATE - Mailing list pgsql-sql

From Tom Lane
Subject Re: SQL conformity regarding SQLSTATE
Date
Msg-id 2414.1513875032@sss.pgh.pa.us
Whole thread Raw
In response to Re: SQL conformity regarding SQLSTATE  (Jürgen Purtz <juergen@purtz.de>)
Responses Re: SQL conformity regarding SQLSTATE
List 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 by date:

Previous
From: Jürgen Purtz
Date:
Subject: Re: SQL conformity regarding SQLSTATE
Next
From: Jürgen Purtz
Date:
Subject: Re: SQL conformity regarding SQLSTATE