agora inbox for [email protected]  
help / color / mirror / Atom feed
From: Neil Conway <[email protected]>
To: Tom Lane <[email protected]>
Cc: Pavel Stehule <[email protected]>
Cc: [email protected]
Subject: Re: User's exception plpgsql
Date: Thu, 07 Jul 2005 11:00:36 +1000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

Tom Lane wrote:
> 	RAISE NOTICE '12' !! '345', ...
> 
> Is !! an infix operator (using both strings as arguments) or a postfix
> operator (in which case '345' is the format)?

Ah, I see. I would be content to allow opt_sqlstate to be either a 
string literal, a T_WORD (predefined error condition), or a TEXT 
variable. If users need to throw a sqlstate that is derived from a SQL 
expression, they can always assign to a TEXT variable and then specify 
that variable to RAISE.

>>     RAISE [ opt_sqlstate ] LEVEL 'fmt' [ , expr ... ]

This syntax might be slightly better anyway, as allowing two string 
literals without any intervening tokens is a bit ugly. We would still 
need to restrict opt_sqlstate as described above, though.

-Neil



view thread (31+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: User's exception plpgsql
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox