Search Postgresql Archives

Re: Throwing exceptions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux