Re: [HACKERS] elog in 7.4

2004-09-23 Thread Thomas Hallgren
Laszlo, Tom, is there other way in pg 7.4 than backporting PG_TRY? It seems a lot of work. I have the needed macros implemented for 7.4 in PL/Java. Look in src/C/pljava.h. The exception handling in versions prior to 8.0 is very rudimentary though. There's (as you already discovered) no way to fi

Re: [HACKERS] elog in 7.4

2004-09-22 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Wed, Sep 22, 2004 at 03:02:22PM +0200, Laszlo Hornyak wrote: >> Tom, is there other way in pg 7.4 than backporting PG_TRY? It seems a lot >> of work. > IIRC PL/Python had a hack involving sigsetjmp (which was removed in > favor of the cleaner PG_TRY)

Re: [HACKERS] elog in 7.4

2004-09-22 Thread Alvaro Herrera
On Wed, Sep 22, 2004 at 03:02:22PM +0200, Laszlo Hornyak wrote: > > Tom, is there other way in pg 7.4 than backporting PG_TRY? It seems a lot > of work. IIRC PL/Python had a hack involving sigsetjmp (which was removed in favor of the cleaner PG_TRY). You could try doing that. -- Alvaro Herrera

Re: [HACKERS] elog in 7.4

2004-09-22 Thread Laszlo Hornyak
Tom, is there other way in pg 7.4 than backporting PG_TRY? It seems a lot of work. Thanks, Laszlo On Tue, 21 Sep 2004, Tom Lane wrote: > Laszlo Hornyak <[EMAIL PROTECTED]> writes: > > I am implementing a java language handler. If unrecoverable error occurs, > > it needs to send a signal to the

Re: [HACKERS] elog in 7.4

2004-09-21 Thread Tom Lane
Laszlo Hornyak <[EMAIL PROTECTED]> writes: > I am implementing a java language handler. If unrecoverable error occurs, > it needs to send a signal to the java process, so it can stop the > execution of the stored procedure, otherwise it would stay in inconsystent > state. Well, an elog callback is

Re: [HACKERS] elog in 7.4

2004-09-20 Thread Tom Lane
Laszlo Hornyak <[EMAIL PROTECTED]> writes: > I have a error callback function registered to run each time an SQL > error occurs. The problem is that the errfinish() calls it both if the > executed SQL statement was wrong, and if the statem,ent or plan logging > is enabled, and it seems elog.h do

[HACKERS] elog in 7.4

2004-09-20 Thread Laszlo Hornyak
Hi! I have a error callback function registered to run each time an SQL error occurs. The problem is that the errfinish() calls it both if the executed SQL statement was wrong, and if the statem,ent or plan logging is enabled, and it seems elog.h doesn't provide the API to find out the reason w