Hi everyone,
Consider the following case:
CREATE TABLE t0(c0 boolean);
CREATE TABLE t1(c0 boolean) INHERITS(t0);
ALTER TABLE t0 ADD CHECK(t0.c0); -- unexpected: ERROR: missing
FROM-clause entry for table "t0"
Is it expected that this fails? Without a child table, this works as I
would expect. If this is expected, I think that the error message
could be misleading. It seems that the full-qualified c0 column (i.e.,
t0.c0) triggers this, because the following works:
CREATE TABLE t0(c0 boolean);
CREATE TABLE t1(c0 boolean) INHERITS(t0);
ALTER TABLE t0 ADD CHECK(c0); -- no error
Best,
Manuel