Tuesday, September 9, 2008

Re: [HACKERS] Verbosity of Function Return Type Checks

Volkan YAZICI wrote:
> On Mon, 8 Sep 2008, Alvaro Herrera <alvherre@commandprompt.com> writes:
> >> Modified as you suggested. BTW, will there be a similar i18n scenario
> >> for "dropped column" you mentioned below?
> >
> > Yes, you need _() around those too.
>
> For this purpose, I introduced a dropped_column_type variable in
> validate_tupdesc_compat() function:
>
> const char dropped_column_type[] = _("n/a (dropped column)");
>
> And used this in below fashion:
>
> OidIsValid(returned->attrs[i]->atttypid)
> ? format_type_be(returned->attrs[i]->atttypid)
> : dropped_column_type

I changed it to gettext_noop("the text") and _(dropped_column_type) in
errdetail, and committed it.

I'd still like to have a better way to word the message, and maybe have
this error appear in a regression test somewhere at least once ...

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

No comments: