forked from fordfrog/apgdiff
-
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 tests for Support Postgresql 12 -Add support for FUNCTION in CREA…
…TE TRIGGER fordfrog#273 alexander-smyslov
- Loading branch information
jalisson
committed
May 10, 2020
1 parent
f2e986e
commit b512284
Showing
4 changed files
with
152 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
14 changes: 14 additions & 0 deletions
14
src/test/resources/cz/startnet/utils/pgdiff/create_trigger_postgres12_diff.sql
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,14 @@ | ||
|
||
SET search_path = schema_1, pg_catalog; | ||
|
||
CREATE TABLE IF NOT EXISTS tb_teste3 ( | ||
id integer, | ||
description character varying | ||
); | ||
|
||
ALTER TABLE tb_teste3 OWNER TO postgres; | ||
|
||
CREATE TRIGGER trg_testview_after_insert | ||
AFTER INSERT ON tb_teste3 | ||
FOR EACH ROW | ||
EXECUTE PROCEDURE public.fn_trg_testview(); |
78 changes: 78 additions & 0 deletions
78
src/test/resources/cz/startnet/utils/pgdiff/create_trigger_postgres12_new.sql
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,78 @@ | ||
-- | ||
-- PostgreSQL database dump | ||
-- | ||
|
||
-- Dumped from database version 12.2 | ||
-- Dumped by pg_dump version 12.2 | ||
|
||
SET statement_timeout = 0; | ||
SET lock_timeout = 0; | ||
SET idle_in_transaction_session_timeout = 0; | ||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
SELECT pg_catalog.set_config('search_path', '', false); | ||
SET check_function_bodies = false; | ||
SET xmloption = content; | ||
SET client_min_messages = warning; | ||
SET row_security = off; | ||
|
||
-- | ||
-- Name: schema_1; Type: SCHEMA; Schema: -; Owner: postgres | ||
-- | ||
|
||
CREATE SCHEMA schema_1; | ||
|
||
|
||
ALTER SCHEMA schema_1 OWNER TO postgres; | ||
|
||
SET default_tablespace = ''; | ||
|
||
SET default_table_access_method = heap; | ||
|
||
-- | ||
-- Name: tb_teste1; Type: TABLE; Schema: schema_1; Owner: postgres | ||
-- | ||
|
||
CREATE TABLE schema_1.tb_teste1 ( | ||
id integer, | ||
description character varying | ||
); | ||
|
||
|
||
ALTER TABLE schema_1.tb_teste1 OWNER TO postgres; | ||
|
||
-- | ||
-- Name: tb_teste2; Type: TABLE; Schema: schema_1; Owner: postgres | ||
-- | ||
|
||
CREATE TABLE schema_1.tb_teste2 ( | ||
id integer, | ||
description character varying | ||
); | ||
|
||
|
||
ALTER TABLE schema_1.tb_teste2 OWNER TO postgres; | ||
|
||
-- | ||
-- Name: tb_teste3; Type: TABLE; Schema: schema_1; Owner: postgres | ||
-- | ||
|
||
CREATE TABLE schema_1.tb_teste3 ( | ||
id integer, | ||
description character varying | ||
); | ||
|
||
|
||
ALTER TABLE schema_1.tb_teste3 OWNER TO postgres; | ||
|
||
-- | ||
-- Name: tb_teste3 trg_testview_after_insert; Type: TRIGGER; Schema: schema_1; Owner: postgres | ||
-- | ||
|
||
CREATE TRIGGER trg_testview_after_insert AFTER INSERT ON schema_1.tb_teste3 FOR EACH ROW EXECUTE FUNCTION public.fn_trg_testview(); | ||
|
||
|
||
-- | ||
-- PostgreSQL database dump complete | ||
-- | ||
|
59 changes: 59 additions & 0 deletions
59
src/test/resources/cz/startnet/utils/pgdiff/create_trigger_postgres12_original.sql
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,59 @@ | ||
-- | ||
-- PostgreSQL database dump | ||
-- | ||
|
||
-- Dumped from database version 12.2 | ||
-- Dumped by pg_dump version 12.2 | ||
|
||
SET statement_timeout = 0; | ||
SET lock_timeout = 0; | ||
SET idle_in_transaction_session_timeout = 0; | ||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
SELECT pg_catalog.set_config('search_path', '', false); | ||
SET check_function_bodies = false; | ||
SET xmloption = content; | ||
SET client_min_messages = warning; | ||
SET row_security = off; | ||
|
||
-- | ||
-- Name: schema_1; Type: SCHEMA; Schema: -; Owner: postgres | ||
-- | ||
|
||
CREATE SCHEMA schema_1; | ||
|
||
|
||
ALTER SCHEMA schema_1 OWNER TO postgres; | ||
|
||
SET default_tablespace = ''; | ||
|
||
SET default_table_access_method = heap; | ||
|
||
-- | ||
-- Name: tb_teste1; Type: TABLE; Schema: schema_1; Owner: postgres | ||
-- | ||
|
||
CREATE TABLE schema_1.tb_teste1 ( | ||
id integer, | ||
description character varying | ||
); | ||
|
||
|
||
ALTER TABLE schema_1.tb_teste1 OWNER TO postgres; | ||
|
||
-- | ||
-- Name: tb_teste2; Type: TABLE; Schema: schema_1; Owner: postgres | ||
-- | ||
|
||
CREATE TABLE schema_1.tb_teste2 ( | ||
id integer, | ||
description character varying | ||
); | ||
|
||
|
||
ALTER TABLE schema_1.tb_teste2 OWNER TO postgres; | ||
|
||
-- | ||
-- PostgreSQL database dump complete | ||
-- | ||
|