Re: [HACKERS] Backend error message style issues - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Backend error message style issues
Date
Msg-id 10303.1007149754@sss.pgh.pa.us
Whole thread Raw
In response to Backend error message style issues  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> I hope we can work through all of these during the next development
> period.

Too bad we didn't do it *before* doing a lot of translation work :-(.

Yes, I agree that a pass of rationalizing the error messages would be
useful.  Might want to think about that old bugaboo, error codes,
while we're at it.  Also the perennial complaint that "ERROR" and
"DEBUG" macros tend to conflict with other things.  As long as we're
going to touch many/all of the elog() calls, couldn't we try to clean
up all these issues?

> Which is better:

> function '%s' not found
> function "%s" not found
> function %s not found

Given that 'x' and "x" mean very different things in SQL, I think that
the first form is just plain wrong when an identifier is involved.
Unfortunately a lot of older code uses that style.  I've tried to use
double quotes in new messages, but have restrained myself from wholesale
changes of existing messages.

> More esoteric discussions are also possible, but I'm going to postpone
> those. ;-)  However, I think it's worth working on this and perhaps
> putting together a "manual of style" that applies to all parts of
> PostgreSQL.  This would significantly improve the overall perceived
> quality.

Sounds like a plan to me: put together a style guide first, and then
make a pass through the code to try to implement it.
        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


--ELM1026943457-25421-1_--


pgsql-hackers by date:

Previous
From: Mike Mascari
Date:
Subject: Re: [HACKERS] Backend error message style issues
Next
From: Mike Mascari
Date:
Subject: Re: Backend error message style issues