Re: Appendix A. PostgreSQL Error Codes - Mailing list pgsql-docs

From Tom Lane
Subject Re: Appendix A. PostgreSQL Error Codes
Date
Msg-id 25849.1524842189@sss.pgh.pa.us
Whole thread Raw
In response to Re: Appendix A. PostgreSQL Error Codes  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Appendix A. PostgreSQL Error Codes  (Jürgen Purtz <juergen@purtz.de>)
RE: Appendix A. PostgreSQL Error Codes  ("Andy Dossett" <dossett@btinternet.com>)
List pgsql-docs
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


pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: SELECT ... FOR UPDATE OF clause documentation implies use oftable_names rather than aliases
Next
From: PG Doc comments form
Date:
Subject: Documentation for CommandComplete is incorrect for CREATE TABLE withserver version 10.2