Skip to content
Permalink
Browse files

fix psql

  • Loading branch information
3nids committed Aug 8, 2017
1 parent 70644d4 commit 310b4109f9c00f46a67e9ff17c6d7e1e6861271d
@@ -9,8 +9,6 @@ ccache -z

cd /root/QGIS

sleep 20

printf "[qgis_test]\nhost=postgres\nport=5432\ndbname=docker\nuser=docker\npassword=docker" > ~/.pg_service.conf
export PGUSER=docker
export PGHOST=postgres
@@ -1,5 +1,7 @@
#!/bin/sh

set -e

SCRIPTS="
tests/testdata/provider/testdata_pg.sql
tests/testdata/provider/testdata_pg_reltests.sql
@@ -12,5 +14,5 @@ SCRIPTS="
dropdb qgis_test 2> /dev/null || true
createdb qgis_test || exit 1
for f in ${SCRIPTS}; do
psql -q -f $f qgis_test --set ON_ERROR_STOP=1 || exit 1
psql --echo-errors -f $f qgis_test -v ON_ERROR_STOP=1
done
@@ -1,4 +1,5 @@
--

--
-- PostgreSQL database dump
--

@@ -30,7 +31,7 @@ SET default_with_oids = false;

--
-- TOC entry 171 (class 1259 OID 377761)
-- Name: someData; Type: TABLE; Schema: qgis_test; Owner: postgres; Tablespace:
-- Name: someData; Type: TABLE; Schema: qgis_test; Owner: postgres; Tablespace:
--

CREATE TABLE qgis_test."someData" (
@@ -92,7 +93,7 @@ INSERT INTO qgis_test."someDataCompound" ( key1, key2, pk, cnt, name, name2, num

--
-- TOC entry 3953 (class 2606 OID 377768)
-- Name: someData_pkey; Type: CONSTRAINT; Schema: qgis_test; Owner: postgres; Tablespace:
-- Name: someData_pkey; Type: CONSTRAINT; Schema: qgis_test; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY qgis_test."someData"
@@ -1,4 +1,5 @@
DROP TABLE IF EXISTS qgis_test.string_array;

DROP TABLE IF EXISTS qgis_test.string_array;

CREATE TABLE qgis_test.string_array
(
@@ -34,4 +35,3 @@ CREATE TABLE qgis_test.double_array
INSERT INTO qgis_test.double_array(value)
VALUES
('{1.1,2,-5.12345}');

@@ -1,4 +1,5 @@
CREATE EXTENSION IF NOT EXISTS hstore;

CREATE EXTENSION IF NOT EXISTS hstore;

DROP TABLE IF EXISTS qgis_test.dict;

@@ -1,4 +1,5 @@
-- Table: qgis_test.authors

-- Table: qgis_test.authors

DROP TABLE IF EXISTS qgis_test.books_authors;
DROP TABLE IF EXISTS qgis_test.authors;
@@ -40,7 +41,7 @@ CREATE TABLE qgis_test.books_authors
);

INSERT INTO qgis_test.authors(name)
VALUES
VALUES
('Erich Gamma'),
('Richard Helm'),
('Ralph Johnson'),
@@ -50,11 +51,11 @@ INSERT INTO qgis_test.authors(name)
('Gabriel García Márquez');

INSERT INTO qgis_test.books(name)
VALUES
VALUES
('Design Patterns. Elements of Reusable Object-Oriented Software');

INSERT INTO qgis_test.books_authors(fk_book, fk_author)
VALUES
VALUES
(1, 1),
(1, 2),
(1, 3),
@@ -1,4 +1,3 @@

--CREATE SCHEMA IF NOT EXISTS qgis_test;


@@ -34,4 +33,3 @@ CREATE TABLE qgis_test.table_x
value_x2 integer,
CONSTRAINT table_x_pkey PRIMARY KEY (id_x)
);

0 comments on commit 310b410

Please sign in to comment.
You can’t perform that action at this time.