X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 910BE5286A for ; Fri, 3 Jun 2005 15:42:43 -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 51685-07 for ; Fri, 3 Jun 2005 18:42:36 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id D25E852865 for ; Fri, 3 Jun 2005 15:42:35 -0300 (ADT) Received: (qmail 14035 invoked from network); 3 Jun 2005 20:42:38 +0200 Received: from unknown (HELO localhost) (boutiquenumerique-lists@192.168.0.4) by boutiquenumerique.com with SMTP; 3 Jun 2005 20:42:38 +0200 Date: Fri, 03 Jun 2005 20:42:34 +0200 To: "Tom Lane" , "Markus Bertheau" Subject: Re: getting details about integrity constraint violation Cc: 'PostgreSQL' References: <1117725916.7345.2.camel@localhost.localdomain> <14879.1117729929@sss.pgh.pa.us> From: PFC Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <14879.1117729929@sss.pgh.pa.us> User-Agent: Opera M2(BETA2)/8.0 (Linux, build 987) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/56 X-Sequence-Number: 21657 > The "error fields" facility in the FE/BE protocol could be extended > in that direction, and I think there's already been some discussion > about it; but no one has stepped up with a concrete proposal, much > less volunteered to do the work ... Um, if changing the protocol is a bother, you could also add parseable infos to the error messages... instead of : "ERROR: duplicate key violates unique constraint "testinteg_one_key"" it would say "ERROR: duplicate key violates unique constraint "testinteg_one_key" [code:"XXXX" error:"integrity" type:"unique" column:"something" constraint:"testinteg_one_key"]" Which could be hackfully added by a "parseable" locale (but with a more restrained form...) SET lc_messages TO parseable > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >