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 1B1BB475AE4; Thu, 13 Mar 2003 16:47:29 -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 h2DLlUub009564; Thu, 13 Mar 2003 16:47:30 -0500 (EST) To: Neil Conway Cc: PostgreSQL Hackers , pgsql-interfaces@postgresql.org Subject: Re: Upgrading the backend's error-message infrastructure In-reply-to: <1047591570.356.1854.camel@tokyo> References: <9168.1047588660@sss.pgh.pa.us> <1047591570.356.1854.camel@tokyo> Comments: In-reply-to Neil Conway message dated "13 Mar 2003 16:39:31 -0500" Date: Thu, 13 Mar 2003 16:47:30 -0500 Message-ID: <9563.1047592050@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200303/575 X-Sequence-Number: 36821 Neil Conway writes: > While we're effectively changing every elog call site in the backend, > would it also be a good idea to adopt a standard for the format of error > messages? (e.g. capitalization, grammar, etc.) Yup. I was planning to bring that up as a separate thread. I think Peter has already put some thought into it, but I couldn't find anything in the archives... > If we wanted to get fancy, we could make use of the glibc ability to > generate a back trace programatically: Hmm ... maybe. Certainly we all too often ask people to get this info by hand ... too bad it only works in glibc though. >> In gcc-compiled >> backends, the function name will be provided automatically by errstart, >> but there will be some places where we need the name to be available even >> in a non-gcc build. > To be honest, I'd be sceptical whether there are enough platforms > without *either* gcc or a C99 compiler that it's worthwhile worrying > about them that much (all that is at stake is some backward > compatibility, anyway). I'm only planning to bother with the errfunction hack for messages that I know are being specifically tested for by existing frontends. ecpg looks for "PerformPortalFetch" messages, for example. If we don't keep that name in the (old version of the) error message then we have a compatibility problem. But I do want to move away from having function names in the primary error message text. regards, tom lane