Re: wrong output in dump of rules with old values of row type columns

Timur Khanjanov <intel@intrans.baku.az>

From: Timur Khanjanov <intel@intrans.baku.az>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2022-01-12T16:59:52Z
Lists: pgsql-bugs
On 12.01.2022 19:08, Tom Lane wrote:
> 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
thank you for workaround,
I'm already find another workaround
(just script, modyfing dump, not universal, but works for me ;)

Hope that in next version it 'll be fixed.


-- 
Homo Homini Dominus est



Commits

  1. Fix ruleutils.c's dumping of whole-row Vars in more contexts.