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

2005-06-21 Thread Pavel Stehule
On Tue, 21 Jun 2005, Tom Lane wrote: Pavel Stehule [EMAIL PROTECTED] writes: I wont to prohibit synonyms in exception (every exception has unique sqlstate). I don't think that's a particularly good idea --- maybe if SQL had been designed according to your worldview, it'd be like that,

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

2005-06-19 Thread Neil Conway
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

[HACKERS] PROPOSAL - User's exception in PL/pgSQL

2005-06-16 Thread Pavel Stehule
Hello I did some work on implementation of user's exception. Generally: o add pseudotype EXCEPTION DECLARE excpt EXCEPTION [= 'SQLSTATE'] o change RAISE stmt RAISE error_level [excpt_var|sys_excpt_name] errmsg, ... o change EXCEPTION EXCEPTION WHEN

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

2005-06-16 Thread Josh Berkus
Pavel, o User can specify SQLSTATE only from class 'U1' o Default values for SQLSTATE usr excpt are from class 'U0' o Every exception's variable has unique SQLSTATE o User's exception or system's exception can be raised only with level EXCEPTION Any comments, notes? Looks great to me,

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

2005-06-16 Thread Pavel Stehule
On Thu, 16 Jun 2005, Josh Berkus wrote: Pavel, o User can specify SQLSTATE only from class 'U1' o Default values for SQLSTATE usr excpt are from class 'U0' o Every exception's variable has unique SQLSTATE o User's exception or system's exception can be raised only with level