Re: More on elog and error codes - Mailing list pgsql-hackers

From Philip Warner
Subject Re: More on elog and error codes
Date
Msg-id 3.0.5.32.20010322154752.02983550@mail.rhyme.com.au
Whole thread Raw
In response to More on elog and error codes  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
At 22:03 21/03/01 +0100, Peter Eisentraut wrote:
>
>This is going to be a disaster for the coder.  Every time you look at an
>elog you don't know what it does? Is the first arg a %s or a %d?  What's
>the first %s, what the second?

FWIW, I did a quick scan for elog in PG and found:

- 6856 calls (may include commented-out calls) 
- 2528 unique messages
- 1248 have no parameters
- 859 have exactly one argument
- 285 have exactly 2 args
- 136 have 3 or more args

so 83% have one or no arguments, which is probably not going to be very
confusing.

Looking at the actual messages, there is also a great deal of opportunity
to standardize and simplify since many of the messages only differ by their
prefixed function name.



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c
Next
From: Bruce Momjian
Date:
Subject: Re: pgindent run?