X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5CA80529E9 for ; Fri, 8 Jul 2005 01:32:38 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 85601-07 for ; Fri, 8 Jul 2005 04:32:29 +0000 (GMT) Received: from mailbox.samurai.com (mailbox.samurai.com [205.207.28.82]) by svr1.postgresql.org (Postfix) with ESMTP id A1926529C8 for ; Fri, 8 Jul 2005 01:32:29 -0300 (ADT) Received: from localhost (mailbox.samurai.com [205.207.28.82]) by mailbox.samurai.com (Postfix) with ESMTP id 857BB9B4AC; Fri, 8 Jul 2005 00:32:29 -0400 (EDT) Received: from mailbox.samurai.com ([205.207.28.82]) by localhost (mailbox.samurai.com [205.207.28.82]) (amavisd-new, port 10024) with LMTP id 18886-01-3; Fri, 8 Jul 2005 00:32:27 -0400 (EDT) Received: from [220.101.4.182] (r220-101-4-182.cpe.unwired.net.au [220.101.4.182]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailbox.samurai.com (Postfix) with ESMTP id A318D9B49B; Fri, 8 Jul 2005 00:32:25 -0400 (EDT) Message-ID: <42CE01D0.8060700@samurai.com> Date: Fri, 08 Jul 2005 14:32:16 +1000 From: Neil Conway User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Pavel Stehule , pgsql-patches@postgresql.org Subject: Re: User's exception plpgsql References: <42CBF6AD.9080600@samurai.com> <26946.1120665361@sss.pgh.pa.us> <42CC0260.4090407@samurai.com> <28184.1120669779@sss.pgh.pa.us> <42CC7EB4.5090201@samurai.com> In-Reply-To: <42CC7EB4.5090201@samurai.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mailbox.samurai.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/228 X-Sequence-Number: 16568 Neil Conway wrote: > 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 ... ] BTW, do have we reached a consensus on this? -Neil