Re: problems with foreign keys on partitioned tables

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: problems with foreign keys on partitioned tables
Дата
Msg-id 201901241637.joxln3ew2ysm@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: problems with foreign keys on partitioned tables  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-hackers
On 2019-Jan-25, Amit Langote wrote:

> On Fri, Jan 25, 2019 at 12:30 AM Amit Langote <amitlangote09@gmail.com> wrote:

> > Doesn't the following performDeletion() at the start of
> > ATExecDropConstraint(), through findDependentObject()'s own recursion,
> > take care of deleting *all* constraints, including those of?
> 
> Meant to say: "...including those of the grandchildren?"
> 
> >         /*
> >          * Perform the actual constraint deletion
> >          */
> >         conobj.classId = ConstraintRelationId;
> >         conobj.objectId = con->oid;
> >         conobj.objectSubId = 0;
> >
> >         performDeletion(&conobj, behavior, 0);

Of course it does when the dependencies are set up -- but in the
approach we just gave up on, those dependencies would not exist.
Anyway, my motivation was that performMultipleDeletions has the
advantage that it collects all objects to be dropped before deleting
anyway, and so the error that a constraint was dropped in a previous
recursion step would not occur.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PSA: we lack TAP test coverage on NetBSD and OpenBSD
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: PSA: we lack TAP test coverage on NetBSD and OpenBSD