Re: try/catch macros for Postgres backend

From: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: try/catch macros for Postgres backend
Date: 2004-07-29 14:10:49
Message-ID: 20040729141049.GB84485@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 29, 2004 at 09:58:54AM -0400, Tom Lane wrote:

> Right. The last bit (FINALLY executes whether or not a CATCH block
> re-throws) seemed too messy to handle in my little macros, so I'm
> planning on leaving it out. But I'm open to the idea if anyone has
> a clever implementation thought.

There's also the alternative of going to C++, of course, which would
give you full native exception handling. Most of this "finally" stuff
will go away when you have destructors, IMHO, and resource cleanups are
a whole lot easier. The main drawback is that stricter rules apply to
gotos and longjumps--but most of those will be "a poor man's exception
handling" anyway.

Jeroen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-07-29 14:12:22 Re: more signals (was: Function to kill backend)
Previous Message Korea PostgreSQL Users' Group 2004-07-29 14:06:17 Re: win32 crash in initdb - it has still problems.