mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Tweak regression test of pg_walinspect to be less collation-sensitive
\dx was used on pg_walinspect to list its objects in 1.0 but the names of the objects in this version do not have an order that is always guaranteed depending on the collation used. Rather than append a COLLATE clause in the query of \dx, this tweaks the regression test to produce an output whose order is guaranteed. Reported-by: Andres Freund Author: Bharath Rupireddy Discussion: https://postgr.es/m/20230314215440.gma7g4keswdnldj5@awork3.anarazel.de
This commit is contained in:
parent
c9a272daaa
commit
e643a315fc
@ -2,10 +2,14 @@
|
|||||||
CREATE EXTENSION pg_walinspect WITH VERSION '1.0';
|
CREATE EXTENSION pg_walinspect WITH VERSION '1.0';
|
||||||
-- Mask DETAIL messages as these could refer to current LSN positions.
|
-- Mask DETAIL messages as these could refer to current LSN positions.
|
||||||
\set VERBOSITY terse
|
\set VERBOSITY terse
|
||||||
-- List what version 1.0 contains
|
-- List what version 1.0 contains, using a locale-independent sorting.
|
||||||
\dx+ pg_walinspect
|
SELECT pg_describe_object(classid, objid, 0) AS obj
|
||||||
Objects in extension "pg_walinspect"
|
FROM pg_depend
|
||||||
Object description
|
WHERE refclassid = 'pg_extension'::regclass AND
|
||||||
|
refobjid = (SELECT oid FROM pg_extension
|
||||||
|
WHERE extname = 'pg_walinspect') AND deptype = 'e'
|
||||||
|
ORDER BY pg_describe_object(classid, objid, 0) COLLATE "C";
|
||||||
|
obj
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
function pg_get_wal_record_info(pg_lsn)
|
function pg_get_wal_record_info(pg_lsn)
|
||||||
function pg_get_wal_records_info(pg_lsn,pg_lsn)
|
function pg_get_wal_records_info(pg_lsn,pg_lsn)
|
||||||
|
@ -5,8 +5,13 @@ CREATE EXTENSION pg_walinspect WITH VERSION '1.0';
|
|||||||
-- Mask DETAIL messages as these could refer to current LSN positions.
|
-- Mask DETAIL messages as these could refer to current LSN positions.
|
||||||
\set VERBOSITY terse
|
\set VERBOSITY terse
|
||||||
|
|
||||||
-- List what version 1.0 contains
|
-- List what version 1.0 contains, using a locale-independent sorting.
|
||||||
\dx+ pg_walinspect
|
SELECT pg_describe_object(classid, objid, 0) AS obj
|
||||||
|
FROM pg_depend
|
||||||
|
WHERE refclassid = 'pg_extension'::regclass AND
|
||||||
|
refobjid = (SELECT oid FROM pg_extension
|
||||||
|
WHERE extname = 'pg_walinspect') AND deptype = 'e'
|
||||||
|
ORDER BY pg_describe_object(classid, objid, 0) COLLATE "C";
|
||||||
|
|
||||||
-- Make sure checkpoints don't interfere with the test.
|
-- Make sure checkpoints don't interfere with the test.
|
||||||
SELECT 'init' FROM pg_create_physical_replication_slot('regress_pg_walinspect_slot', true, false);
|
SELECT 'init' FROM pg_create_physical_replication_slot('regress_pg_walinspect_slot', true, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user