X-Original-To: pgsql-hackers@postgresql.org Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id DDF1A476392 for ; Fri, 14 Mar 2003 12:22:59 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h2EHN4ub022064; Fri, 14 Mar 2003 12:23:04 -0500 (EST) To: johnnnnnn Cc: pgsql-hackers@postgresql.org Subject: Re: Upgrading the backend's error-message infrastructure In-reply-to: <20030314161922.GG74817@performics.com> References: <9168.1047588660@sss.pgh.pa.us> <20030314161922.GG74817@performics.com> Comments: In-reply-to johnnnnnn message dated "Fri, 14 Mar 2003 10:19:22 -0600" Date: Fri, 14 Mar 2003 12:23:04 -0500 Message-ID: <22063.1047662584@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200303/617 X-Sequence-Number: 36863 johnnnnnn writes: > It would seem to make more sense to me to provide a different > function(s) which allows the lookup Messages, Details, and Hints based > on the SQLSTATE. This would constrain us to have a different SQLSTATE for every error message, which we aren't going to do. See elsewhere in thread. It's also unclear how you insert parameters into error strings if you do this. > - Less clutter and wasted space on the wire. I am not really concerned about shaving bytes transmitted for an error condition. If that's a performance-critical path for your app, you need to rewrite the app ;-) > - Removal of localization from error/notice generation libraries. This > should make that section of code simpler and more fault-tolerant. And you put it where, instead? The existing scheme for localization works fine AFAICT. I don't have any interest in reinventing it (nor any chance of getting this done for 7.4, if I were to try...) regards, tom lane