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 lik

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

2005-06-21 Thread Tom Lane
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, but it isn't and you can't retroactively f

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

2005-06-21 Thread Pavel Stehule
On Sun, 19 Jun 2005, Neil Conway wrote: > Pavel Stehule wrote: > > DECLARE excpt EXCEPTION [= 'SQLSTATE'] > > What would this default to? (i.e. if no '= SQLSTATE' is specified) I wont to prohibit synonyms in exception (every exception has unique sqlstate). If I need better control for sqlst

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

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 > >

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 gre

[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 excpt_var|sys_excpt_name