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 AEBF252F3A for ; Tue, 26 Jul 2005 03:06:59 -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 10999-08 for ; Tue, 26 Jul 2005 06:06:54 +0000 (GMT) Received: from mailbox.samurai.com (mailbox.samurai.com [205.207.28.82]) by svr1.postgresql.org (Postfix) with ESMTP id D7A2652F30 for ; Tue, 26 Jul 2005 03:06:50 -0300 (ADT) Received: from localhost (mailbox.samurai.com [205.207.28.82]) by mailbox.samurai.com (Postfix) with ESMTP id 882439B515; Tue, 26 Jul 2005 02:06:50 -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 09575-01-7; Tue, 26 Jul 2005 02:06:46 -0400 (EDT) Received: from [61.88.101.19] (unknown [61.88.101.19]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailbox.samurai.com (Postfix) with ESMTP id 62D649B51B; Tue, 26 Jul 2005 02:00:22 -0400 (EDT) Message-ID: <42E5D178.8020404@samurai.com> Date: Tue, 26 Jul 2005 16:00:24 +1000 From: Neil Conway User-Agent: Debian Thunderbird 1.0.2 (X11/20050602) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Pavel Stehule , Bruce Momjian , pgsql-patches@postgresql.org Subject: Re: User's exception plpgsql References: <42E5C41E.1060805@samurai.com> <23312.1122355031@sss.pgh.pa.us> In-Reply-To: <23312.1122355031@sss.pgh.pa.us> 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.016 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/496 X-Sequence-Number: 16836 Tom Lane wrote: > Those cases are for places where the spec defines similar cases under > the error classes "SQL Routine Exception" and "External Routine Exception". > You can blame me for having assumed that plpgsql didn't need to > distinguish these cases. Well, in and of itself, I agree it is probably better to combine similar SQLSTATEs into a single logical condition. However, considering the problem it poses for implementing RAISE with builtin condition names, IMHO it would be a net win to get rid of it, if we can't find a better solution. > So I see no backwards-compatibility argument that we can't change > this. How would you want to do it better? I would just change the mapping from condition names to SQLSTATEs to be one-to-one. If a client application does need to trap multiple SQLSTATEs for a logically similar condition, they can always specify "WHEN x OR y OR ..." -Neil