Re: Add schema-qualified relnames in constraint error messages.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add schema-qualified relnames in constraint error messages.
Дата
Msg-id 1384.1452043312@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Add schema-qualified relnames in constraint error messages.  (Petr Korobeinikov <pkorobeinikov@gmail.com>)
Ответы Re: Add schema-qualified relnames in constraint error messages.  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
Petr Korobeinikov <pkorobeinikov@gmail.com> writes:
> At the moment schemas used as single-level namespaces.
> It's quite convenient in large databases.

> But error messages doesn’t contain schema names.

> I have done a little patch with schema-qualified relation names in error
> messages that produced by foreign key constraints and triggers.

We have gone around on this before and pretty much concluded we didn't
want to do it; the demand is too small and the risk of breaking things
too large.  In particular, your patch as presented *would* break every
application that is still parsing primary error messages to extract
object names from them.

What seems more likely to be useful and to not break anything is to push
forward on adding PG_DIAG_SCHEMA_NAME and similar auxiliary fields to more
error messages (see errtable() and siblings).  That would allow
applications to extract this information automatically and reliably.
Only after that work is complete and there's been a reasonable amount of
time for clients to start relying on it can we really start thinking about
whacking the message texts around.

Aside from those points, it's quite unacceptable to format qualified names
as you propose here; they would really have to look more like "foo"."bar"
to prevent confusion.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Haribabu Kommi
Дата:
Сообщение: Re: Multi-tenancy with RLS
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: No Issue Tracker - Say it Ain't So!