mirror of https://github.com/citusdata/citus.git
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
parent
6c9b19a954
commit
b4474fc0b0
|
@ -2,11 +2,12 @@
|
|||
-- MULTI_EXPLAIN
|
||||
--
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
|
||||
-- print major version to make version-specific tests clear
|
||||
SELECT substring(version(), '\d+(?:\.\d+)?') AS major_version;
|
||||
major_version
|
||||
---------------
|
||||
10
|
||||
-- print whether we're using version > 9 to make version-specific tests clear
|
||||
SHOW server_version \gset
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
version_above_nine
|
||||
--------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
\a\t
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
-- MULTI_EXPLAIN
|
||||
--
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
|
||||
-- print major version to make version-specific tests clear
|
||||
SELECT substring(version(), '\d+(?:\.\d+)?') AS major_version;
|
||||
major_version
|
||||
---------------
|
||||
9.6
|
||||
-- print whether we're using version > 9 to make version-specific tests clear
|
||||
SHOW server_version \gset
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
version_above_nine
|
||||
--------------------
|
||||
f
|
||||
(1 row)
|
||||
|
||||
\a\t
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
-- executor here, as we cannot run repartition jobs with real time executor.
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
|
||||
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
|
||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
||||
major_version
|
||||
---------------
|
||||
10
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
version_above_nine
|
||||
--------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
BEGIN;
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
-- executor here, as we cannot run repartition jobs with real time executor.
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
|
||||
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
|
||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
||||
major_version
|
||||
---------------
|
||||
9
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
version_above_nine
|
||||
--------------------
|
||||
f
|
||||
(1 row)
|
||||
|
||||
BEGIN;
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
-- 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.
|
||||
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
|
||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
||||
major_version
|
||||
---------------
|
||||
10
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
version_above_nine
|
||||
--------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
BEGIN;
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
-- 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.
|
||||
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
|
||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
||||
major_version
|
||||
---------------
|
||||
9
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
version_above_nine
|
||||
--------------------
|
||||
f
|
||||
(1 row)
|
||||
|
||||
BEGIN;
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
-- 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.
|
||||
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
|
||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
||||
major_version
|
||||
---------------
|
||||
10
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
version_above_nine
|
||||
--------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages TO DEBUG2;
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
-- 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.
|
||||
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
|
||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
||||
major_version
|
||||
---------------
|
||||
9
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
version_above_nine
|
||||
--------------------
|
||||
f
|
||||
(1 row)
|
||||
|
||||
SET client_min_messages TO DEBUG2;
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
-- MULTI_TASK_ASSIGNMENT
|
||||
--
|
||||
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
|
||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
||||
major_version
|
||||
---------------
|
||||
10
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
version_above_nine
|
||||
--------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SET citus.explain_distributed_queries TO off;
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
-- MULTI_TASK_ASSIGNMENT
|
||||
--
|
||||
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
|
||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
||||
major_version
|
||||
---------------
|
||||
9
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
version_above_nine
|
||||
--------------------
|
||||
f
|
||||
(1 row)
|
||||
|
||||
SET citus.explain_distributed_queries TO off;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
-- 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
|
||||
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
|
||||
-- is forbidden in distributed tables.
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
|
||||
|
||||
-- print major version to make version-specific tests clear
|
||||
SELECT substring(version(), '\d+(?:\.\d+)?') AS major_version;
|
||||
-- print whether we're using version > 9 to make version-specific tests clear
|
||||
SHOW server_version \gset
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
|
||||
\a\t
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
|
||||
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
|
||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
|
||||
BEGIN;
|
||||
SET client_min_messages TO DEBUG4;
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
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
|
||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
||||
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||
|
||||
|
||||
BEGIN;
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
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
|
||||
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 citus.explain_all_tasks TO on;
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
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
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue