From: Tom Lane <tgl@sss.pgh.pa.us>
To: Timur Khanjanov <intel@intrans.baku.az>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: wrong output in dump of rules with old values of row type columns
Date: Wed, 12 Jan 2022 10:08:45 -0500
Message-ID: <2996293.1642000125@sss.pgh.pa.us> (raw)
In-Reply-To: <efaba6f9-4190-56be-8ff2-7a1674f9194f@intrans.baku.az>
References: <efaba6f9-4190-56be-8ff2-7a1674f9194f@intrans.baku.az>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, intel@intrans.baku.az, pgsql-bugs@lists.postgresql.org
Subject: Re: wrong output in dump of rules with old values of row type columns
In-Reply-To: <2996293.1642000125@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox