Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-28 Thread Amit Langote
On Wed, Nov 27, 2024 at 12:53 AM Alvaro Herrera wrote: > On 2024-Nov-20, Amit Langote wrote: > > On Tue, Nov 19, 2024 at 6:41 PM Alvaro Herrera > > wrote: > > > Here's an example that I think matches the above description, which, > > ISTM, leads to a state similar to what one would encounter wit

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-26 Thread Alvaro Herrera
On 2024-Nov-20, Amit Langote wrote: > On Tue, Nov 19, 2024 at 6:41 PM Alvaro Herrera > wrote: > Here's an example that I think matches the above description, which, > ISTM, leads to a state similar to what one would encounter with my > patch as described earlier: > > create table parent (a int

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-20 Thread Amit Langote
On Tue, Nov 19, 2024 at 6:41 PM Alvaro Herrera wrote: > On 2024-Nov-14, Amit Langote wrote: > > > Sorry, here's the full example. Note I'd changed both > > AddRelationNotNullConstraints() and AdjustNotNullInheritance() to not > > throw an error *if* the table is a leaf partition when the NO INHER

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-19 Thread Alvaro Herrera
On 2024-Nov-14, Amit Langote wrote: > Sorry, here's the full example. Note I'd changed both > AddRelationNotNullConstraints() and AdjustNotNullInheritance() to not > throw an error *if* the table is a leaf partition when the NO INHERIT > of an existing constraint doesn't match that of the new con

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-14 Thread Amit Langote
On Wed, Nov 13, 2024 at 10:49 PM Alvaro Herrera wrote: > On 2024-Nov-13, Amit Langote wrote: > > > I rebased my patch over 14e87ffa5c54 and noticed that NOT NULL > > constraints can also (or not) be marked NO INHERIT. I think we should > > allow NO INHERIT NOT NULL constraints on leaf partitions

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-13 Thread Alvaro Herrera
On 2024-Nov-13, Amit Langote wrote: > I rebased my patch over 14e87ffa5c54 and noticed that NOT NULL > constraints can also (or not) be marked NO INHERIT. I think we should > allow NO INHERIT NOT NULL constraints on leaf partitions just like > CHECK constraints, so changed AddRelationNotNullConst

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-13 Thread Amit Langote
On Tue, Nov 12, 2024 at 5:46 PM Alvaro Herrera wrote: > On 2024-Nov-11, Amit Langote wrote: > > > The restriction also exists in the CREATE TABLE PARTITION OF path: > > > > [...] > > > > I think we can remove the restriction at least for the leaf partition > > case just like in the ATTACH PARTITIO

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-12 Thread Alvaro Herrera
On 2024-Nov-11, Amit Langote wrote: > The restriction also exists in the CREATE TABLE PARTITION OF path: > > [...] > > I think we can remove the restriction at least for the leaf partition > case just like in the ATTACH PARTITION path. Sure, WFM. -- Álvaro Herrera 48°01'N 7°57'E

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-10 Thread Amit Langote
On Fri, Nov 8, 2024 at 2:54 AM Alvaro Herrera wrote: > On 2024-Nov-07, Amit Langote wrote: > > > On Wed, Nov 6, 2024 at 9:34 PM Alvaro Herrera > > wrote: > > > > Oh, hmm, that makes sense I guess. Still, while this restriction makes > > > sense for inheritance, it doesn't IMO for partitioned ta

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-07 Thread Alvaro Herrera
On 2024-Nov-07, Amit Langote wrote: > On Wed, Nov 6, 2024 at 9:34 PM Alvaro Herrera wrote: > > Oh, hmm, that makes sense I guess. Still, while this restriction makes > > sense for inheritance, it doesn't IMO for partitioned tables. I would > > even suggest that we drop enforcement of this rest

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-07 Thread Amit Langote
On Wed, Nov 6, 2024 at 9:34 PM Alvaro Herrera wrote: > On 2024-Nov-06, Amit Langote wrote: > > On Tue, Nov 5, 2024 at 9:01 PM Alvaro Herrera > > wrote: > > > While doing final review for not-null constraints, I noticed that the > > > ALTER TABLE ATTACH PARTITION have this phrase: > > > > > >

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-06 Thread Alvaro Herrera
On 2024-Nov-06, Amit Langote wrote: > On Tue, Nov 5, 2024 at 9:01 PM Alvaro Herrera wrote: > > While doing final review for not-null constraints, I noticed that the > > ALTER TABLE ATTACH PARTITION have this phrase: > > > > If any of the CHECK constraints of the table being attached are mark

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-05 Thread Amit Langote
Hi Alvaro, On Tue, Nov 5, 2024 at 9:01 PM Alvaro Herrera wrote: > > Hello, > > While doing final review for not-null constraints, I noticed that the > ALTER TABLE ATTACH PARTITION have this phrase: > > If any of the CHECK constraints of the table being attached are marked NO > INHERIT, th

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-05 Thread Alvaro Herrera
On 2024-Nov-05, Alvaro Herrera wrote: > All in all, I think this text serves no purpose and should be removed > (from all live branches), as in the attached patch. Attached here. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/ "Los cuentos de hadas no dan al niñ

doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-05 Thread Alvaro Herrera
Hello, While doing final review for not-null constraints, I noticed that the ALTER TABLE ATTACH PARTITION have this phrase: If any of the CHECK constraints of the table being attached are marked NO INHERIT, the command will fail; such constraints must be recreated without the NO INHE