Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fCWjp-0006jy-8D for pgsql-docs@arkaria.postgresql.org; Sat, 28 Apr 2018 20:46:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fCWjn-0007Ab-K3 for pgsql-docs@arkaria.postgresql.org; Sat, 28 Apr 2018 20:46:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fCKuT-0001ec-Fz for pgsql-docs@lists.postgresql.org; Sat, 28 Apr 2018 08:08:45 +0000 Received: from rgout0107.bt.lon5.cpcloud.co.uk ([65.20.0.127] helo=rgout01.bt.lon5.cpcloud.co.uk) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fCKuP-0002FQ-7r for pgsql-docs@lists.postgresql.org; Sat, 28 Apr 2018 08:08:44 +0000 X-OWM-Source-IP: 81.148.230.232 (GB) X-OWM-Env-Sender: dossett@btinternet.com X-RazorGate-Vade-Classification: clean X-RazorGate-Vade-Verdict: clean 0 X-VadeSecure-score: verdict=clean score=0/300, class=clean X-SNCR-VADESECURE: CLEAN X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedtgedrleekgddtudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvfhgjufffkfggtgfgofhtsehtjehgtddvtddvnecuhfhrohhmpedftehnugihucffohhsshgvthhtfdcuoeguohhsshgvthhtsegsthhinhhtvghrnhgvthdrtghomheqnecukfhppeekuddrudegkedrvdeftddrvdefvdenucfrrghrrghmpehhvghlohepqffhhffkvefgfedpihhnvghtpeekuddrudegkedrvdeftddrvdefvddpmhgrihhlfhhrohhmpeeoughoshhsvghtthessghtihhnthgvrhhnvghtrdgtohhmqedprhgtphhtthhopeeosghruhgtvgesmhhomhhjihgrnhdruhhsqedprhgtphhtthhopeeophhgshhqlhdqughotghssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgheqpdhrtghpthhtohepoehtghhlsehsshhsrdhpghhhrdhprgdruhhsqeenucevlhhushhtvghrufhiiigvpedt Received: from OFFICE3 (81.148.230.232) by rgout01.bt.lon5.cpcloud.co.uk (9.0.019.26-1) (authenticated as dossett@btinternet.com) id 5ACB6413020F3314; Sat, 28 Apr 2018 09:08:32 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btinternet.com; s=btcpcloud; t=1524902921; bh=Dglt34DxwT2uqgB6m/fVrCR1tB9Z8iGgl3vBdPylCnE=; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:X-Mailer; b=Or0e7Ja4ftzyuAmpqpRj1eEI2671h9L9JX8p6BBYWDFvCMZyoVyPd1Qx0fGgbOFjjKeXRNuodOnhofEa6P184UPy1LCGelnBCFHXemfUeJnYUXb4NVZv3EWfrNwO4KEGGZpBPv3nHgIDBy0J6fRDJ9MX5sae0M4m55e2lVBPbG8= From: "Andy Dossett" To: "'Tom Lane'" , "'Bruce Momjian'" Cc: References: <152482369232.19804.12598002996950785414@wrigleys.postgresql.org> <20180427133914.GB32454@momjian.us> <25849.1524842189@sss.pgh.pa.us> In-Reply-To: <25849.1524842189@sss.pgh.pa.us> Subject: RE: Appendix A. PostgreSQL Error Codes Date: Sat, 28 Apr 2018 09:08:26 +0100 Message-ID: <000001d3dec8$16875630$43960290$@btinternet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHXJzRkfcoNcY3lQM6OUVJAgEc82AKHFgZgAs0umLSj5J4q8A== Content-Language: en-gb List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 Sent: 27 April 2018 16:16 To: Bruce Momjian Cc: dossett@btinternet.com; pgsql-docs@lists.postgresql.org Subject: Re: Appendix A. PostgreSQL Error Codes Bruce Momjian 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