Re: try/catch macros for Postgres backend

From: Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: try/catch macros for Postgres backend
Date: 2004-07-29 04:10:12
Message-ID: 20040729041012.GA4657@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 28, 2004 at 08:19:17PM -0400, Tom Lane wrote:

Very cool and interesting idea.

> Does anyone have a problem with this macro syntax? The try/catch names
> are stolen from Java, so I'm figuring they won't terribly surprise any
> modern programmer, but I'm open to different names if anyone has a
> better idea.

The only comment I have so far is that Java and Python appear to have
settled on try/catch/finally blocks. Maybe we need three blocks too,
for handling more complex scenarios.

(The "finally" block, AFAIU, is executed whether an exception was raised
or not, so it serves as cleanup for try and catch blocks. Somebody more
knowledgeable in this OO matters may enlighten us better?)

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"No es bueno caminar con un hombre muerto"

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Coloring Graph 2004-07-29 04:38:35 7.5 devel initdb failure
Previous Message Gavin Sherry 2004-07-29 03:46:20 Re: try/catch macros for Postgres backend