Re: Throwing exceptions

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Germán Hüttemann Arza <ghuttemann(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Throwing exceptions
Date: 2007-06-21 23:13:28
Message-ID: 467B0618.7070104@g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Germán Hüttemann Arza wrote:
> Hi,
>
> I need a way to throw a message in a function, when an exception occurs, but I
> don't want to write again and again the same message in every place I need to
> throw it. So, is there a way to handle this situation in a more general
> manner?

Why not create a table of error messages / numbers, then you can just
pull the message from the table?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Tolley 2007-06-21 23:35:10 Re: ORDER BY with exception
Previous Message Noah Heusser 2007-06-21 22:50:11 Re: Dynamic Log tigger (plpgsql)