mirror of https://github.com/citusdata/citus.git
Fix removed read-only server setting lc_collate
Relevant PG commit:
b0f6c43716
b0f6c437160db640d4ea3e49398ebc3ba39d1982
naisila/user_arb_config
parent
a986e224af
commit
deb082a345
|
@ -53,7 +53,16 @@ CREATE OPERATOR citus_mx_test_schema.=== (
|
||||||
HASHES, MERGES
|
HASHES, MERGES
|
||||||
);
|
);
|
||||||
SET search_path TO public;
|
SET search_path TO public;
|
||||||
|
SHOW server_version \gset
|
||||||
|
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16
|
||||||
|
\gset
|
||||||
|
\if :server_version_ge_16
|
||||||
|
-- In PG16, read-only server settings lc_collate and lc_ctype are removed
|
||||||
|
-- Relevant PG commit: b0f6c437160db640d4ea3e49398ebc3ba39d1982
|
||||||
|
SELECT quote_ident((SELECT CASE WHEN datlocprovider='i' THEN daticulocale ELSE datcollate END FROM pg_database WHERE datname = current_database())) as current_locale \gset
|
||||||
|
\else
|
||||||
SELECT quote_ident(current_setting('lc_collate')) as current_locale \gset
|
SELECT quote_ident(current_setting('lc_collate')) as current_locale \gset
|
||||||
|
\endif
|
||||||
CREATE COLLATION citus_mx_test_schema.english (LOCALE=:current_locale);
|
CREATE COLLATION citus_mx_test_schema.english (LOCALE=:current_locale);
|
||||||
CREATE TYPE citus_mx_test_schema.new_composite_type as (key1 text, key2 text);
|
CREATE TYPE citus_mx_test_schema.new_composite_type as (key1 text, key2 text);
|
||||||
CREATE TYPE order_side_mx AS ENUM ('buy', 'sell');
|
CREATE TYPE order_side_mx AS ENUM ('buy', 'sell');
|
||||||
|
|
|
@ -347,7 +347,16 @@ SELECT * FROM nation_hash ORDER BY 1,2,3,4;
|
||||||
|
|
||||||
--test COLLATION with schema
|
--test COLLATION with schema
|
||||||
SET search_path TO public;
|
SET search_path TO public;
|
||||||
|
SHOW server_version \gset
|
||||||
|
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16
|
||||||
|
\gset
|
||||||
|
\if :server_version_ge_16
|
||||||
|
-- In PG16, read-only server settings lc_collate and lc_ctype are removed
|
||||||
|
-- Relevant PG commit: b0f6c437160db640d4ea3e49398ebc3ba39d1982
|
||||||
|
SELECT quote_ident((SELECT CASE WHEN datlocprovider='i' THEN daticulocale ELSE datcollate END FROM pg_database WHERE datname = current_database())) as current_locale \gset
|
||||||
|
\else
|
||||||
SELECT quote_ident(current_setting('lc_collate')) as current_locale \gset
|
SELECT quote_ident(current_setting('lc_collate')) as current_locale \gset
|
||||||
|
\endif
|
||||||
CREATE COLLATION test_schema_support.english (LOCALE = :current_locale);
|
CREATE COLLATION test_schema_support.english (LOCALE = :current_locale);
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
SET citus.shard_replication_factor TO 2;
|
SET citus.shard_replication_factor TO 2;
|
||||||
|
|
|
@ -51,7 +51,19 @@ CREATE OPERATOR citus_mx_test_schema.=== (
|
||||||
);
|
);
|
||||||
|
|
||||||
SET search_path TO public;
|
SET search_path TO public;
|
||||||
|
|
||||||
|
SHOW server_version \gset
|
||||||
|
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16
|
||||||
|
\gset
|
||||||
|
|
||||||
|
\if :server_version_ge_16
|
||||||
|
-- In PG16, read-only server settings lc_collate and lc_ctype are removed
|
||||||
|
-- Relevant PG commit: b0f6c437160db640d4ea3e49398ebc3ba39d1982
|
||||||
|
SELECT quote_ident((SELECT CASE WHEN datlocprovider='i' THEN daticulocale ELSE datcollate END FROM pg_database WHERE datname = current_database())) as current_locale \gset
|
||||||
|
\else
|
||||||
SELECT quote_ident(current_setting('lc_collate')) as current_locale \gset
|
SELECT quote_ident(current_setting('lc_collate')) as current_locale \gset
|
||||||
|
\endif
|
||||||
|
|
||||||
CREATE COLLATION citus_mx_test_schema.english (LOCALE=:current_locale);
|
CREATE COLLATION citus_mx_test_schema.english (LOCALE=:current_locale);
|
||||||
|
|
||||||
CREATE TYPE citus_mx_test_schema.new_composite_type as (key1 text, key2 text);
|
CREATE TYPE citus_mx_test_schema.new_composite_type as (key1 text, key2 text);
|
||||||
|
|
|
@ -293,7 +293,19 @@ SELECT * FROM nation_hash ORDER BY 1,2,3,4;
|
||||||
|
|
||||||
--test COLLATION with schema
|
--test COLLATION with schema
|
||||||
SET search_path TO public;
|
SET search_path TO public;
|
||||||
|
|
||||||
|
SHOW server_version \gset
|
||||||
|
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16
|
||||||
|
\gset
|
||||||
|
|
||||||
|
\if :server_version_ge_16
|
||||||
|
-- In PG16, read-only server settings lc_collate and lc_ctype are removed
|
||||||
|
-- Relevant PG commit: b0f6c437160db640d4ea3e49398ebc3ba39d1982
|
||||||
|
SELECT quote_ident((SELECT CASE WHEN datlocprovider='i' THEN daticulocale ELSE datcollate END FROM pg_database WHERE datname = current_database())) as current_locale \gset
|
||||||
|
\else
|
||||||
SELECT quote_ident(current_setting('lc_collate')) as current_locale \gset
|
SELECT quote_ident(current_setting('lc_collate')) as current_locale \gset
|
||||||
|
\endif
|
||||||
|
|
||||||
CREATE COLLATION test_schema_support.english (LOCALE = :current_locale);
|
CREATE COLLATION test_schema_support.english (LOCALE = :current_locale);
|
||||||
|
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
|
|
Loading…
Reference in New Issue