Home > Archive > PostgreSQL Documentation > December 2005 > Re: Table A-1. PostgreSQL Error Codes (WITH constants)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Table A-1. PostgreSQL Error Codes (WITH constants)
Bruce Momjian

2005-12-01, 8:24 pm

kdio@uenf.br wrote:
> For easy COPY/PASTE, here goes (attached) a revisised "Table A-1. PostgreSQL
> 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
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Tom Lane

2005-12-01, 8:24 pm

Bruce Momjian <pgman@candle.pha.pa.us> writes:
> kdio@uenf.br wrote:
[color=darkred]
> 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?


What exactly is the point of the change at all?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

philip@utiba.com

2005-12-01, 8:24 pm

> 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.


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

kdio@uenf.br

2005-12-02, 7:23 am

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



Doing it right now ... sorry my mistake

Regards

Kdio


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


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com