From: Tomas Vondra Date: Thu, 4 May 2017 17:41:53 +0000 (+0200) Subject: Resolve failures in without_oid test suite by switching to CTAS X-Git-Tag: XL_10_R1BETA1~344 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=39d7f03ca113580a291fe45e221565d9b97396ff;p=postgres-xl.git Resolve failures in without_oid test suite by switching to CTAS The tests used CREATE TABLE ... AS EXECUTE to populate two of the tables, but this is unsupported in Postgres-XL and so resulted in test failures. Instead switch to CREATE TABLE ... AS SELECT. --- diff --git a/src/test/regress/expected/without_oid.out b/src/test/regress/expected/without_oid.out index cb2c0c0137..ec159c8fdf 100644 --- a/src/test/regress/expected/without_oid.out +++ b/src/test/regress/expected/without_oid.out @@ -81,10 +81,8 @@ SELECT count(oid) FROM create_table_test3; ERROR: column "oid" does not exist LINE 1: SELECT count(oid) FROM create_table_test3; ^ -PREPARE table_source(int) AS - SELECT a + b AS c1, a - b AS c2, $1 AS c3 FROM create_table_test; -CREATE TABLE execute_with WITH OIDS AS EXECUTE table_source(1); -CREATE TABLE execute_without WITHOUT OIDS AS EXECUTE table_source(2); +CREATE TABLE execute_with WITH OIDS AS SELECT a + b AS c1, a - b AS c2, 1 AS c3 FROM create_table_test; +CREATE TABLE execute_without WITHOUT OIDS AS SELECT a + b AS c1, a - b AS c2, 2 AS c3 FROM create_table_test; SELECT count(oid) FROM execute_with; count ------- diff --git a/src/test/regress/sql/without_oid.sql b/src/test/regress/sql/without_oid.sql index 9fbb454d4d..2176add7fe 100644 --- a/src/test/regress/sql/without_oid.sql +++ b/src/test/regress/sql/without_oid.sql @@ -75,11 +75,8 @@ SELECT count(oid) FROM create_table_test2; -- should fail SELECT count(oid) FROM create_table_test3; -PREPARE table_source(int) AS - SELECT a + b AS c1, a - b AS c2, $1 AS c3 FROM create_table_test; - -CREATE TABLE execute_with WITH OIDS AS EXECUTE table_source(1); -CREATE TABLE execute_without WITHOUT OIDS AS EXECUTE table_source(2); +CREATE TABLE execute_with WITH OIDS AS SELECT a + b AS c1, a - b AS c2, 1 AS c3 FROM create_table_test; +CREATE TABLE execute_without WITHOUT OIDS AS SELECT a + b AS c1, a - b AS c2, 2 AS c3 FROM create_table_test; SELECT count(oid) FROM execute_with; -- should fail