Module Expr Str ImportFrom alias ImportFrom alias alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore BinOpMod Str NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr NameLoad attr If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Dict Str Dict Str Str Str Str Str ListLoad Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Dict Str Dict Str Str Str Str Str ListLoad Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Dict Str Dict Str Str Str Str Str Str ListLoad Str Str ListLoad Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Dict Str Dict Str Str Str Str Str Str ListLoad Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad NameLoad Str BinOpMod Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Dict Str Dict Str Str Str Str Str ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Index Str Index Str Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr NameLoad attr If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Dict Str Dict Str Str Str Str Str NameLoad Str ListLoad Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Dict Str Dict Str Str Str Str Str Str Str NameLoad NameLoad NameLoad Str ListLoad Str Str Str Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr NameLoad attr If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Str Str ListLoad Str Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Str Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Str Dict Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Str Str Dict Str Dict Str Str Str Str Str ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num BinOpMod Str NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Dict Str Str Dict Str Str Str Str Str NameLoad Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq SubscriptLoad NameLoad Index Num Str Assert CompareEq SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Str Str Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Str Str Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Str Str Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad ListLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr NameLoad attr If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Str NameLoad Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str Str Str Str NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Str Str Str NameLoad NameLoad NameLoad Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list decorator_list
N/A N/A Test triggers pyrseas.testutils DatabaseToMapTestCase pyrseas.testutils InputMapToSqlTestCase fix_indent N/A FUNC_SRC BEGIN NEW.c3 := CURRENT_TIMESTAMP; RETURN NEW; END N/A FUNC_INSTEAD_SRC BEGIN INSERT INTO t1 VALUES (NEW.c1, NEW.c2, now()); RETURN NULL; END N/A CREATE_TABLE_STMT CREATE TABLE t1 (c1 integer, c2 text, c3 timestamp with time zone) N/A CREATE_FUNC_STMT N/A CREATE FUNCTION f1() RETURNS trigger LANGUAGE plpgsql AS $_$%s$_$ FUNC_SRC N/A CREATE_STMT CREATE TRIGGER tr1 BEFORE INSERT OR UPDATE ON t1 FOR EACH ROW EXECUTE PROCEDURE f1() N/A DROP_TABLE_STMT DROP TABLE IF EXISTS t1 N/A DROP_FUNC_STMT DROP FUNCTION IF EXISTS f1() N/A COMMENT_STMT COMMENT ON TRIGGER tr1 ON t1 IS 'Test trigger tr1' TriggerToMapTestCase N/A DatabaseToMapTestCase N/A N/A Test mapping of existing triggers setUp N/A N/A self N/A N/A N/A N/A N/A N/A super N/A self __class__ self setUp N/A N/A N/A N/A self db version 90000 N/A N/A N/A N/A N/A N/A self db is_plpgsql_installed N/A N/A N/A N/A N/A self db execute_commit CREATE LANGUAGE plpgsql N/A test_map_trigger N/A N/A self N/A N/A N/A Map a simple trigger N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE_STMT N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A triggers N/A tr1 N/A timing events level procedure before N/A insert update row f1() N/A test_map_trigger2 N/A N/A self N/A N/A N/A Map another simple trigger with different attributes N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE TRIGGER tr1 AFTER DELETE OR TRUNCATE ON t1 EXECUTE PROCEDURE f1() N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A triggers N/A tr1 N/A timing events level procedure after N/A delete truncate statement f1() N/A test_map_trigger_update_cols N/A N/A self N/A N/A N/A Map trigger with UPDATE OF columns N/A N/A N/A N/A self db version 90000 N/A N/A N/A N/A self skipTest Only available on PG 9.0 N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE TRIGGER tr1 AFTER INSERT OR UPDATE OF c1, c2 ON t1 FOR EACH ROW EXECUTE PROCEDURE f1() N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A triggers N/A tr1 N/A timing events columns level procedure after N/A insert update N/A c1 c2 row f1() N/A test_map_trigger_conditional N/A N/A self N/A N/A N/A Map trigger with a WHEN qualification N/A N/A N/A N/A self db version 90000 N/A N/A N/A N/A self skipTest Only available on PG 9.0 N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE TRIGGER tr1 AFTER UPDATE ON t1 FOR EACH ROW WHEN (OLD.c2 IS DISTINCT FROM NEW.c2) EXECUTE PROCEDURE f1() N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A triggers N/A tr1 N/A timing events level procedure condition after N/A update row f1() (old.c2 IS DISTINCT FROM new.c2) N/A test_map_trigger_instead N/A N/A self N/A N/A N/A Map an INSTEAD OF trigger N/A N/A N/A N/A self db version 90100 N/A N/A N/A N/A self skipTest Only available on PG 9.1 N/A stmts N/A CREATE_TABLE_STMT CREATE VIEW v1 AS SELECT c1, c2 FROM t1 N/A CREATE FUNCTION f1() RETURNS trigger LANGUAGE plpgsql AS $_$%s$_$ FUNC_INSTEAD_SRC CREATE TRIGGER tr1 INSTEAD OF INSERT ON v1 FOR EACH ROW EXECUTE PROCEDURE f1() N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A N/A dbmap N/A schema public N/A view v1 N/A triggers N/A tr1 N/A timing events level procedure instead of N/A insert row f1() N/A test_map_trigger_comment N/A N/A self N/A N/A N/A Map a trigger comment N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE_STMT COMMENT_STMT N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A triggers N/A tr1 N/A description Test trigger tr1 N/A N/A ConstraintTriggerToMapTestCase N/A DatabaseToMapTestCase N/A N/A Test mapping of existing constraint triggers setUp N/A N/A self N/A N/A N/A N/A N/A N/A super N/A self __class__ self setUp N/A N/A N/A N/A self db version 90000 N/A N/A N/A N/A N/A N/A self db is_plpgsql_installed N/A N/A N/A N/A N/A self db execute_commit CREATE LANGUAGE plpgsql N/A test_map_trigger N/A N/A self N/A N/A N/A Map a simple constraint trigger N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE CONSTRAINT TRIGGER tr1 AFTER INSERT OR UPDATE ON t1 FOR EACH ROW EXECUTE PROCEDURE f1() N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A triggers N/A tr1 N/A constraint timing events level procedure True after N/A insert update row f1() N/A test_map_trigger_deferrable N/A N/A self N/A N/A N/A Map a deferrable, initially deferred constraint trigger N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE CONSTRAINT TRIGGER tr1 AFTER INSERT OR UPDATE ON t1 DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE f1() N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A triggers N/A tr1 N/A constraint deferrable initially_deferred timing events level procedure True True True after N/A insert update row f1() N/A N/A TriggerToSqlTestCase N/A InputMapToSqlTestCase N/A N/A Test SQL generation from input triggers setUp N/A N/A self N/A N/A N/A N/A N/A N/A super N/A self __class__ self setUp N/A N/A N/A N/A self db version 90000 N/A N/A N/A N/A N/A N/A self db is_plpgsql_installed N/A N/A N/A N/A N/A self db execute_commit CREATE LANGUAGE plpgsql N/A test_create_trigger N/A N/A self N/A N/A N/A Create a simple trigger N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A timing events level procedure before N/A insert update row f1() N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 1 CREATE_FUNC_STMT N/A N/A N/A fix_indent N/A sql N/A 2 CREATE_TABLE_STMT N/A N/A N/A fix_indent N/A sql N/A 3 CREATE_STMT N/A test_create_trigger2 N/A N/A self N/A N/A N/A Create another simple trigger with N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A timing events procedure after N/A delete truncate f1() N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 1 CREATE_FUNC_STMT N/A N/A N/A fix_indent N/A sql N/A 2 CREATE_TABLE_STMT N/A N/A N/A fix_indent N/A sql N/A 3 CREATE TRIGGER tr1 AFTER DELETE OR TRUNCATE ON t1 FOR EACH STATEMENT EXECUTE PROCEDURE f1() N/A test_create_trigger_update_cols N/A N/A self N/A N/A N/A Create a trigger with UPDATE OF columns N/A N/A N/A N/A self db version 90000 N/A N/A N/A N/A self skipTest Only available on PG 9.0 N/A inmap N/A N/A self std_map N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A timing events columns level procedure before N/A insert update N/A c1 c2 row f1() N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 1 CREATE_FUNC_STMT N/A N/A N/A fix_indent N/A sql N/A 2 CREATE_TABLE_STMT N/A N/A N/A fix_indent N/A sql N/A 3 CREATE TRIGGER tr1 BEFORE INSERT OR UPDATE OF c1, c2 ON t1 FOR EACH ROW EXECUTE PROCEDURE f1() N/A test_create_trigger_conditional N/A N/A self N/A N/A N/A Create a trigger with a WHEN qualification N/A N/A N/A N/A self db version 90000 N/A N/A N/A N/A self skipTest Only available on PG 9.0 N/A inmap N/A N/A self std_map N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A timing events level procedure condition before N/A update row f1() (old.c2 IS DISTINCT FROM new.c2) N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 1 CREATE_FUNC_STMT N/A N/A N/A fix_indent N/A sql N/A 2 CREATE_TABLE_STMT N/A N/A N/A fix_indent N/A sql N/A 3 CREATE TRIGGER tr1 BEFORE UPDATE ON t1 FOR EACH ROW WHEN ((old.c2 IS DISTINCT FROM new.c2)) EXECUTE PROCEDURE f1() N/A test_create_trigger_instead N/A N/A self N/A N/A N/A Create an INSTEAD OF trigger N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_INSTEAD_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 view v1 N/A columns N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A definition triggers SELECT c1, c2 FROM t1 N/A tr1 N/A timing events level procedure instead of N/A insert row f1() N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 1 N/A CREATE FUNCTION f1() RETURNS trigger LANGUAGE plpgsql AS $_$%s$_$ FUNC_INSTEAD_SRC N/A N/A N/A fix_indent N/A sql N/A 2 CREATE_TABLE_STMT N/A N/A N/A fix_indent N/A sql N/A 3 CREATE VIEW v1 AS SELECT c1, c2 FROM t1 N/A N/A N/A fix_indent N/A sql N/A 4 CREATE TRIGGER tr1 INSTEAD OF INSERT ON v1 FOR EACH ROW EXECUTE PROCEDURE f1() N/A test_create_trigger_in_schema N/A N/A self N/A N/A N/A Create a trigger within a non-public schema N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A inmap update N/A schema s1 N/A function f1() table t1 N/A language returns source plpgsql trigger FUNC_SRC N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A timing events level procedure before N/A insert update row f1() N/A sql N/A N/A self to_sql inmap N/A CREATE SCHEMA s1 N/A N/A N/A fix_indent N/A sql N/A 3 CREATE TRIGGER tr1 BEFORE INSERT OR UPDATE ON s1.t1 FOR EACH ROW EXECUTE PROCEDURE f1() N/A test_drop_trigger N/A N/A self N/A N/A N/A Drop an existing trigger N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE_STMT N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A sql N/A N/A self to_sql inmap stmts N/A N/A sql N/A DROP TRIGGER tr1 ON t1 N/A test_drop_trigger_table N/A N/A self N/A N/A N/A Drop an existing trigger and the related table N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE_STMT N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A sql N/A 0 DROP TRIGGER tr1 ON t1 N/A N/A N/A sql N/A 1 DROP TABLE t1 N/A test_trigger_with_comment N/A N/A self N/A N/A N/A Create a trigger with a comment N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A description timing events level procedure Test trigger tr1 before N/A insert update row f1() N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 1 CREATE_FUNC_STMT N/A N/A N/A fix_indent N/A sql N/A 2 CREATE_TABLE_STMT N/A N/A N/A fix_indent N/A sql N/A 3 CREATE_STMT N/A N/A N/A sql N/A 4 COMMENT_STMT N/A test_comment_on_trigger N/A N/A self N/A N/A N/A Create a comment on an existing trigger N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE_STMT N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A description timing events level procedure Test trigger tr1 before N/A insert update row f1() N/A sql N/A N/A self to_sql inmap stmts N/A N/A sql N/A COMMENT_STMT N/A test_drop_trigger_comment N/A N/A self N/A N/A N/A Drop a comment on an existing trigger N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE_STMT COMMENT_STMT N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A timing events level procedure before N/A insert update row f1() N/A sql N/A N/A self to_sql inmap stmts N/A N/A sql N/A COMMENT ON TRIGGER tr1 ON t1 IS NULL N/A test_change_trigger_comment N/A N/A self N/A N/A N/A Change existing comment on a trigger N/A stmts N/A CREATE_TABLE_STMT CREATE_FUNC_STMT CREATE_STMT COMMENT_STMT N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A description timing events level procedure Changed trigger tr1 before N/A insert update row f1() N/A sql N/A N/A self to_sql inmap stmts N/A N/A sql N/A COMMENT ON TRIGGER tr1 ON t1 IS 'Changed trigger tr1' N/A N/A ConstraintTriggerToSqlTestCase N/A InputMapToSqlTestCase N/A N/A Test SQL generation from input triggers setUp N/A N/A self N/A N/A N/A N/A N/A N/A super N/A self __class__ self setUp N/A N/A N/A N/A self db version 90000 N/A N/A N/A N/A N/A N/A self db is_plpgsql_installed N/A N/A N/A N/A N/A self db execute_commit CREATE LANGUAGE plpgsql N/A test_create_trigger N/A N/A self N/A N/A N/A Create a constraint trigger N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A constraint timing events level procedure True after N/A insert update row f1() N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 1 CREATE_FUNC_STMT N/A N/A N/A fix_indent N/A sql N/A 2 CREATE_TABLE_STMT N/A N/A N/A fix_indent N/A sql N/A 3 CREATE CONSTRAINT TRIGGER tr1 AFTER INSERT OR UPDATE ON t1 FOR EACH ROW EXECUTE PROCEDURE f1() N/A test_create_trigger_deferrable N/A N/A self N/A N/A N/A Create a deferrable constraint trigger N/A inmap N/A N/A self std_map plpgsql_installed True N/A N/A N/A N/A inmap N/A schema public update N/A function f1() N/A language returns source plpgsql trigger FUNC_SRC N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns triggers N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c3 N/A type timestamp with time zone N/A tr1 N/A constraint deferrable initially_deferred timing events level procedure True True True after N/A insert update row f1() N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 1 CREATE_FUNC_STMT N/A N/A N/A fix_indent N/A sql N/A 2 CREATE_TABLE_STMT N/A N/A N/A fix_indent N/A sql N/A 3 CREATE CONSTRAINT TRIGGER tr1 AFTER INSERT OR UPDATE ON t1 DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE f1() N/A N/A