mirror of https://github.com/citusdata/citus.git
Fixes unit tests
parent
2a1a94b4a2
commit
1963257331
|
@ -38,27 +38,28 @@ select datistemplate from pg_database where datname = 'regression';
|
||||||
|
|
||||||
DO $$
|
DO $$
|
||||||
DECLARE
|
DECLARE
|
||||||
v_version_num numeric;
|
v_version_num int;
|
||||||
BEGIN
|
BEGIN
|
||||||
SELECT current_setting('server_version_num')::numeric INTO v_version_num;
|
SELECT current_setting('server_version_num')::numeric INTO v_version_num;
|
||||||
IF v_version_num >= 150000 THEN
|
IF v_version_num >= 150000 THEN
|
||||||
set citus.log_remote_commands = true;
|
set citus.log_remote_commands = true;
|
||||||
set citus.grep_remote_commands = '%ALTER DATABASE%';
|
set citus.grep_remote_commands = '%ALTER DATABASE%';
|
||||||
alter database regression REFRESH COLLATION VERSION;
|
execute 'alter database regression REFRESH COLLATION VERSION';
|
||||||
set citus.log_remote_commands = false;
|
set citus.log_remote_commands = false;
|
||||||
ELSE
|
ELSE
|
||||||
RAISE NOTICE 'Skipping alter database .. REFRESH COLLATION VERSION for PostgreSQL 14';
|
RAISE NOTICE 'Skipping alter database .. REFRESH COLLATION VERSION for PostgreSQL version < 15.';
|
||||||
END IF;
|
END IF;
|
||||||
END;
|
END;
|
||||||
$$;
|
$$
|
||||||
|
language plpgsql;
|
||||||
NOTICE: version has not changed
|
NOTICE: version has not changed
|
||||||
CONTEXT: SQL statement "alter database regression REFRESH COLLATION VERSION"
|
CONTEXT: SQL statement "alter database regression REFRESH COLLATION VERSION"
|
||||||
PL/pgSQL function inline_code_block line XX at SQL statement
|
PL/pgSQL function inline_code_block line XX at EXECUTE
|
||||||
NOTICE: issuing ALTER DATABASE regression REFRESH COLLATION VERSION;
|
NOTICE: issuing ALTER DATABASE regression REFRESH COLLATION VERSION;
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||||
CONTEXT: SQL statement "alter database regression REFRESH COLLATION VERSION"
|
CONTEXT: SQL statement "alter database regression REFRESH COLLATION VERSION"
|
||||||
PL/pgSQL function inline_code_block line XX at SQL statement
|
PL/pgSQL function inline_code_block line XX at EXECUTE
|
||||||
NOTICE: issuing ALTER DATABASE regression REFRESH COLLATION VERSION;
|
NOTICE: issuing ALTER DATABASE regression REFRESH COLLATION VERSION;
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||||
CONTEXT: SQL statement "alter database regression REFRESH COLLATION VERSION"
|
CONTEXT: SQL statement "alter database regression REFRESH COLLATION VERSION"
|
||||||
PL/pgSQL function inline_code_block line XX at SQL statement
|
PL/pgSQL function inline_code_block line XX at EXECUTE
|
||||||
|
|
|
@ -38,17 +38,19 @@ select datistemplate from pg_database where datname = 'regression';
|
||||||
|
|
||||||
DO $$
|
DO $$
|
||||||
DECLARE
|
DECLARE
|
||||||
v_version_num numeric;
|
v_version_num int;
|
||||||
BEGIN
|
BEGIN
|
||||||
SELECT current_setting('server_version_num')::numeric INTO v_version_num;
|
SELECT current_setting('server_version_num')::numeric INTO v_version_num;
|
||||||
IF v_version_num >= 150000 THEN
|
IF v_version_num >= 150000 THEN
|
||||||
set citus.log_remote_commands = true;
|
set citus.log_remote_commands = true;
|
||||||
set citus.grep_remote_commands = '%ALTER DATABASE%';
|
set citus.grep_remote_commands = '%ALTER DATABASE%';
|
||||||
alter database regression REFRESH COLLATION VERSION;
|
execute 'alter database regression REFRESH COLLATION VERSION';
|
||||||
set citus.log_remote_commands = false;
|
set citus.log_remote_commands = false;
|
||||||
ELSE
|
ELSE
|
||||||
RAISE NOTICE 'Skipping alter database .. REFRESH COLLATION VERSION for PostgreSQL 14';
|
RAISE NOTICE 'Skipping alter database .. REFRESH COLLATION VERSION for PostgreSQL version < 15.';
|
||||||
END IF;
|
END IF;
|
||||||
END;
|
END;
|
||||||
$$;
|
$$
|
||||||
Skipping alter database .. REFRESH COLLATION VERSION for PostgreSQL 14
|
language plpgsql;
|
||||||
|
NOTICE: Skipping alter database .. REFRESH COLLATION VERSION for PostgreSQL version < 15.
|
||||||
|
|
||||||
|
|
|
@ -33,21 +33,14 @@ DECLARE
|
||||||
v_version_num int;
|
v_version_num int;
|
||||||
BEGIN
|
BEGIN
|
||||||
SELECT current_setting('server_version_num')::numeric INTO v_version_num;
|
SELECT current_setting('server_version_num')::numeric INTO v_version_num;
|
||||||
raise notice 'v_version_num: %', v_version_num;
|
|
||||||
IF v_version_num >= 150000 THEN
|
IF v_version_num >= 150000 THEN
|
||||||
set citus.log_remote_commands = true;
|
set citus.log_remote_commands = true;
|
||||||
set citus.grep_remote_commands = '%ALTER DATABASE%';
|
set citus.grep_remote_commands = '%ALTER DATABASE%';
|
||||||
alter database regression REFRESH COLLATION VERSION;
|
execute 'alter database regression REFRESH COLLATION VERSION';
|
||||||
set citus.log_remote_commands = false;
|
set citus.log_remote_commands = false;
|
||||||
ELSE
|
ELSE
|
||||||
RAISE NOTICE 'Skipping alter database .. REFRESH COLLATION VERSION for PostgreSQL version < 15.';
|
RAISE NOTICE 'Skipping alter database .. REFRESH COLLATION VERSION for PostgreSQL version < 15.';
|
||||||
END IF;
|
END IF;
|
||||||
END;
|
END;
|
||||||
$$;
|
$$
|
||||||
|
language plpgsql;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue