Re: Verbosity of Function Return Type Checks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Volkan YAZICI <yazicivo(at)ttmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Verbosity of Function Return Type Checks
Date: 2008-09-04 23:59:31
Message-ID: 9950.1220572771@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Benedek László 2008-09-05 00:42:15 Re: pg_dump roles support
Previous Message Tom Lane 2008-09-04 23:39:21 Re: Need more reviewers!