Commit 71827885 authored by Alvaro Herrera's avatar Alvaro Herrera

Protect against collation variations in test

Discussion: https://postgr.es/m/YW/MYdSRQZtPFBWR@paquier.xyz
parent 81aefaea
......@@ -248,7 +248,7 @@ ALTER INDEX alter_idx_rename_test_parted RENAME TO alter_idx_rename_test_parted_
SELECT relation::regclass, mode FROM pg_locks
WHERE pid = pg_backend_pid() AND locktype = 'relation'
AND relation::regclass::text LIKE 'alter\_idx%'
ORDER BY relation::regclass::text;
ORDER BY relation::regclass::text COLLATE "C";
relation | mode
--------------------------------+---------------------
alter_idx_rename_test_2 | AccessExclusiveLock
......@@ -262,7 +262,7 @@ ALTER INDEX alter_idx_rename_test_parted_idx RENAME TO alter_idx_rename_test_par
SELECT relation::regclass, mode FROM pg_locks
WHERE pid = pg_backend_pid() AND locktype = 'relation'
AND relation::regclass::text LIKE 'alter\_idx%'
ORDER BY relation::regclass::text;
ORDER BY relation::regclass::text COLLATE "C";
relation | mode
------------------------------------+--------------------------
alter_idx_rename_test_idx_2 | ShareUpdateExclusiveLock
......@@ -276,7 +276,7 @@ ALTER TABLE alter_idx_rename_test_parted_idx_2 RENAME TO alter_idx_rename_test_p
SELECT relation::regclass, mode FROM pg_locks
WHERE pid = pg_backend_pid() AND locktype = 'relation'
AND relation::regclass::text LIKE 'alter\_idx%'
ORDER BY relation::regclass::text;
ORDER BY relation::regclass::text COLLATE "C";
relation | mode
------------------------------------+---------------------
alter_idx_rename_test_idx_3 | AccessExclusiveLock
......
......@@ -242,7 +242,7 @@ ALTER INDEX alter_idx_rename_test_parted RENAME TO alter_idx_rename_test_parted_
SELECT relation::regclass, mode FROM pg_locks
WHERE pid = pg_backend_pid() AND locktype = 'relation'
AND relation::regclass::text LIKE 'alter\_idx%'
ORDER BY relation::regclass::text;
ORDER BY relation::regclass::text COLLATE "C";
COMMIT;
BEGIN;
ALTER INDEX alter_idx_rename_test_idx RENAME TO alter_idx_rename_test_idx_2;
......@@ -250,7 +250,7 @@ ALTER INDEX alter_idx_rename_test_parted_idx RENAME TO alter_idx_rename_test_par
SELECT relation::regclass, mode FROM pg_locks
WHERE pid = pg_backend_pid() AND locktype = 'relation'
AND relation::regclass::text LIKE 'alter\_idx%'
ORDER BY relation::regclass::text;
ORDER BY relation::regclass::text COLLATE "C";
COMMIT;
BEGIN;
ALTER TABLE alter_idx_rename_test_idx_2 RENAME TO alter_idx_rename_test_idx_3;
......@@ -258,7 +258,7 @@ ALTER TABLE alter_idx_rename_test_parted_idx_2 RENAME TO alter_idx_rename_test_p
SELECT relation::regclass, mode FROM pg_locks
WHERE pid = pg_backend_pid() AND locktype = 'relation'
AND relation::regclass::text LIKE 'alter\_idx%'
ORDER BY relation::regclass::text;
ORDER BY relation::regclass::text COLLATE "C";
COMMIT;
DROP TABLE alter_idx_rename_test_2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment