Re: Throwing exceptions - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: Throwing exceptions
Date
Msg-id 87262DA7-B388-47FA-A5FB-4116D7EE2BC4@seespotcode.net
Whole thread Raw
In response to Re: Throwing exceptions  (Michael Glaesemann <grzm@seespotcode.net>)
List pgsql-general
On Jun 25, 2007, at 19:01 , Michael Glaesemann wrote:

> The message is just a string. Assign the message to a variable and
> use the variable in place of the message. For example, in PL/pgSQL:
>
> k_error_message := 'Boom! %';
> RAISE EXCEPTION k_error_message, v_foo.id;

I was wrong. The message is not just a string, but you can
interpolate the message text (and other variables) like so:

RAISE EXCEPTION '%, %', k_error_message, v_foo_id;

Michael Glaesemann
grzm seespotcode net



pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: growing disk usage problem: alternative solution?
Next
From: jef peeraer
Date:
Subject: upgrade 8.1.4 -> latest, sort order subquery