On Mon, Sep 15, 2025 at 11:48 AM Chao Li wrote:
>
> 3 - 0001
> ```
> + }
> + }
> + ReleaseSysCache(indexTuple);
> + }
> + CommandCounterIncrement();
> ```
>
> Why CommandCounterIncrement() is needed? In current code, there is a
> CommandCounterIncrement() after CatalogTupleUpdate(), which is nece
> index expression/predicate and check constraint expression can not contain
> subquery, that's why using pull_varattnos to test whole-row containment works
> fine. but pull_varattnos can not cope with subquery, see pull_varattnos
> comments.
>
> row security policy can have subquery, for exampl
On Thu, Sep 11, 2025 at 9:27 AM Chao Li wrote:
>
> But v2 needs a rebase, I cannot apply it to master.
>
hi.
please check attached v3-0001, v3-0002.
v3-0001: ALTER TABLE DROP COLUMN cascade to drop any whole-row
referenced constraints and indexes.
v3-0002: ALTER COLUMN SET DATA TYPE error out wh
> On Sep 9, 2025, at 11:12, jian he wrote:
>
> hi.
> I found a new way to solve this problem.
>
> CREATE TABLE ts (a int, c int, b int
>constraint cc check((ts = ROW(1,1,1))),
>constraint cc1 check((ts.a = 1)));
>
>
> ALTER TABLE ts DROP COLUMN a CASCADE;
> will drop above all indexe
hi.
I found a new way to solve this problem.
CREATE TABLE ts (a int, c int, b int
constraint cc check((ts = ROW(1,1,1))),
constraint cc1 check((ts.a = 1)));
for constraint cc, there is no extra dependency between column a and
constraint cc.
see find_expr_references_walker below comments:
hi.
CREATE TABLE ts (a int, c int, b int
constraint cc check((ts = ROW(1,1,1))),
constraint cc1 check((ts.a = 1)));
CREATE INDEX tsi on ts (a) where a = 1;
CREATE INDEX tsi2 on ts ((a is null));
CREATE INDEX tsi3 on ts ((ts is null));
CREATE INDEX tsi4 on ts (b) where ts is not null;
in t