forked from babelfish-for-postgresql/babelfish_extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test case for get_trigger_object_address_hook usage change
Signed-off-by: Alex Kasko <[email protected]>
- Loading branch information
1 parent
195044d
commit c3ae3f8
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- psql | ||
|
||
CREATE TABLE test1(id1 int); | ||
GO | ||
|
||
CREATE OR REPLACE FUNCTION func1() | ||
RETURNS "trigger" AS | ||
'BEGIN | ||
RETURN NEW; | ||
END;' | ||
LANGUAGE 'plpgsql' VOLATILE; | ||
GO | ||
|
||
CREATE TRIGGER trig1 BEFORE UPDATE | ||
ON test1 FOR EACH ROW | ||
EXECUTE PROCEDURE func1(); | ||
GO | ||
|
||
COMMENT ON TRIGGER trig1 ON test1 IS 'hello1'; | ||
GO | ||
|
||
DROP TRIGGER trig1 ON test1; | ||
GO | ||
DROP FUNCTION func1; | ||
GO | ||
DROP TABLE test1; | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- psql | ||
|
||
CREATE TABLE test1(id1 int); | ||
GO | ||
|
||
CREATE OR REPLACE FUNCTION func1() | ||
RETURNS "trigger" AS | ||
'BEGIN | ||
RETURN NEW; | ||
END;' | ||
LANGUAGE 'plpgsql' VOLATILE; | ||
GO | ||
|
||
CREATE TRIGGER trig1 BEFORE UPDATE | ||
ON test1 FOR EACH ROW | ||
EXECUTE PROCEDURE func1(); | ||
GO | ||
|
||
COMMENT ON TRIGGER trig1 ON test1 IS 'hello1'; | ||
GO | ||
|
||
DROP TRIGGER trig1 ON test1; | ||
GO | ||
DROP FUNCTION func1; | ||
GO | ||
DROP TABLE test1; | ||
GO |