From: | Volkan YAZICI <yazicivo(at)ttmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Verbosity of Function Return Type Checks |
Date: | 2008-09-05 06:20:52 |
Message-ID: | 871vzzf70b.fsf@alamut.mobiliz.com.tr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 04 Sep 2008, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> This is not ready to go: you've lost the ability to localize most of
> the error message strings.
How can I make this available? What's your suggestion?
> Also, "char *msg" should be "const char *msg"
Done.
> 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.
Done.
> Actually, the entire concept of varying the main message to suit the
> context exactly, while the detail messages are *not* changing, seems
> pretty bogus...
I share your concerns but couldn't come up with a better approach. I'd
be happy to hear your suggestions.
> Another problem with it is it's likely going to fail completely on
> dropped columns (which will have atttypid = 0).
Is it ok if I'd replace
if (td1->attrs[i]->atttypid != td2->attrs[i]->atttypid)
line in validate_tupdesc_compat with
if (td1->attrs[i]->atttypid &&
td2->attrs[i]->atttypid &&
td1->attrs[i]->atttypid != td2->attrs[i]->atttypid)
expression to fix this?
Regards.
Attachment | Content-Type | Size |
---|---|---|
plpgsql_validate_tupdesc_compat.diff | text/x-diff | 5.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Hunsaker | 2008-09-05 06:32:16 | Re: hash index improving v3 |
Previous Message | Volkan YAZICI | 2008-09-05 06:15:19 | Re: Verbosity of Function Return Type Checks |