Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Throwing exceptions


  • From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
  • To: Michael Glaesemann <grzm(at)seespotcode(dot)net>
  • Cc: Germán Hüttemann Arza <ghuttemann(at)cnc(dot)una(dot)py>, pgsql-general(at)postgresql(dot)org
  • Subject: Re: Throwing exceptions
  • Date: Tue, 26 Jun 2007 14:31:54 -0500
  • Message-id: <87262DA7-B388-47FA-A5FB-4116D7EE2BC4(at)seespotcode(dot)net>


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





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group