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.
added tests for quoted schemas in search_path
- Loading branch information
Showing
4 changed files
with
174 additions
and
1 deletion.
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
7 changes: 7 additions & 0 deletions
7
src/test/resources/cz/startnet/utils/pgdiff/quoted_schema_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,7 @@ | ||
|
||
SET search_path = "ABC", pg_catalog; | ||
|
||
CREATE TABLE testtable2 ( | ||
id integer, | ||
name character varying(100) NOT NULL | ||
); |
92 changes: 92 additions & 0 deletions
92
src/test/resources/cz/startnet/utils/pgdiff/quoted_schema_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,92 @@ | ||
-- | ||
-- PostgreSQL database dump | ||
-- | ||
|
||
SET statement_timeout = 0; | ||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
SET check_function_bodies = false; | ||
SET client_min_messages = warning; | ||
|
||
-- | ||
-- Name: ABC; Type: SCHEMA; Schema: -; Owner: fordfrog | ||
-- | ||
|
||
CREATE SCHEMA "ABC"; | ||
|
||
|
||
ALTER SCHEMA "ABC" OWNER TO fordfrog; | ||
|
||
-- | ||
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: | ||
-- | ||
|
||
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; | ||
|
||
|
||
-- | ||
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: | ||
-- | ||
|
||
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; | ||
|
||
|
||
SET search_path = "ABC", pg_catalog; | ||
|
||
SET default_tablespace = ''; | ||
|
||
SET default_with_oids = false; | ||
|
||
-- | ||
-- Name: testtable; Type: TABLE; Schema: ABC; Owner: fordfrog; Tablespace: | ||
-- | ||
|
||
CREATE TABLE testtable ( | ||
field1 integer, | ||
field2 integer, | ||
field3 character varying(150) DEFAULT 'none'::character varying, | ||
field4 double precision | ||
); | ||
|
||
|
||
ALTER TABLE "ABC".testtable OWNER TO fordfrog; | ||
|
||
-- | ||
-- Name: testtable2; Type: TABLE; Schema: ABC; Owner: fordfrog; Tablespace: | ||
-- | ||
|
||
CREATE TABLE testtable2 ( | ||
id integer, | ||
name character varying(100) NOT NULL | ||
); | ||
|
||
|
||
ALTER TABLE "ABC".testtable2 OWNER TO fordfrog; | ||
|
||
-- | ||
-- Data for Name: testtable; Type: TABLE DATA; Schema: ABC; Owner: fordfrog | ||
-- | ||
|
||
COPY testtable (field1, field2, field3, field4) FROM stdin; | ||
\. | ||
|
||
|
||
-- | ||
-- Data for Name: testtable2; Type: TABLE DATA; Schema: ABC; Owner: fordfrog | ||
-- | ||
|
||
COPY testtable2 (id, name) FROM stdin; | ||
\. | ||
|
||
|
||
-- | ||
-- Name: testindex; Type: INDEX; Schema: ABC; Owner: fordfrog; Tablespace: | ||
-- | ||
|
||
CREATE INDEX testindex ON testtable USING btree (field3); | ||
|
||
|
||
-- | ||
-- PostgreSQL database dump complete | ||
-- | ||
|
72 changes: 72 additions & 0 deletions
72
src/test/resources/cz/startnet/utils/pgdiff/quoted_schema_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,72 @@ | ||
-- | ||
-- PostgreSQL database dump | ||
-- | ||
|
||
SET statement_timeout = 0; | ||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
SET check_function_bodies = false; | ||
SET client_min_messages = warning; | ||
|
||
-- | ||
-- Name: ABC; Type: SCHEMA; Schema: -; Owner: fordfrog | ||
-- | ||
|
||
CREATE SCHEMA "ABC"; | ||
|
||
|
||
ALTER SCHEMA "ABC" OWNER TO fordfrog; | ||
|
||
-- | ||
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: | ||
-- | ||
|
||
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; | ||
|
||
|
||
-- | ||
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: | ||
-- | ||
|
||
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; | ||
|
||
|
||
SET search_path = "ABC", pg_catalog; | ||
|
||
SET default_tablespace = ''; | ||
|
||
SET default_with_oids = false; | ||
|
||
-- | ||
-- Name: testtable; Type: TABLE; Schema: ABC; Owner: fordfrog; Tablespace: | ||
-- | ||
|
||
CREATE TABLE testtable ( | ||
field1 integer, | ||
field2 integer, | ||
field3 character varying(150) DEFAULT 'none'::character varying, | ||
field4 double precision | ||
); | ||
|
||
|
||
ALTER TABLE "ABC".testtable OWNER TO fordfrog; | ||
|
||
-- | ||
-- Data for Name: testtable; Type: TABLE DATA; Schema: ABC; Owner: fordfrog | ||
-- | ||
|
||
COPY testtable (field1, field2, field3, field4) FROM stdin; | ||
\. | ||
|
||
|
||
-- | ||
-- Name: testindex; Type: INDEX; Schema: ABC; Owner: fordfrog; Tablespace: | ||
-- | ||
|
||
CREATE INDEX testindex ON testtable USING btree (field3); | ||
|
||
|
||
-- | ||
-- PostgreSQL database dump complete | ||
-- | ||
|