Re: ALTER command reworks
От | Kohei KaiGai |
---|---|
Тема | Re: ALTER command reworks |
Дата | |
Msg-id | CADyhKSWVqaA6iF5wVuW5EzLaiYyCYEE2zO9guqNKy8FRdLx5Gw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: ALTER command reworks (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: ALTER command reworks
|
Список | pgsql-hackers |
2013/1/7 Alvaro Herrera <alvherre@2ndquadrant.com>: > Tom Lane escribió: >> Robert Haas <robertmhaas@gmail.com> writes: >> > On Mon, Jan 7, 2013 at 3:43 PM, Alvaro Herrera <alvherre@2ndquadrant.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 >> http://www.postgresql.org/docs/devel/static/nls-programmer.html#NLS-GUIDELINES > > 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. Thanks, -- KaiGai Kohei <kaigai@kaigai.gr.jp>
Вложения
В списке pgsql-hackers по дате отправления: