Re: translating exception messages of postgresql functions - Mailing list pgsql-admin

From Tom Lane
Subject Re: translating exception messages of postgresql functions
Date
Msg-id 19619.1210777296@sss.pgh.pa.us
Whole thread Raw
In response to translating exception messages of postgresql functions  (Julius Tuskenis <julius@nsoft.lt>)
List pgsql-admin
Julius Tuskenis <julius@nsoft.lt> writes:
> As I've read - postgresql always generates P0001 SQLSTATE code for
> raised exceptions. Have enyone tried to distinguish one exception from
> the other in the application?

You'd have to rely on looking at the error message text.

8.4 will let you specify SQLSTATE in RAISE:
http://developer.postgresql.org/pgdocs/postgres/plpgsql-errors-and-messages.html

            regards, tom lane

pgsql-admin by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: translating exception messages of postgresql functions
Next
From: Julius Tuskenis
Date:
Subject: Re: translating exception messages of postgresql functions