------=_Part_6827_13618848.1210492670017
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,
On Sat, May 10, 2008 at 6:11 AM, Alex Hunsaker <badalex@[EMAIL PROTECTED]
> wrote:
> On Fri, May 9, 2008 at 5:37 PM, Tom Lane <tgl@[EMAIL PROTECTED]
> wrote:
> > "Alex Hunsaker" <badalex@[EMAIL PROTECTED]
> writes:
> >> [ patch to change inherited-check-constraint behavior ]
> >
> > Applied after rather heavy editorializations. You didn't do very well
on
> > getting it to work in multiple-inheritance scenarios, such as
> >
> > create table p (f1 int check (f1>0));
> > create table c1 (f2 int) inherits (p);
> > create table c2 (f3 int) inherits (p);
> > create table cc () inherits (c1,c2);
> >
> > Here the same constraint is multiply inherited. The base case as
above
> > worked okay, but adding the constraint to an existing inheritance tree
> > via ALTER TABLE, not so much.
>
> Ouch. Ok Ill (obviously) review what you committed so I can do a lot
> better next time.
> Thanks for muddling through it!
>
Ouchie indeed!
> I'm not sure if we ought to try to back-patch that --- it'd be a
> behavioral change with non-obvious implications. In the back branches,
> ADD CHECK followed by DROP CONSTRAINT will end up not deleting the
> child-table constraints, which is probably a bug but I wouldn't be
> surprised if applications were depending on the behavior.
Given the lack complaints it does not seem worth a back patch IMHO.
>
Yeah, same IMHO. I do hope we have covered things properly for inherited
check constraints by now. One minor thing that myself and Alex discussed
was
the usage of "child tables" in tablecmds.c, especially in error messages.
Again English is not my native language, but shouldn't that be worded as
"children tables"? Admittedly even this does not sound any better than
"child tables" though :). It is nit-picking really, but I can submit a
cleanup patch to reword this if the list thinks so..
Regards,
Nikhils
--
EnterpriseDB http://www.enterprisedb.com
------=_Part_6827_13618848.1210492670017
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<div>Hi, <br></div>
<div class="gmail_quote">On Sat, May 10, 2008 at 6:11 AM, Alex Hunsaker
<<a href="mailto:badalex@[EMAIL PROTECTED]
">badalex@[EMAIL PROTECTED]
>>
wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px
0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">On Fri, May 9, 2008 at 5:37 PM, Tom Lane <<a
href="mailto:tgl@[EMAIL PROTECTED]
">tgl@[EMAIL PROTECTED]
>> wrote:<br>>
"Alex Hunsaker" <<a
href="mailto:badalex@[EMAIL PROTECTED]
">badalex@[EMAIL PROTECTED]
>> writes:<br>
>> [ patch to change inherited-check-constraint behavior
]<br>><br>> Applied after rather heavy editorializations. You
didn't do very well on<br>> getting it to work in
multiple-inheritance scenarios, such as<br>
><br>> create table p (f1 int check
(f1>0));<br>> create table c1 (f2 int)
inherits (p);<br>> create table c2 (f3 int)
inherits (p);<br>> create table cc ()
inherits (c1,c2);<br>
><br>> Here the same constraint is multiply inherited. The
base case as above<br>> worked okay, but adding the constraint to an
existing inheritance tree<br>> via ALTER TABLE, not so
much.<br><br></div>Ouch. Ok Ill (obviously) review what you committed so I
can do a lot<br>
better next time.<br>Thanks for muddling through it!<br>
<div class="Ih2E3d"></div></blockquote>
<div> </div>
<div> </div>
<div>Ouchie indeed!</div>
<div><br>> I'm not sure if we ought to try to back-patch that ---
it'd be a<br>> behavioral change with non-obvious implications.
In the back branches,<br>> ADD CHECK followed by DROP CONSTRAINT
will end up not deleting the<br>
> child-table constraints, which is probably a bug but I wouldn't
be<br>> surprised if applications were depending on the
behavior.<br><br></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px
0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Given the lack complaints it does
not seem worth a back patch IMHO.<br></blockquote>
<div>Yeah, same IMHO. I do hope we have covered things properly for
inherited check constraints by now. One minor thing that myself and Alex
discussed was the usage of "child tables" in tablecmds.c,
especially in error messages. Again English is not my native language, but
shouldn't that be worded as "children tables"? Admittedly
even this does not sound any better than "child
tables" though :). It is nit-picking really, but I can submit a
cleanup patch to reword this if the list thinks so..</div>
<div> </div>
<div>Regards,</div>
<div>Nikhils<br>-- <br>EnterpriseDB <a
href="http://www.enterprisedb.com">http://www.enterprisedb.com</a>
</div></div>
------=_Part_6827_13618848.1210492670017--


|