agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jürgen Purtz <juergen@purtz.de>
Cc: pgsql-sql@lists.postgresql.org
Subject: Re: SQL conformity regarding SQLSTATE
Date: Thu, 21 Dec 2017 11:50:32 -0500
Message-ID: <2414.1513875032@sss.pgh.pa.us> (raw)
In-Reply-To: <6f4d8b10-0d24-86f5-3e14-b3d362181381@purtz.de>
References: <c2c1a96d-dae9-6667-bf11-eb423ee90385@purtz.de>
	<31999.1513697414@sss.pgh.pa.us>
	<c5fb7c99-0f02-75cf-9b97-95693fc6adc7@purtz.de>
	<11558.1513819695@sss.pgh.pa.us>
	<6f4d8b10-0d24-86f5-3e14-b3d362181381@purtz.de>

=?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




view thread (8+ messages)  latest in thread

Message-ID: <2414.1513875032@sss.pgh.pa.us>
Permalink:  ../2414.1513875032@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2414.1513875032@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, juergen@purtz.de, pgsql-sql@lists.postgresql.org
  Subject: Re: SQL conformity regarding SQLSTATE
  In-Reply-To: <2414.1513875032@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox