From: | "Jaime Casanova" <systemguards(at)gmail(dot)com> |
---|---|
To: | Ë®îÇk tåþîå þé®Ëz <hydra2099(at)hotmail(dot)com>, pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: SQLERRM & SQLSTATE |
Date: | 2006-06-22 23:37:49 |
Message-ID: | c2d9e70e0606221637y1884783dt9e94b2780787bea9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
On 6/22/06, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> Ë(r)îÇk tåþîå þé(r)Ëz escribió:
> > Saludos lista, los molesto con una duda, estoy tratando de hacer una
> > funcion PL/pgSQL que registra errores (numero y mensaje)generados por
> > sentencias sql (insert, select, update, etc), he encontrado que la variable
> > SQLSTATE contiene el numero y SQLERRM el mensaje de error
>
> De donde sacaste eso?
>
imagino que de la documentacion
http://www.postgresql.org/docs/8.1/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
Within an exception handler, the SQLSTATE variable contains the error
code that corresponds to the exception that was raised (refer to Table
A-1 for a list of possible error codes). The SQLERRM variable contains
the error message associated with the exception. These variables are
undefined outside exception handlers.
--
Atentamente,
Jaime Casanova
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook
From | Date | Subject | |
---|---|---|---|
Next Message | Jaime Casanova | 2006-06-22 23:42:30 | Re: SQLERRM & SQLSTAT |
Previous Message | Jaime Casanova | 2006-06-22 23:32:16 | Re: De Ñs y JOINS |