Simon Riggs <[EMAIL PROTECTED]> writes:
> On Mon, 2006-06-12 at 17:39 -0400, Greg Stark wrote:
> > Points I'm uncertain about:
> > . I throw an elog() error if there's a null conbin for a CHECK constraint.
> > Is
> > it possible for a valid CHECK constraint structure to have a null conbin?
> ruleutils shows: elog(ERROR, "null conbin for constraint %u"
I'm unclear what you mean by this. This doesn't look like what I would expect
the error to look like if it was triggered. And the "%u" makes it appear as if
the name of the constraint it "%u" which is passing strange too.
How do I reproduce this?
> > I added some basic (very basic) regression tests
> Should we fail if columns in the wrong order from the parent? I thought
> that was one of the restrictions you discovered?
I don't think we can complain about wrongly ordered columns. Tom pointed out
something as simple as adding more columns to the parent can create a
non-standard ordering since it adds them after the local columns. And in any
case verifying the order in complicated cases involving multiple parents and
locally defined columns would be nigh impossible anyways.
> Can we test for
> ALTER TABLE child NO INHERIT parent1 INHERIT parent2
> That was on Hannu's wish list.
> Is INHERIT allowed or disallowed with other ALTER TABLE options?
> If it is allowed, can we test for something that will fail and something
> that would pass, e.g. ALTER TABLE DROP column1 INHERITS parent -- where
> the parent passes on column1.
Both those two cases both work, so you just want more regression tests?
Note that operations aren't done in a strictly left-to-right order. For
instance ADD/DROP columns are done before INHERIT/NO INHERIT.
And "ALTER TABLE child NO INHERIT parent 1, INHERIT parent2" will treat
attislocal subtly different from the reverse.
> When I read those tests, it makes me think this should be INHERITS and
> NOT INHERITS (not great English, but then neither is NO INHERIT).
> ISTM it might become confusing between INHERITS and INHERIT.
None of these syntaxes are particularly more or less appealing than any other
to me. I'm still trying to think of something better.
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster