Re: constraints names on partitions

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: constraints names on partitions
Дата
Msg-id CA+Tgmobb9QTk+Q0LrpT_6470FkrdBoYk2haVv6JmZ2w_R7_tUQ@mail.gmail.com
обсуждение исходный текст
Ответ на constraints names on partitions  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: constraints names on partitions
Список pgsql-hackers
On Fri, Oct 12, 2018 at 12:39 PM Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> I just realized that the current code to assign constraint names to
> partitions is going against the SQL standard's idea that constraint
> names must be unique within a schema.  When a partition is created, the
> foreign key gets exactly the same name as the constraint in the parent
> table.

I guess I don't see the point in trying to do something about this in
the partition case but not any other case.  The standard may have a
rule here, but if we don't follow it in general, what benefit do we
get out of trying to sorta follow it in the specific case of
partitions with inherited foreign keys?  There's probably quite a bit
of work to do here to fix this properly - I seem to recall some
previous discussion where it didn't seem simple even to ensure that
constraint names were unique within a relation in certain corner
cases.

At any rate, -1 from me for inserting a fix like this between rc1 and final.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: WIP: "More fair" LWLocks
Следующее
От: Tom Lane
Дата:
Сообщение: Re: constraints names on partitions