Re: PROPOSAL - User's exception in PL/pgSQL - Mailing list pgsql-hackers

From Neil Conway
Subject Re: PROPOSAL - User's exception in PL/pgSQL
Date
Msg-id 42B52976.9020807@samurai.com
Whole thread Raw
In response to PROPOSAL - User's exception in PL/pgSQL  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Responses Re: PROPOSAL - User's exception in PL/pgSQL
List pgsql-hackers
Pavel Stehule wrote:
>     DECLARE excpt EXCEPTION [= 'SQLSTATE']

What would this default to? (i.e. if no '= SQLSTATE' is specified)

> Rules:
>  o User can specify SQLSTATE only from class 'U1' 
>  o Default values for SQLSTATE usr excpt are from class 'U0'

Can you elaborate on what you mean?

>  o Every exception's variable has unique SQLSTATE
>  o User's exception or system's exception can be raised only with
>    level EXCEPTION

It might be worth allowing a custom SQLSTATE to be specified for 
non-exception RAISEs -- there are already WARNING SQLSTATE error codes 
(see ERRCODE_WARNING).

-Neil


pgsql-hackers by date:

Previous
From: "Thomas F. O'Connell"
Date:
Subject: Re: [PATCHES] default database creation with initdb
Next
From: Josh Berkus
Date:
Subject: Re: Checkpointing problem with new buffer mgr.