X-Original-To: pgsql-hackers@postgresql.org Received: from trapezium.tol.li (trapezium.tol.li [217.151.168.25]) by postgresql.org (Postfix) with ESMTP id 56AD24758FE for ; Fri, 14 Mar 2003 10:54:20 -0500 (EST) Received: (from tolli@localhost) by trapezium.tol.li (8.11.6/8.11.6) id h2EFsKn17468; Fri, 14 Mar 2003 15:54:20 GMT Date: Fri, 14 Mar 2003 15:54:20 +0000 From: =?iso-8859-1?Q?=DE=F3rhallur_H=E1lfd=E1narson?= To: Tom Lane Cc: Darko Prenosil , pgsql-hackers@postgresql.org Subject: Re: Upgrading the backend's error-message infrastructure Message-ID: <20030314155420.A24125@tol.li> References: <9168.1047588660@sss.pgh.pa.us> <200303141229.32585.darko.prenosil@finteh.hr> <21328.1047655985@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <21328.1047655985@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Fri, Mar 14, 2003 at 10:33:05AM -0500 X-Archive-Number: 200303/611 X-Sequence-Number: 36857 -*- Tom Lane [ 2003-03-14 15:33 ]: > Darko Prenosil writes: > > What about user messages ? > > If I remember correct, MSSQL had a system catalog table with formated error > > messages, and it was possible to raise error with error number and it's > > parameters. It can be very useful when you must raise same error from > > different places in the code. > > But that's exactly the direction we are *not* going in. We had that > discussion a long time ago when we first started internationalizing > our error messages. Peter Eisentraut convinced everybody that we did > not want to tie error codes to unique error messages. [digs in archives > ...] See for example > http://fts.postgresql.org/db/mw/msg.html?mid=1279991 > I have no desire to revisit that choice. > > There is nothing to stop you from creating your own user-defined > messages, and even adding them to the .po files in your installation > if the need strikes. We aren't going to store them in any system table, > however. What about the option of having error numbers unique, but have error numbers linked to error messages (unique in code, but share strings). Just my .02 ISK. -- Regards, Tolli tolli@tol.li