Re: [SQL] Catching DML exceptions in PL/pgSQL

2003-06-17 Thread Radu-Adrian Popescu
At 6/17/2003 08:33, Josh Berkus wrote: Radu, > In any event, like I said, my java code should work with the functions as > they are now, whether db throws an exception or returns some result. > Also, the oracle-like exception handling would be really great and i know > i'm looking forward to it

Re: [SQL] Catching DML exceptions in PL/pgSQL

2003-06-17 Thread Josh Berkus
Radu, > In any event, like I said, my java code should work with the functions as > they are now, whether db throws an exception or returns some result. > Also, the oracle-like exception handling would be really great and i know > i'm looking forward to it ! > Maybe in 7.5 ? Unfortunately, we see

Re: [SQL] Catching DML exceptions in PL/pgSQL

2003-06-17 Thread Radu-Adrian Popescu
Joe, Tomasz, Thanks for the reply. In any event, like I said, my java code should work with the functions as they are now, whether db throws an exception or returns some result. Also, the oracle-like exception handling would be really great and i know i'm looking forward to it ! Maybe in 7.5 ?

Re: [SQL] Catching DML exceptions in PL/pgSQL

2003-06-17 Thread Joe Conway
Radu-Adrian Popescu wrote: . begin _res.code:=1; select id into iid from log where id=_id; if not found then begin _res.msg:=''insert''; *insert into log (log, data) values (_log, _data); if not found* then begin _res.msg:=_res.msg

Re: [SQL] Catching DML exceptions in PL/pgSQL

2003-06-17 Thread Radu-Adrian Popescu
At 6/17/2003 11:44, Tomasz Myrta wrote: Dnia 2003-06-17 11:25, U¿ytkownik Radu-Adrian Popescu napisa³: Hello all, (and sorry if this has been aswered before) Take this piece of code for example: . begin _res.code:=1; select id into iid from log where id=_id; if no

Re: [SQL] Catching DML exceptions in PL/pgSQL

2003-06-17 Thread Tomasz Myrta
Dnia 2003-06-17 11:25, Użytkownik Radu-Adrian Popescu napisał: Hello all, (and sorry if this has been aswered before) Take this piece of code for example: . begin _res.code:=1; select id into iid from log where id=_id; if not found then begin _res.msg:=''ins