Re: Error message style guide, take 2 - Mailing list pgsql-hackers

From Dann Corbit
Subject Re: Error message style guide, take 2
Date
Msg-id D90A5A6C612A39408103E6ECDD77B8294CDC87@voyager.corporate.connx.com
Whole thread Raw
In response to Error message style guide, take 2  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Error message style guide, take 2  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Friday, May 16, 2003 2:45 PM
> To: Kevin Brown
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] Error message style guide, take 2
>
>
> Kevin Brown <kevin@sysexperts.com> writes:
> > Dann Corbit wrote:
> >> I really like the way the RDB and VMS log error messages.
>
> > I'm very much in agreement here.  In addition to the
> advantages listed
> > above, this scheme is vastly superior to simply issuing
> error numbers
> > because the reader can at least get an idea of what the
> error itself
> > actually is even if he doesn't have the detail text associated with
> > the error.
>
> I didn't actually see anything to it except for a very ugly
> spelling of ERROR:, NOTICE:, WARNING:, etc.  What exactly is
> there in their scheme that you can't do as well or better
> with our existing practices?

There is a unique signature that makes things easy to find. A grep for
'%' will find all errors, warnings and informational messages.  A grep
for '-E-' will find all errors.  The words 'error', 'warning' and
'notice' are not likely to be unique.  A single '%' sign might turn up
in the text of a message (e.g. a badly formed like clause) but it not
terribly common in use.  That might be done a bit better.  Maybe
something like '!%>' or some other very unlikely combination would be
better.  But not too long.  Then it would be hard to remember.


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: SET CONSTRAINTS not schema-aware
Next
From: Tom Lane
Date:
Subject: Re: Error message style guide, take 2