Re: Rows removed on child table when updating parent partitioned table. - Mailing list pgsql-general

From Jonathan Strong
Subject Re: Rows removed on child table when updating parent partitioned table.
Date
Msg-id CAK8Y=HUHZxj1_r3z4k2uOEUFMGYv7WvqAhD-b-v9TKeUpxAAFQ@mail.gmail.com
Whole thread Raw
In response to Re: Rows removed on child table when updating parent partitioned table.  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general

On Thu, Oct 1, 2020 at 2:02 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
The convention on these lists is to inline or bottom-post, please do not top-post.

On Thu, Oct 1, 2020 at 10:41 AM Jonathan Strong <jonathanrstrong@gmail.com> wrote:
I've been away from coding for several years, but dusting off my chops and getting back up to speed with PostgreSQL (love it!). So please forgive me if my early answers here come off as naive. But my understanding of this suggests that you shouldn't be using "update" on a serial field.

Yes Jonathan, your present understanding is flawed.  The OP has provided a self-contained simple test case for the problem at hand - which even if not "best practice" is indeed valid to do and demonstrates the problem quite clearly.  Without actually testing it out I would say that this is likely indeed an oversight in the partition row movement feature - it didn't take into account the ON UPDATE/ON DELETE clause.

 Understood - thx. I'll watch and learn for a while. Thanks as well for the list etiquette advice. I'll endeavor to follow convention.

- Jon

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Rows removed on child table when updating parent partitioned table.
Next
From: tutiluren@tutanota.com
Date:
Subject: Re: Can I get some PostgreSQL developer feedback on these five general issues I have with PostgreSQL and its ecosystem?