Re: wrong output in dump of rules with old values of row type columns - Mailing list pgsql-bugs

From Tom Lane
Subject Re: wrong output in dump of rules with old values of row type columns
Date
Msg-id 2996293.1642000125@sss.pgh.pa.us
Whole thread Raw
In response to wrong output in dump of rules with old values of row type columns  (Timur Khanjanov <intel@intrans.baku.az>)
Responses Re: wrong output in dump of rules with old values of row type columns  (Timur Khanjanov <intel@intrans.baku.az>)
List pgsql-bugs
Timur Khanjanov <intel@intrans.baku.az> writes:
> create table test(a int);
> create table test_log(old test);
> create rule del as on delete to test do insert into test_log values(old);

As a workaround you could write it as

create rule del as on delete to test do insert into test_log select old;

which will reverse-list as

ON DELETE TO test DO  INSERT INTO test_log (old)  SELECT old.*::test AS old

Looks like we need to apply the same hack in VALUES lists.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Pasi Eronen
Date:
Subject: Re: BUG #17362: Error "could not find block containing chunk" when using index with icu collation on CentOS 7
Next
From: Tom Lane
Date:
Subject: Re: BUG #17363: 14 regression: "could not identify a hash function for type record" in a nested record in sublink