From: Andy Dossett <dossett@btinternet.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
To: 'Bruce Momjian' <bruce@momjian.us>
Cc: pgsql-docs@lists.postgresql.org
Subject: RE: Appendix A. PostgreSQL Error Codes
Date: Sat, 28 Apr 2018 09:08:26 +0100
Message-ID: <000001d3dec8$16875630$43960290$@btinternet.com> (raw)
In-Reply-To: <25849.1524842189@sss.pgh.pa.us>
References: <152482369232.19804.12598002996950785414@wrigleys.postgresql.org>
<20180427133914.GB32454@momjian.us>
<25849.1524842189@sss.pgh.pa.us>
Hi
The use case is pretty simple; my system has thrown an SQL error code, I
want to know what it means.
Having the list in 'order by sqlstate' sequence would save me from having to
hunt up and down the list. And I can easily determine if the error code is
missing; I can then raise another bug report.
Regards
Andy Dossett
-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: 27 April 2018 16:16
To: Bruce Momjian <bruce@momjian.us>
Cc: dossett@btinternet.com; pgsql-docs@lists.postgresql.org
Subject: Re: Appendix A. PostgreSQL Error Codes
Bruce Momjian <bruce@momjian.us> writes:
> On Fri, Apr 27, 2018 at 10:08:12AM +0000, PG Doc comments form wrote:
>> Would it be possible to present the codes in ascending sequence?
> Uh, I am guessing this is the order listed in the SQL standard. How
> would you order them differently? Have the letters only at the end?
There was some discussion of this a couple months ago, which I'm too lazy to
search the archives for right now, but it trailed off without any agreement
on what to do.
There are at least three different ordering principles that might be applied
here: numeric by code (well, perhaps more like "ASCII sort order");
alphabetical by exception name (but probably still keeping the
000 category codes at the top); or semantic grouping (ie try to keep related
errors together). It looks to me like all three of these have been applied
in different places ;-).
One idea that might help is to present two tables with different sort
orders, say strict numeric and strict alphabetical. (If we did that, I'd be
inclined to leave errcodes.txt alone and put the sorting responsibility on
the script that converts it to SGML.)
One question that has to be asked is what we think the use-case for this
table is at all. Different use-cases result in different ideas about the
best ordering.
regards, tom lane
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-docs@postgresql.org
Cc: dossett@btinternet.com, tgl@sss.pgh.pa.us, bruce@momjian.us, pgsql-docs@lists.postgresql.org
Subject: RE: Appendix A. PostgreSQL Error Codes
In-Reply-To: <000001d3dec8$16875630$43960290$@btinternet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox