scripts, to allow running the test successfully with another database name.
PREPARE q2(text) AS
SELECT datname, datistemplate, datallowconn
FROM pg_database WHERE datname = $1;
-EXECUTE q2('regression');
- datname | datistemplate | datallowconn
-------------+---------------+--------------
- regression | f | t
+EXECUTE q2('postgres');
+ datname | datistemplate | datallowconn
+----------+---------------+--------------
+ postgres | f | t
(1 row)
PREPARE q3(text, int, float, boolean, oid, smallint) AS
(1 row)
-- clean up
-\c regression
+\c
DROP FUNCTION testfunc2(int);
DROP FUNCTION testfunc4(boolean);
DROP VIEW atestv1;
DROP TABLE temptest;
-- test temp table deletion
CREATE TEMP TABLE temptest(col int);
-\c regression
+\c
SELECT * FROM temptest;
ERROR: relation "temptest" does not exist
-- Test ON COMMIT DELETE ROWS
SELECT datname, datistemplate, datallowconn
FROM pg_database WHERE datname = $1;
-EXECUTE q2('regression');
+EXECUTE q2('postgres');
PREPARE q3(text, int, float, boolean, oid, smallint) AS
SELECT * FROM tenk1 WHERE string4 = $1 AND (four = $2 OR
-- clean up
-\c regression
+\c
DROP FUNCTION testfunc2(int);
DROP FUNCTION testfunc4(boolean);
CREATE TEMP TABLE temptest(col int);
-\c regression
+\c
SELECT * FROM temptest;