Re: translating exception messages of postgresql functions

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
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 14:46:27
Message-ID: 20080514144627.GD5521@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2008-05-14 15:01:36 Re: translating exception messages of postgresql functions
Previous Message Julius Tuskenis 2008-05-14 14:32:23 translating exception messages of postgresql functions