diff options
author | Andrew Gierth | 2017-06-28 17:55:03 +0000 |
---|---|---|
committer | Andrew Gierth | 2017-06-28 17:55:03 +0000 |
commit | 501ed02cf6f4f60c3357775eb07578aebc912d3a (patch) | |
tree | 6811c9e9181dfff5ae384b9ec69994de2b777a2b /doc/src | |
parent | 99255d73c07c89b69be028a1a7b8027a78befed4 (diff) |
Fix transition tables for partition/inheritance.
We disallow row-level triggers with transition tables on child tables.
Transition tables for triggers on the parent table contain only those
columns present in the parent. (We can't mix tuple formats in a
single transition table.)
Patch by Thomas Munro
Discussion: https://postgr.es/m/CA%2BTgmoZzTBBAsEUh4MazAN7ga%3D8SsMC-Knp-6cetts9yNZUCcg%40mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/create_trigger.sgml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml index c5f7c75838..18efe6a9ed 100644 --- a/doc/src/sgml/ref/create_trigger.sgml +++ b/doc/src/sgml/ref/create_trigger.sgml @@ -459,6 +459,20 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ </para> <para> + Modifying a partitioned table or a table with inheritance children fires + statement-level triggers directly attached to that table, but not + statement-level triggers for its partitions or child tables. In contrast, + row-level triggers are fired for all affected partitions or child tables. + If a statement-level trigger has been defined with transition relations + named by a <literal>REFERENCING</literal> clause, then before and after + images of rows are visible from all affected partitions or child tables. + In the case of inheritance children, the row images include only columns + that are present in the table that the trigger is attached to. Currently, + row-level triggers with transition relations cannot be defined on + partitions or inheritance child tables. + </para> + + <para> In <productname>PostgreSQL</productname> versions before 7.3, it was necessary to declare trigger functions as returning the placeholder type <type>opaque</>, rather than <type>trigger</>. To support loading |