Modify version-output tests for PostgreSQL 11

Basically we just care whether the running version is before or after
PostgreSQL 10, so testing the major version against 9 and printing a
boolean is sufficient.
pull/1633/head
Jason Petersen 2017-08-31 17:20:44 -06:00
parent 6c9b19a954
commit b4474fc0b0
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
16 changed files with 65 additions and 62 deletions

View File

@ -2,11 +2,12 @@
-- MULTI_EXPLAIN -- MULTI_EXPLAIN
-- --
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SELECT substring(version(), '\d+(?:\.\d+)?') AS major_version; SHOW server_version \gset
major_version SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
--------------- version_above_nine
10 --------------------
t
(1 row) (1 row)
\a\t \a\t

View File

@ -2,11 +2,12 @@
-- MULTI_EXPLAIN -- MULTI_EXPLAIN
-- --
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SELECT substring(version(), '\d+(?:\.\d+)?') AS major_version; SHOW server_version \gset
major_version SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
--------------- version_above_nine
9.6 --------------------
f
(1 row) (1 row)
\a\t \a\t

View File

@ -7,12 +7,12 @@
-- executor here, as we cannot run repartition jobs with real time executor. -- executor here, as we cannot run repartition jobs with real time executor.
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
SET citus.enable_unique_job_ids TO off; SET citus.enable_unique_job_ids TO off;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
major_version version_above_nine
--------------- --------------------
10 t
(1 row) (1 row)
BEGIN; BEGIN;

View File

@ -7,12 +7,12 @@
-- executor here, as we cannot run repartition jobs with real time executor. -- executor here, as we cannot run repartition jobs with real time executor.
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
SET citus.enable_unique_job_ids TO off; SET citus.enable_unique_job_ids TO off;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
major_version version_above_nine
--------------- --------------------
9 f
(1 row) (1 row)
BEGIN; BEGIN;

View File

@ -6,12 +6,12 @@
-- from a sql task to its depended tasks. Note that we set the executor type to task -- from a sql task to its depended tasks. Note that we set the executor type to task
-- tracker executor here, as we cannot run repartition jobs with real time executor. -- tracker executor here, as we cannot run repartition jobs with real time executor.
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
major_version version_above_nine
--------------- --------------------
10 t
(1 row) (1 row)
BEGIN; BEGIN;

View File

@ -6,12 +6,12 @@
-- from a sql task to its depended tasks. Note that we set the executor type to task -- from a sql task to its depended tasks. Note that we set the executor type to task
-- tracker executor here, as we cannot run repartition jobs with real time executor. -- tracker executor here, as we cannot run repartition jobs with real time executor.
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
major_version version_above_nine
--------------- --------------------
9 f
(1 row) (1 row)
BEGIN; BEGIN;

View File

@ -4,12 +4,12 @@
-- This test checks that we can handle null min/max values in shard statistics -- This test checks that we can handle null min/max values in shard statistics
-- and that we don't partition or join prune shards that have null values. -- and that we don't partition or join prune shards that have null values.
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
major_version version_above_nine
--------------- --------------------
10 t
(1 row) (1 row)
SET client_min_messages TO DEBUG2; SET client_min_messages TO DEBUG2;

View File

@ -4,12 +4,12 @@
-- This test checks that we can handle null min/max values in shard statistics -- This test checks that we can handle null min/max values in shard statistics
-- and that we don't partition or join prune shards that have null values. -- and that we don't partition or join prune shards that have null values.
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
major_version version_above_nine
--------------- --------------------
9 f
(1 row) (1 row)
SET client_min_messages TO DEBUG2; SET client_min_messages TO DEBUG2;

View File

@ -2,12 +2,12 @@
-- MULTI_TASK_ASSIGNMENT -- MULTI_TASK_ASSIGNMENT
-- --
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
major_version version_above_nine
--------------- --------------------
10 t
(1 row) (1 row)
SET citus.explain_distributed_queries TO off; SET citus.explain_distributed_queries TO off;

View File

@ -2,12 +2,12 @@
-- MULTI_TASK_ASSIGNMENT -- MULTI_TASK_ASSIGNMENT
-- --
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
major_version version_above_nine
--------------- --------------------
9 f
(1 row) (1 row)
SET citus.explain_distributed_queries TO off; SET citus.explain_distributed_queries TO off;

View File

@ -2,9 +2,9 @@
-- MULTI_CREATE_TABLE_NEW_FEATURES -- MULTI_CREATE_TABLE_NEW_FEATURES
-- --
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
-- Verify that the GENERATED ... AS IDENTITY feature in PostgreSQL 10 -- Verify that the GENERATED ... AS IDENTITY feature in PostgreSQL 10
-- is forbidden in distributed tables. -- is forbidden in distributed tables.

View File

@ -4,8 +4,9 @@
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SELECT substring(version(), '\d+(?:\.\d+)?') AS major_version; SHOW server_version \gset
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
\a\t \a\t

View File

@ -10,9 +10,9 @@
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
SET citus.enable_unique_job_ids TO off; SET citus.enable_unique_job_ids TO off;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
BEGIN; BEGIN;
SET client_min_messages TO DEBUG4; SET client_min_messages TO DEBUG4;

View File

@ -9,9 +9,9 @@
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
BEGIN; BEGIN;

View File

@ -8,9 +8,9 @@
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
SET client_min_messages TO DEBUG2; SET client_min_messages TO DEBUG2;
SET citus.explain_all_tasks TO on; SET citus.explain_all_tasks TO on;

View File

@ -5,9 +5,9 @@
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000;
-- print major version to make version-specific tests clear -- print whether we're using version > 9 to make version-specific tests clear
SHOW server_version \gset SHOW server_version \gset
SELECT substring(:'server_version', '\d+') AS major_version; SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
SET citus.explain_distributed_queries TO off; SET citus.explain_distributed_queries TO off;