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

Started by Nonameover 20 years ago7 messagesdocs
Jump to latest
#1Noname
kdio@uenf.br

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

Attachments:

TableA.htmtext/html; charset=ISO-8859-1; name=TableA.htmDownload
#2Bruce Momjian
bruce@momjian.us
In reply to: Noname (#1)
Re: Table A-1. PostgreSQL Error Codes (WITH constants)

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
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#2)
Re: Table A-1. PostgreSQL Error Codes (WITH constants)

Bruce Momjian <pgman@candle.pha.pa.us> writes:

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?

What exactly is the point of the change at all?

regards, tom lane

#4Philip Yarra
philip@utiba.com
In reply to: Tom Lane (#3)
Re: Table A-1. PostgreSQL Error Codes (WITH constants)

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.

#5Noname
kdio@uenf.br
In reply to: Bruce Momjian (#2)
Re: Table A-1. PostgreSQL Error Codes (WITH constants)

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

#6Noname
kdio@uenf.br
In reply to: Noname (#1)
Re: Table A-1. PostgreSQL Error Codes (WITH constants)

(correct format)

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

Attachments:

errcodes.sgmltext/html; charset=ISO-8859-1; name=errcodes.sgmlDownload
#7Bruce Momjian
bruce@momjian.us
In reply to: Noname (#6)
Re: Table A-1. PostgreSQL Error Codes (WITH constants)

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

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

kdio@uenf.br wrote:

(correct format)

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

[ Attachment, skipping... ]

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

http://archives.postgresql.org

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