pgpool2.git / summary / log / commit / refs
commit 52619451dc643f8c375fbac366f0f80f89dee208
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Fri Jun 19 17:07:30 2015 +0000
Add regression test for previous commit.
.../regression/tests/063.tables_with_space/test.sh | 55 ++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/src/test/regression/tests/063.tables_with_space/test.sh b/src/test/regression/tests/063.tables_with_space/test.sh
new file mode 100755
index 000000000..a40708307
--- /dev/null
+++ b/src/test/regression/tests/063.tables_with_space/test.sh
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+#-------------------------------------------------------------------
+# Test script for bug reported in bug#136.
+# Tables including spaces does not work with pgpool-II's internal queries
+# which are used to extract information from PostgreSQL system catalogs.
+# The table name in trouble is not only spaces but also mixed-case-table-name.
+source $TESTLIBS
+TESTDIR=testdir
+PSQL=$PGBIN/psql
+
+for mode in s r
+do
+ rm -fr $TESTDIR
+ mkdir $TESTDIR
+ cd $TESTDIR
+
+# create test environment
+ echo -n "creating test environment..."
+ $PGPOOL_SETUP -m $mode -n 2 || exit 1
+ echo "done."
+
+ echo "memory_cache_enabled = on" >> etc/pgpool.conf
+
+ source ./bashrc.ports
+
+ ./startall
+
+ export PGPORT=$PGPOOL_PORT
+
+ wait_for_pgpool_startup
+
+ $PSQL test <<EOF
+CREATE TABLE t1(i INTEGER);
+CREATE TABLE "t1 t2"(i INTEGER);
+CREATE TABLE "tT"(i INTEGER);
+INSERT INTO t1 VALUES(1);
+SELECT * FROM t1;
+INSERT INTO "t1 t2"VALUES(1);
+SELECT * FROM "t1 t2";
+INSERT INTO "tT" VALUES(1);
+SELECT * FROM "tT";
+EOF
+
+ if [ $? != 0 ];then
+ ./shutdownall
+ exit 1
+ fi
+
+ ./shutdownall
+
+ cd ..
+
+done
+
+exit 0
[parent: 0371735e76d0]