-# $PostgreSQL: pgsql/contrib/contrib-global.mk,v 1.8 2004/07/30 12:26:39 petere Exp $
+# $PostgreSQL: pgsql/contrib/contrib-global.mk,v 1.9 2005/05/17 18:26:22 tgl Exp $
NO_PGXS = 1
+REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB)
include $(top_srcdir)/src/makefiles/pgxs.mk
-- regular old dblink
SELECT *
-FROM dblink('dbname=regression','SELECT * FROM foo') AS t(a int, b text, c text[])
+FROM dblink('dbname=contrib_regression','SELECT * FROM foo') AS t(a int, b text, c text[])
WHERE t.a > 7;
a | b | c
---+---+------------
WHERE t.a > 7;
ERROR: connection not available
-- create a persistent connection
-SELECT dblink_connect('dbname=regression');
+SELECT dblink_connect('dbname=contrib_regression');
dblink_connect
----------------
OK
ERROR: connection not available
-- put more data into our slave table, first using arbitrary connection syntax
-- but truncate the actual return value so we can use diff to check for success
-SELECT substr(dblink_exec('dbname=regression','INSERT INTO foo VALUES(10,''k'',''{"a10","b10","c10"}'')'),1,6);
+SELECT substr(dblink_exec('dbname=contrib_regression','INSERT INTO foo VALUES(10,''k'',''{"a10","b10","c10"}'')'),1,6);
substr
--------
INSERT
(1 row)
-- create a persistent connection
-SELECT dblink_connect('dbname=regression');
+SELECT dblink_connect('dbname=contrib_regression');
dblink_connect
----------------
OK
DETAIL: missing "=" after "myconn" in connection info string
-- create a named persistent connection
-SELECT dblink_connect('myconn','dbname=regression');
+SELECT dblink_connect('myconn','dbname=contrib_regression');
dblink_connect
----------------
OK
-- create a second named persistent connection
-- should error with "duplicate connection name"
-SELECT dblink_connect('myconn','dbname=regression');
+SELECT dblink_connect('myconn','dbname=contrib_regression');
ERROR: duplicate connection name
-- create a second named persistent connection with a new name
-SELECT dblink_connect('myconn2','dbname=regression');
+SELECT dblink_connect('myconn2','dbname=contrib_regression');
dblink_connect
----------------
OK
DETAIL: missing "=" after "myconn" in connection info string
-- create a named persistent connection
-SELECT dblink_connect('myconn','dbname=regression');
+SELECT dblink_connect('myconn','dbname=contrib_regression');
dblink_connect
----------------
OK
-- regular old dblink
SELECT *
-FROM dblink('dbname=regression','SELECT * FROM foo') AS t(a int, b text, c text[])
+FROM dblink('dbname=contrib_regression','SELECT * FROM foo') AS t(a int, b text, c text[])
WHERE t.a > 7;
-- should generate "connection not available" error
WHERE t.a > 7;
-- create a persistent connection
-SELECT dblink_connect('dbname=regression');
+SELECT dblink_connect('dbname=contrib_regression');
-- use the persistent connection
SELECT *
-- put more data into our slave table, first using arbitrary connection syntax
-- but truncate the actual return value so we can use diff to check for success
-SELECT substr(dblink_exec('dbname=regression','INSERT INTO foo VALUES(10,''k'',''{"a10","b10","c10"}'')'),1,6);
+SELECT substr(dblink_exec('dbname=contrib_regression','INSERT INTO foo VALUES(10,''k'',''{"a10","b10","c10"}'')'),1,6);
-- create a persistent connection
-SELECT dblink_connect('dbname=regression');
+SELECT dblink_connect('dbname=contrib_regression');
-- put more data into our slave table, using persistent connection syntax
-- but truncate the actual return value so we can use diff to check for success
WHERE t.a > 7;
-- create a named persistent connection
-SELECT dblink_connect('myconn','dbname=regression');
+SELECT dblink_connect('myconn','dbname=contrib_regression');
-- use the named persistent connection
SELECT *
-- create a second named persistent connection
-- should error with "duplicate connection name"
-SELECT dblink_connect('myconn','dbname=regression');
+SELECT dblink_connect('myconn','dbname=contrib_regression');
-- create a second named persistent connection with a new name
-SELECT dblink_connect('myconn2','dbname=regression');
+SELECT dblink_connect('myconn2','dbname=contrib_regression');
-- use the second named persistent connection
SELECT *
WHERE t.a > 7;
-- create a named persistent connection
-SELECT dblink_connect('myconn','dbname=regression');
+SELECT dblink_connect('myconn','dbname=contrib_regression');
-- put more data into our slave table, using named persistent connection syntax
-- but truncate the actual return value so we can use diff to check for success
# -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.213 2005/03/25 23:22:53 momjian Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.214 2005/05/17 18:26:22 tgl Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
GZIP = gzip
BZIP2 = bzip2
+PL_TESTDB = pl_regression
+CONTRIB_TESTDB = contrib_regression
+
# Installation.
INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c
# PGXS: PostgreSQL extensions makefile
-# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.3 2004/10/10 16:13:03 tgl Exp $
+# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.4 2005/05/17 18:26:22 tgl Exp $
# This file contains generic rules to build many kinds of simple
# extension modules. You only need to set a few variables and include
# against installed postmaster
installcheck: submake
- $(top_builddir)/src/test/regress/pg_regress $(REGRESS)
+ $(SHELL) $(top_builddir)/src/test/regress/pg_regress $(REGRESS_OPTS) $(REGRESS)
# in-tree test doesn't work yet (no way to install my shared library)
#check: all submake
-# $(top_builddir)/src/test/regress/pg_regress --temp-install \
-# --top-builddir=$(top_builddir) $(REGRESS)
+# $(SHELL) $(top_builddir)/src/test/regress/pg_regress --temp-install \
+# --top-builddir=$(top_builddir) $(REGRESS_OPTS) $(REGRESS)
check:
@echo "'make check' is not supported."
@echo "Do 'make install', then 'make installcheck' instead."
# Makefile for PL/Perl
-# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.19 2005/05/14 17:55:20 tgl Exp $
+# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.20 2005/05/17 18:26:22 tgl Exp $
subdir = src/pl/plperl
top_builddir = ../../..
SHLIB_LINK = $(perl_embed_ldflags) $(BE_DLLLIBS)
+REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plperl
REGRESS = plperl
include $(top_srcdir)/src/Makefile.shlib
rm -f $(DESTDIR)$(pkglibdir)/plperl$(DLSUFFIX)
installcheck: submake
- $(SHELL) $(top_builddir)/src/test/regress/pg_regress --load-language=plperl $(REGRESS)
+ $(SHELL) $(top_builddir)/src/test/regress/pg_regress $(REGRESS_OPTS) $(REGRESS)
.PHONY: submake
submake:
-# $PostgreSQL: pgsql/src/pl/plpython/Makefile,v 1.19 2005/05/14 17:55:21 tgl Exp $
+# $PostgreSQL: pgsql/src/pl/plpython/Makefile,v 1.20 2005/05/17 18:26:23 tgl Exp $
subdir = src/pl/plpython
top_builddir = ../../..
SHLIB_LINK = $(BE_DLLLIBS) $(python_libspec) $(python_additional_libs)
+REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=plpythonu
REGRESS = plpython_schema plpython_populate plpython_function plpython_test plpython_error plpython_drop
include $(top_srcdir)/src/Makefile.shlib
rm -f $(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)
installcheck: submake
- $(SHELL) $(top_builddir)/src/test/regress/pg_regress --load-language=plpythonu $(REGRESS)
+ $(SHELL) $(top_builddir)/src/test/regress/pg_regress $(REGRESS_OPTS) $(REGRESS)
.PHONY: submake
submake:
#
# Makefile for the pltcl shared object
#
-# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.45 2005/05/14 17:55:22 tgl Exp $
+# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.46 2005/05/17 18:26:23 tgl Exp $
#
#-------------------------------------------------------------------------
SO_MINOR_VERSION = 0
OBJS = pltcl.o
+REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-language=pltcl
REGRESS = pltcl_setup pltcl_queries
include $(top_srcdir)/src/Makefile.shlib
$(MAKE) -C modules $@
installcheck: submake
- $(SHELL) $(top_builddir)/src/test/regress/pg_regress --load-language=pltcl $(REGRESS)
+ $(SHELL) $(top_builddir)/src/test/regress/pg_regress $(REGRESS_OPTS) $(REGRESS)
.PHONY: submake
submake:
#! /bin/sh
-# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.54 2005/05/11 21:52:03 tgl Exp $
+# $PostgreSQL: pgsql/src/test/regress/pg_regress.sh,v 1.55 2005/05/17 18:26:23 tgl Exp $
me=`basename $0`
: ${TMPDIR=/tmp}
Usage: $me [options...] [extra tests...]
Options:
+ --dbname=DB use database DB (default \`regression')
--debug turn on debug mode in programs that are run
--inputdir=DIR take input files from DIR (default \`.')
--load-language=lang load the named language before running the
--version)
echo "pg_regress (PostgreSQL @VERSION@)"
exit 0;;
+ --dbname=*)
+ dbname=`expr "x$1" : "x--dbname=\(.*\)"`
+ shift;;
--debug)
debug=yes
shift;;