2013/1/7 Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>:
> Tom Lane escribió:
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> > On Mon, Jan 7, 2013 at 3:43 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>> >> If this is considered a problem, I think the way to fix it is to have a
>> >> getObjectDescriptionOids() variant that quotes the object name in the
>> >> output.
>> > This sort of thing has been rejected repeatedly in the past on
>> > translation grounds:
>> Yes. I'm surprised Alvaro isn't well aware of the rules against trying
>> to build error messages out of sentence fragments: see first item under
> Actually I'm fully aware of the limitations; I just had a brain fade. I
> knew there was something wrong with that usage of getObjectDescription,
> but managed to miss what it was exactly. Doh. Thankfully there are
> other hackers paying attention.
> BTW this patch was correct in this regard in a previous version -- there
> was one separate copy of the error message per object type. I think
> it's just a matter of returning to that older coding.
The attached patch is a rebased version towards the latest master
branch, and fix up the issue around error messages on name conflicts.
I could also find an abused of getObjectDescription() for error message
of namespace conflicts at AlterObjectNamespace_internal().
The newly added ereport_on_namespace_conflict() can handle the
both of cases, so I also replaced it.
As we have a discussion in another thread, we may add special case
handling for functions and collation on checks on namespace conflicts,
however, I didn't tough code path of them, right now.
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>
In response to
pgsql-hackers by date
|Next:||From: Heikki Linnakangas||Date: 2013-01-09 11:46:53|
|Subject: Re: [PATCH] unified frontend support for pg_malloc et al
and palloc/pfree mulation (was xlogreader-v4)|
|Previous:||From: Peter Eisentraut||Date: 2013-01-09 11:28:32|
|Subject: information schema parameter_default implementation|