Skip to content

Commit

Permalink
Add tests for Support Postgresql 12 -Add support for FUNCTION in CREA…
Browse files Browse the repository at this point in the history
…TE TRIGGER fordfrog#273 alexander-smyslov
  • Loading branch information
jalisson committed May 10, 2020
1 parent f2e986e commit b512284
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/test/java/cz/startnet/utils/pgdiff/PgDiffTest.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ public static Collection<?> parameters() {
{"drop_trigger", false, false, false, false},
// Tests scenario where TRIGGER is modified.
{"modify_trigger", false, false, false, false},
{"create_trigger_postgres12", false, false, false, false},
// Tests scenario where VIEW is added.
{"add_view", false, false, false, false},
// Tests scenario where VIEW is dropped.
Expand Down
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();
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
--

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
--

0 comments on commit b512284

Please sign in to comment.