summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomas Vondra2017-07-17 22:35:22 +0000
committerTomas Vondra2017-07-17 22:35:22 +0000
commitdde313c2ca36147f100ace69e85176f54106e5a4 (patch)
treeb4d1efecd7df218e7a3456e2b1a149d8c3f75981 /src
parentdb018ba24462e0bdc8670dff269ab228e0bd87d4 (diff)
Accept failures in triggers test du to unsupported features
Postgres-XL does not support triggers, naturally causing many failures in the triggers regression test. So treat the error messages as expected behavior and remove the NOTICEs produced by the triggers. Another failure was caused by INSERT in a subquery, which is another feature unsupported by Postgres-XL.
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/triggers.out207
1 files changed, 128 insertions, 79 deletions
diff --git a/src/test/regress/expected/triggers.out b/src/test/regress/expected/triggers.out
index b3df5f190b..45f33d768c 100644
--- a/src/test/regress/expected/triggers.out
+++ b/src/test/regress/expected/triggers.out
@@ -1520,19 +1520,15 @@ begin
end$$ language plpgsql;
create trigger trigger_ddl_func before insert on trigger_ddl_table for each row
execute procedure trigger_ddl_func();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
insert into trigger_ddl_table values (1, 42); -- fail
-ERROR: cannot ALTER TABLE "trigger_ddl_table" because it is being used by active queries in this session
-CONTEXT: SQL statement "alter table trigger_ddl_table add primary key (col1)"
-PL/pgSQL function trigger_ddl_func() line 3 at SQL statement
create or replace function trigger_ddl_func() returns trigger as $$
begin
create index on trigger_ddl_table (col2);
return new;
end$$ language plpgsql;
insert into trigger_ddl_table values (1, 42); -- fail
-ERROR: cannot CREATE INDEX "trigger_ddl_table" because it is being used by active queries in this session
-CONTEXT: SQL statement "create index on trigger_ddl_table (col2)"
-PL/pgSQL function trigger_ddl_func() line 3 at SQL statement
drop table trigger_ddl_table;
drop function trigger_ddl_func();
--
@@ -1612,8 +1608,8 @@ create view my_view as select * from my_table;
create function my_trigger_function() returns trigger as $$ begin end; $$ language plpgsql;
create trigger my_trigger after update on my_view referencing old table as old_table
for each statement execute procedure my_trigger_function();
-ERROR: "my_view" is a view
-DETAIL: Triggers on views cannot have transition tables.
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
drop function my_trigger_function();
drop view my_view;
drop table my_table;
@@ -1638,75 +1634,83 @@ create or replace function trigger_notice() returns trigger as $$
-- insert/update/delete statment-level triggers on the parent
create trigger trig_ins_before before insert on parted_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_ins_after after insert on parted_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_upd_before before update on parted_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_upd_after after update on parted_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_del_before before delete on parted_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_del_after after delete on parted_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
-- insert/update/delete row-level triggers on the first partition
create trigger trig_ins_before before insert on parted_stmt_trig1
for each row execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_ins_after after insert on parted_stmt_trig1
for each row execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_upd_before before update on parted_stmt_trig1
for each row execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_upd_after after update on parted_stmt_trig1
for each row execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
-- insert/update/delete statement-level triggers on the parent
create trigger trig_ins_before before insert on parted2_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_ins_after after insert on parted2_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_upd_before before update on parted2_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_upd_after after update on parted2_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_del_before before delete on parted2_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger trig_del_after after delete on parted2_stmt_trig
for each statement execute procedure trigger_notice();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
with ins (a) as (
insert into parted2_stmt_trig values (1), (2) returning a
) insert into parted_stmt_trig select a from ins returning tableoid::regclass, a;
-NOTICE: trigger on parted_stmt_trig BEFORE INSERT for STATEMENT
-NOTICE: trigger on parted2_stmt_trig BEFORE INSERT for STATEMENT
-NOTICE: trigger on parted_stmt_trig1 BEFORE INSERT for ROW
-NOTICE: trigger on parted_stmt_trig1 AFTER INSERT for ROW
-NOTICE: trigger on parted2_stmt_trig AFTER INSERT for STATEMENT
-NOTICE: trigger on parted_stmt_trig AFTER INSERT for STATEMENT
- tableoid | a
--------------------+---
- parted_stmt_trig1 | 1
- parted_stmt_trig2 | 2
-(2 rows)
-
+ERROR: INSERT/UPDATE/DELETE is not supported in subquery
with upd as (
update parted2_stmt_trig set a = a
) update parted_stmt_trig set a = a;
-NOTICE: trigger on parted_stmt_trig BEFORE UPDATE for STATEMENT
-NOTICE: trigger on parted_stmt_trig1 BEFORE UPDATE for ROW
-NOTICE: trigger on parted2_stmt_trig BEFORE UPDATE for STATEMENT
-NOTICE: trigger on parted_stmt_trig1 AFTER UPDATE for ROW
-NOTICE: trigger on parted_stmt_trig AFTER UPDATE for STATEMENT
-NOTICE: trigger on parted2_stmt_trig AFTER UPDATE for STATEMENT
+ERROR: INSERT/UPDATE/DELETE is not supported in subquery
delete from parted_stmt_trig;
-NOTICE: trigger on parted_stmt_trig BEFORE DELETE for STATEMENT
-NOTICE: trigger on parted_stmt_trig AFTER DELETE for STATEMENT
-- insert via copy on the parent
copy parted_stmt_trig(a) from stdin;
-NOTICE: trigger on parted_stmt_trig BEFORE INSERT for STATEMENT
-NOTICE: trigger on parted_stmt_trig1 BEFORE INSERT for ROW
-NOTICE: trigger on parted_stmt_trig1 AFTER INSERT for ROW
-NOTICE: trigger on parted_stmt_trig AFTER INSERT for STATEMENT
-- insert via copy on the first partition
copy parted_stmt_trig1(a) from stdin;
-NOTICE: trigger on parted_stmt_trig1 BEFORE INSERT for ROW
-NOTICE: trigger on parted_stmt_trig1 AFTER INSERT for ROW
drop table parted_stmt_trig, parted2_stmt_trig;
--
-- Test the interaction between transition tables and both kinds of
@@ -1761,86 +1765,105 @@ alter table parent attach partition child3 for values in ('CCC');
create trigger parent_insert_trig
after insert on parent referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger parent_update_trig
after update on parent referencing old table as old_table new table as new_table
for each statement execute procedure dump_update();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger parent_delete_trig
after delete on parent referencing old table as old_table
for each statement execute procedure dump_delete();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child1_insert_trig
after insert on child1 referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child1_update_trig
after update on child1 referencing old table as old_table new table as new_table
for each statement execute procedure dump_update();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child1_delete_trig
after delete on child1 referencing old table as old_table
for each statement execute procedure dump_delete();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child2_insert_trig
after insert on child2 referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child2_update_trig
after update on child2 referencing old table as old_table new table as new_table
for each statement execute procedure dump_update();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child2_delete_trig
after delete on child2 referencing old table as old_table
for each statement execute procedure dump_delete();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child3_insert_trig
after insert on child3 referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child3_update_trig
after update on child3 referencing old table as old_table new table as new_table
for each statement execute procedure dump_update();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child3_delete_trig
after delete on child3 referencing old table as old_table
for each statement execute procedure dump_delete();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
-- insert directly into children sees respective child-format tuples
insert into child1 values ('AAA', 42);
-NOTICE: trigger = child1_insert_trig, new table = (AAA,42)
insert into child2 values ('BBB', 42);
-NOTICE: trigger = child2_insert_trig, new table = (BBB,42)
insert into child3 values (42, 'CCC');
-NOTICE: trigger = child3_insert_trig, new table = (42,CCC)
-- update via parent sees parent-format tuples
update parent set b = b + 1;
-NOTICE: trigger = parent_update_trig, old table = (AAA,42), (BBB,42), (CCC,42), new table = (AAA,43), (BBB,43), (CCC,43)
-- delete via parent sees parent-format tuples
delete from parent;
-NOTICE: trigger = parent_delete_trig, old table = (AAA,43), (BBB,43), (CCC,43)
-- insert into parent sees parent-format tuples
insert into parent values ('AAA', 42);
-NOTICE: trigger = parent_insert_trig, new table = (AAA,42)
insert into parent values ('BBB', 42);
-NOTICE: trigger = parent_insert_trig, new table = (BBB,42)
insert into parent values ('CCC', 42);
-NOTICE: trigger = parent_insert_trig, new table = (CCC,42)
-- delete from children sees respective child-format tuples
delete from child1;
-NOTICE: trigger = child1_delete_trig, old table = (AAA,42)
delete from child2;
-NOTICE: trigger = child2_delete_trig, old table = (BBB,42)
delete from child3;
-NOTICE: trigger = child3_delete_trig, old table = (42,CCC)
-- copy into parent sees parent-format tuples
copy parent (a, b) from stdin;
-NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,42)
-- DML affecting parent sees tuples collected from children even if
-- there is no transition table trigger on the children
drop trigger child1_insert_trig on child1;
+ERROR: trigger "child1_insert_trig" for table "child1" does not exist
drop trigger child1_update_trig on child1;
+ERROR: trigger "child1_update_trig" for table "child1" does not exist
drop trigger child1_delete_trig on child1;
+ERROR: trigger "child1_delete_trig" for table "child1" does not exist
drop trigger child2_insert_trig on child2;
+ERROR: trigger "child2_insert_trig" for table "child2" does not exist
drop trigger child2_update_trig on child2;
+ERROR: trigger "child2_update_trig" for table "child2" does not exist
drop trigger child2_delete_trig on child2;
+ERROR: trigger "child2_delete_trig" for table "child2" does not exist
drop trigger child3_insert_trig on child3;
+ERROR: trigger "child3_insert_trig" for table "child3" does not exist
drop trigger child3_update_trig on child3;
+ERROR: trigger "child3_update_trig" for table "child3" does not exist
drop trigger child3_delete_trig on child3;
+ERROR: trigger "child3_delete_trig" for table "child3" does not exist
delete from parent;
-NOTICE: trigger = parent_delete_trig, old table = (AAA,42), (BBB,42), (CCC,42)
-- copy into parent sees tuples collected from children even if there
-- is no transition-table trigger on the children
copy parent (a, b) from stdin;
-NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,42)
-- insert into parent with a before trigger on a child tuple before
-- insertion, and we capture the newly modified row in parent format
create or replace function intercept_insert() returns trigger language plpgsql as
@@ -1853,12 +1876,12 @@ $$;
create trigger intercept_insert_child3
before insert on child3
for each row execute procedure intercept_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
-- insert, parent trigger sees post-modification parent-format tuple
insert into parent values ('AAA', 42), ('BBB', 42), ('CCC', 66);
-NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,1066)
-- copy, parent trigger sees post-modification parent-format tuple
copy parent (a, b) from stdin;
-NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,1234)
drop table child1, child2, child3, parent;
drop function intercept_insert();
--
@@ -1871,18 +1894,20 @@ create table child partition of parent for values in ('AAA');
create trigger child_row_trig
after insert on child referencing new table as new_table
for each row execute procedure dump_insert();
-ERROR: ROW triggers with transition tables are not supported on partitions
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
-- detaching it first works
alter table parent detach partition child;
create trigger child_row_trig
after insert on child referencing new table as new_table
for each row execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
-- but now we're not allowed to reattach it
alter table parent attach partition child for values in ('AAA');
-ERROR: trigger "child_row_trig" prevents table "child" from becoming a partition
-DETAIL: ROW triggers with transition tables are not supported on partitions
-- drop the trigger, and now we're allowed to attach it again
drop trigger child_row_trig on child;
+ERROR: trigger "child_row_trig" for table "child" does not exist
alter table parent attach partition child for values in ('AAA');
drop table child, parent;
--
@@ -1903,88 +1928,107 @@ create table child3 (c text) inherits (parent);
create trigger parent_insert_trig
after insert on parent referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger parent_update_trig
after update on parent referencing old table as old_table new table as new_table
for each statement execute procedure dump_update();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger parent_delete_trig
after delete on parent referencing old table as old_table
for each statement execute procedure dump_delete();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child1_insert_trig
after insert on child1 referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child1_update_trig
after update on child1 referencing old table as old_table new table as new_table
for each statement execute procedure dump_update();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child1_delete_trig
after delete on child1 referencing old table as old_table
for each statement execute procedure dump_delete();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child2_insert_trig
after insert on child2 referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child2_update_trig
after update on child2 referencing old table as old_table new table as new_table
for each statement execute procedure dump_update();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child2_delete_trig
after delete on child2 referencing old table as old_table
for each statement execute procedure dump_delete();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child3_insert_trig
after insert on child3 referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child3_update_trig
after update on child3 referencing old table as old_table new table as new_table
for each statement execute procedure dump_update();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger child3_delete_trig
after delete on child3 referencing old table as old_table
for each statement execute procedure dump_delete();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
-- insert directly into children sees respective child-format tuples
insert into child1 values ('AAA', 42);
-NOTICE: trigger = child1_insert_trig, new table = (AAA,42)
insert into child2 values (42, 'BBB');
-NOTICE: trigger = child2_insert_trig, new table = (42,BBB)
insert into child3 values ('CCC', 42, 'foo');
-NOTICE: trigger = child3_insert_trig, new table = (CCC,42,foo)
-- update via parent sees parent-format tuples
update parent set b = b + 1;
-NOTICE: trigger = parent_update_trig, old table = (AAA,42), (BBB,42), (CCC,42), new table = (AAA,43), (BBB,43), (CCC,43)
-- delete via parent sees parent-format tuples
delete from parent;
-NOTICE: trigger = parent_delete_trig, old table = (AAA,43), (BBB,43), (CCC,43)
-- reinsert values into children for next test...
insert into child1 values ('AAA', 42);
-NOTICE: trigger = child1_insert_trig, new table = (AAA,42)
insert into child2 values (42, 'BBB');
-NOTICE: trigger = child2_insert_trig, new table = (42,BBB)
insert into child3 values ('CCC', 42, 'foo');
-NOTICE: trigger = child3_insert_trig, new table = (CCC,42,foo)
-- delete from children sees respective child-format tuples
delete from child1;
-NOTICE: trigger = child1_delete_trig, old table = (AAA,42)
delete from child2;
-NOTICE: trigger = child2_delete_trig, old table = (42,BBB)
delete from child3;
-NOTICE: trigger = child3_delete_trig, old table = (CCC,42,foo)
-- copy into parent sees parent-format tuples (no rerouting, so these
-- are really inserted into the parent)
copy parent (a, b) from stdin;
-NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,42)
-- same behavior for copy if there is an index (interesting because rows are
-- captured by a different code path in copy.c if there are indexes)
create index on parent(b);
copy parent (a, b) from stdin;
-NOTICE: trigger = parent_insert_trig, new table = (DDD,42)
-- DML affecting parent sees tuples collected from children even if
-- there is no transition table trigger on the children
drop trigger child1_insert_trig on child1;
+ERROR: trigger "child1_insert_trig" for table "child1" does not exist
drop trigger child1_update_trig on child1;
+ERROR: trigger "child1_update_trig" for table "child1" does not exist
drop trigger child1_delete_trig on child1;
+ERROR: trigger "child1_delete_trig" for table "child1" does not exist
drop trigger child2_insert_trig on child2;
+ERROR: trigger "child2_insert_trig" for table "child2" does not exist
drop trigger child2_update_trig on child2;
+ERROR: trigger "child2_update_trig" for table "child2" does not exist
drop trigger child2_delete_trig on child2;
+ERROR: trigger "child2_delete_trig" for table "child2" does not exist
drop trigger child3_insert_trig on child3;
+ERROR: trigger "child3_insert_trig" for table "child3" does not exist
drop trigger child3_update_trig on child3;
+ERROR: trigger "child3_update_trig" for table "child3" does not exist
drop trigger child3_delete_trig on child3;
+ERROR: trigger "child3_delete_trig" for table "child3" does not exist
delete from parent;
-NOTICE: trigger = parent_delete_trig, old table = (AAA,42), (BBB,42), (CCC,42), (DDD,42)
drop table child1, child2, child3, parent;
--
-- Verify prohibition of row triggers with transition triggers on
@@ -1996,19 +2040,22 @@ create table child () inherits (parent);
create trigger child_row_trig
after insert on child referencing new table as new_table
for each row execute procedure dump_insert();
-ERROR: ROW triggers with transition tables are not supported on inheritance children
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
-- disinheriting it first works
alter table child no inherit parent;
create trigger child_row_trig
after insert on child referencing new table as new_table
for each row execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
-- but now we're not allowed to make it inherit anymore
alter table child inherit parent;
-ERROR: trigger "child_row_trig" prevents table "child" from becoming an inheritance child
-DETAIL: ROW triggers with transition tables are not supported in inheritance hierarchies
-- drop the trigger, and now we're allowed to make it inherit again
drop trigger child_row_trig on child;
+ERROR: trigger "child_row_trig" for table "child" does not exist
alter table child inherit parent;
+ERROR: relation "parent" would be inherited from more than once
drop table child, parent;
--
-- Verify behavior of queries with wCTEs, where multiple transition
@@ -2021,13 +2068,16 @@ create table table2 (a text);
create trigger table1_trig
after insert on table1 referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger table2_trig
after insert on table2 referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
with wcte as (insert into table1 values (42))
insert into table2 values ('hello world');
-NOTICE: trigger = table2_trig, new table = ("hello world")
-NOTICE: trigger = table1_trig, new table = (42)
+ERROR: INSERT/UPDATE/DELETE is not supported in subquery
drop table table1;
drop table table2;
--
@@ -2038,27 +2088,25 @@ create table my_table (a int primary key, b text);
create trigger my_table_insert_trig
after insert on my_table referencing new table as new_table
for each statement execute procedure dump_insert();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
create trigger my_table_update_trig
after update on my_table referencing old table as old_table new table as new_table
for each statement execute procedure dump_update();
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
-- inserts only
insert into my_table values (1, 'AAA'), (2, 'BBB')
on conflict (a) do
update set b = my_table.b || ':' || excluded.b;
-NOTICE: trigger = my_table_update_trig, old table = <NULL>, new table = <NULL>
-NOTICE: trigger = my_table_insert_trig, new table = (1,AAA), (2,BBB)
-- mixture of inserts and updates
insert into my_table values (1, 'AAA'), (2, 'BBB'), (3, 'CCC'), (4, 'DDD')
on conflict (a) do
update set b = my_table.b || ':' || excluded.b;
-NOTICE: trigger = my_table_update_trig, old table = (1,AAA), (2,BBB), new table = (1,AAA:AAA), (2,BBB:BBB)
-NOTICE: trigger = my_table_insert_trig, new table = (3,CCC), (4,DDD)
-- updates only
insert into my_table values (3, 'CCC'), (4, 'DDD')
on conflict (a) do
update set b = my_table.b || ':' || excluded.b;
-NOTICE: trigger = my_table_update_trig, old table = (3,CCC), (4,DDD), new table = (3,CCC:CCC), (4,DDD:DDD)
-NOTICE: trigger = my_table_insert_trig, new table = <NULL>
--
-- Verify that you can't create a trigger with transition tables for
-- more than one event.
@@ -2066,7 +2114,8 @@ NOTICE: trigger = my_table_insert_trig, new table = <NULL>
create trigger my_table_multievent_trig
after insert or update on my_table referencing new table as new_table
for each statement execute procedure dump_insert();
-ERROR: Transition tables cannot be specified for triggers with more than one event
+ERROR: Postgres-XL does not support TRIGGER yet
+DETAIL: The feature is not currently supported
drop table my_table;
-- cleanup
drop function dump_insert();