summaryrefslogtreecommitdiff
path: root/libpqpp/unittests/pqschema.sql
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-09-24 03:02:07 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-09-24 03:06:06 +0100
commitf8317be5c2b2f6d31622d863a41646fa456afbbe (patch)
tree6124ba5d953fea59f5b8e6132261003f258e49cf /libpqpp/unittests/pqschema.sql
parentConnector compatibility fix (diff)
downloadlibdbpp-postgresql-f8317be5c2b2f6d31622d863a41646fa456afbbe.tar.bz2
libdbpp-postgresql-f8317be5c2b2f6d31622d863a41646fa456afbbe.tar.xz
libdbpp-postgresql-f8317be5c2b2f6d31622d863a41646fa456afbbe.zip
PostgreSQL mocking and tests from Project2
Diffstat (limited to 'libpqpp/unittests/pqschema.sql')
-rw-r--r--libpqpp/unittests/pqschema.sql37
1 files changed, 37 insertions, 0 deletions
diff --git a/libpqpp/unittests/pqschema.sql b/libpqpp/unittests/pqschema.sql
new file mode 100644
index 0000000..80d9183
--- /dev/null
+++ b/libpqpp/unittests/pqschema.sql
@@ -0,0 +1,37 @@
+--
+-- pg_dump style comment
+-- Table: test; owner: comment: ;
+--
+
+/*
+ This is
+ a
+ multiline comment */
+
+CREATE TABLE test(
+ id int,
+ fl numeric(5,2),
+ string text,
+ boolean bool,
+ dt timestamp without time zone,
+ ts interval);
+
+INSERT INTO test VALUES(4, 123.45, 'some text with a ; in it and a '' too', true, '2015-04-27 23:06:03', '1 day 14:13:12');
+
+CREATE TABLE test2(
+ path text not null);
+
+INSERT INTO test2 VALUES('$SCRIPTDIR/pqschema.sql');
+
+CREATE FUNCTION event_tsvector() RETURNS int
+LANGUAGE sql STABLE
+AS $tag$
+ SELECT max(id)
+ FROM test
+ WHERE string != 'complex '' string;';
+$tag$;
+
+CREATE TABLE bulktest(
+ id int,
+ string text);
+