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

From Alvaro Herrera
Subject Re: translating exception messages of postgresql functions
Date
Msg-id 20080514144627.GD5521@alvh.no-ip.org
Whole thread Raw
In response to translating exception messages of postgresql functions  (Julius Tuskenis <julius@nsoft.lt>)
Responses Re: translating exception messages of postgresql functions  (Julius Tuskenis <julius@nsoft.lt>)
List pgsql-admin
Julius Tuskenis wrote:
> Hello,
>
> I'd like to ask how is translation of raised exceptions done in
> postgresql applications?

You want it translated or not translated?

> In Sybase ASA you can specify the error
> number when raising it, but in postgresql theres just exception message.
> 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?

In Postgres 8.4 you will be able to specify error codes to raised
exceptions in PL/pgSQL.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-admin by date:

Previous
From: Julius Tuskenis
Date:
Subject: translating exception messages of postgresql functions
Next
From: Tom Lane
Date:
Subject: Re: translating exception messages of postgresql functions