Subject: Table A-1. PostgreSQL Error Codes (WITH constants)

From: [email-masked]
Date: Thu, 01 Dec 2005 13:31:56 -0200

For easy COPY/PASTE, here goes (attached) a revisised "Table A-1. PostgreSQL
Error Codes" with a new column "Constant".

Best Regards.

----------------------------------------------------------------
Mensagem enviada pelo Webmail UENF: http://www.grc.uenf.br/webmail

---

From: Bruce Momjian <[email-masked]>
Date: Thu, 1 Dec 2005 15:48:42 -0500 (EST)

> Error Codes" with a new column "Constant".

Uh, our documentation is in SGML, particularly
doc/src/sgml/errcodes.sgml.  Can you send a patch to that file or should
I merge your HTML into there?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email-masked]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---

From: Tom Lane <[email-masked]>
Date: Thu, 01 Dec 2005 15:57:03 -0500

> I merge your HTML into there?

What exactly is the point of the change at all?

			regards, tom lane

---

From: [email-masked]
Date: Fri, 2 Dec 2005 09:51:34 +1100 (EST)

> What exactly is the point of the change at all?

Take a typical line in the table:

Error Code | Meaning
23502      | NOT NULL VIOLATION

Now assume I want to catch this exception in a plpgsql function:

CREATE OR REPLACE FUNCTION foo()
/* boilerplate omitted */

EXCEPTION
    WHEN NOT_NULL_VIOLATION THEN
       RAISE WARNING 'Crikey!';
    WHEN OTHERS THEN
       RAISE NOTICE 'Oh well, [%,%]', SQLSTATE, SQLERRM;

Making the "Meaning" column almost-usable as the exception name is
frustrating. This patch would allow people writing functions to copy and
paste the exception names directly.

It's not a big deal, but it would save some re-typing for people writing a
lot of functions (me, for example).

-----------------
Utiba Pty Ltd 
This message has been scanned for viruses and
dangerous content by Utiba mail server and is 
believed to be clean.

---

From: [email-masked]
Date: Fri, 02 Dec 2005 09:30:51 -0200

> I merge your HTML into there?

Doing it right now ... sorry my mistake

Regards

Kdio

---

From: [email-masked]
Date: Fri, 02 Dec 2005 11:12:49 -0200

(correct format)

Best Regards.

---

From: Bruce Momjian <[email-masked]>
Date: Thu, 8 Dec 2005 16:30:19 -0500 (EST)

Patch applied.  I also added section markings so it isn't one long list
with no highlighting:

	http://candle.pha.pa.us/main/writings/pgsql/sgml/errcodes-appendix.html

---------------------------------------------------------------------------

> Error Codes" with a new column "Constant".

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
> 
>                http://archives.postgresql.org