Re: PROPOSAL - User's exception in PL/pgSQL

From: Neil Conway <neilc(at)samurai(dot)com>
To: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PROPOSAL - User's exception in PL/pgSQL
Date: 2005-06-19 08:14:46
Message-ID: 42B52976.9020807@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2005-06-19 17:01:28 Re: Checkpointing problem with new buffer mgr.
Previous Message Thomas F. O'Connell 2005-06-19 06:07:20 Re: [PATCHES] default database creation with initdb