Re: Error handling in stored functions/procedures

From: Jurgen Defurne <jurgen(dot)defurne(at)pandora(dot)be>
To: Postgresql General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error handling in stored functions/procedures
Date: 2004-05-31 05:28:19
Message-ID: 20040531072819.2ffa9670.jurgen.defurne@pandora.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 30 May 2004 22:08:10 +0200
Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> wrote:

> > This then, removes the first part of my explanation, and dumps me
> > completely in the second part, which is where the biggest problems
> > reside.
> AFAICT 7.4 does much better error handling (no, you can't
> easily control error handling inside a transaction, though). It
> reports errors in a way that can be parsed a lot better thus
> allowing for fairly easy translation into meaningful user
> messages.

You mean that the default generated error messages contain some more
information I presume, like the table name and the constraint name ?

I think I noticed that already, and since I had time since yesterday
evening, I thought things over and came to the conclusion that this
mechanism at least gives an escape hatch, since it is possible to give a
name to each constraint, and then use this name as an index to get a
proper error message.

Regards,

Jurgen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Cyril VELTER 2004-05-31 05:57:01 Re: Dump 7.1.3->7.4.2
Previous Message Tom Lane 2004-05-31 04:53:00 Re: Large table search question