From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT |
Date: | 2019-01-18 18:08:33 |
Message-ID: | 201901181808.5srgir3zfzhc@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 2019-Jan-17, Alvaro Herrera wrote:
> Well, the whole point of my proposal is that the FK-creating code
> recurses to partitions by calling ATAddForeignKeyConstraint, and IMO
> that's the wrong level to recurse at; we should instead recurse by
> calling clone_fk_constraints() as a whole. That's not readibly possible
> with the current code arrangement because of layering, but after
> backpatching (as attached) the two patches I mentioned, I end up with
> the following, which I think is much cleaner. (Also, this code layout
> plays much better with my project to continue to extend FKs so that they
> are allowed to point to partitioned tables; see the other thread).
>
> The attached patches are for pg11; they don't apply to master. The
> changes are uninteresting.
Pushed this.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Nithyanantham Shanmugam (nithshan) | 2019-01-18 19:20:33 | pg_upgrade issue in windows 7 |
Previous Message | Tom Lane | 2019-01-18 16:45:02 | Re: BUG #15598: PostgreSQL Error Code is not reported when connection terminated due to idle-in-transaction timeout |