Re: translating exception messages of postgresql functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Julius Tuskenis <julius(at)nsoft(dot)lt>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: translating exception messages of postgresql functions
Date: 2008-05-14 15:01:36
Message-ID: 19619.1210777296@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Julius Tuskenis <julius(at)nsoft(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Julius Tuskenis 2008-05-14 15:22:24 Re: translating exception messages of postgresql functions
Previous Message Alvaro Herrera 2008-05-14 14:46:27 Re: translating exception messages of postgresql functions