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
|
-- 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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue