Re: FOR EACH ROW triggers on partitioned tables
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Robert Haas <robertmhaas@gmail.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Pg Hackers <pgsql-hackers@postgresql.org>,
Simon Riggs <simon@2ndquadrant.com>
Date: 2018-03-12T02:13:13Z
Lists: pgsql-hackers
On Fri, Mar 9, 2018 at 7:06 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> Thomas Munro wrote:
>> +create trigger failed after update on parted_trig
>> + referencing old table as old_table
>> + for each statement execute procedure trigger_nothing();
>>
>> It doesn't fail as you apparently expected. Perhaps it was supposed
>> to be "for each row" so you could hit your new error with
>> errdetail("Triggers on partitioned tables cannot have transition
>> tables.")?
>
> You're absolutely right. Fixed in the attached version.
+create trigger failed after update on parted_trig
+ referencing old table as old_table
+ for each row execute procedure trigger_nothing();
+ERROR: "parted_trig" is a partitioned table
+DETAIL: Triggers on partitioned tables cannot have transition tables.
I think this should probably say "row-level". Statement-level
triggers on partitioned tables can have transition tables.
--
Thomas Munro
http://www.enterprisedb.com
Commits
-
Allow FOR EACH ROW triggers on partitioned tables
- 86f575948c77 11.0 landed
-
Fix CommandCounterIncrement in partition-related DDL
- 4dba331cb3dc 11.0 landed
-
Mention trigger name in trigger test
- cef60043dd27 11.0 landed
-
Fix transition tables for partition/inheritance.
- 501ed02cf6f4 10.0 cited