Re: Verbosity of Function Return Type Checks - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Verbosity of Function Return Type Checks
Date
Msg-id 9950.1220572771@sss.pgh.pa.us
Whole thread Raw
In response to Re: Verbosity of Function Return Type Checks  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Verbosity of Function Return Type Checks
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> I wasn't able to run the tests in contrib, I don't know why, and I have
> to go out now.  I'll commit this tomorrow.

This is not ready to go: you've lost the ability to localize most of the
error message strings.  Also, "char *msg" should be "const char *msg"
if you're going to pass literal constants to it, and this gives me
the willies even though the passed-in strings are supposedly all fixed:    errmsg(msg),
Use    errmsg("%s", msg),
to be safe.

Actually, the entire concept of varying the main message to suit the
context exactly, while the detail messages are *not* changing, seems
pretty bogus...

Another problem with it is it's likely going to fail completely on
dropped columns (which will have atttypid = 0).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Need more reviewers!
Next
From: Benedek László
Date:
Subject: Re: pg_dump roles support