Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite643a31

Browse files
committed
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 namesof the objects in this version do not have an order that is alwaysguaranteed depending on the collation used. Rather than append aCOLLATE clause in the query of \dx, this tweaks the regression test toproduce an output whose order is guaranteed.Reported-by: Andres FreundAuthor: Bharath RupireddyDiscussion:https://postgr.es/m/20230314215440.gma7g4keswdnldj5@awork3.anarazel.de
1 parentc9a272d commite643a31

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

‎contrib/pg_walinspect/expected/oldextversions.out

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
CREATE EXTENSION pg_walinspect WITH VERSION '1.0';
33
-- Mask DETAIL messages as these could refer to current LSN positions.
44
\set VERBOSITY terse
5-
-- List what version 1.0 contains
6-
\dx+ pg_walinspect
7-
Objects in extension "pg_walinspect"
8-
Object description
5+
-- List what version 1.0 contains, using a locale-independent sorting.
6+
SELECT pg_describe_object(classid, objid, 0) AS obj
7+
FROM pg_depend
8+
WHERE refclassid = 'pg_extension'::regclass AND
9+
refobjid = (SELECT oid FROM pg_extension
10+
WHERE extname = 'pg_walinspect') AND deptype = 'e'
11+
ORDER BY pg_describe_object(classid, objid, 0) COLLATE "C";
12+
obj
913
-----------------------------------------------------------
1014
function pg_get_wal_record_info(pg_lsn)
1115
function pg_get_wal_records_info(pg_lsn,pg_lsn)

‎contrib/pg_walinspect/sql/oldextversions.sql

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ CREATE EXTENSION pg_walinspect WITH VERSION '1.0';
55
-- Mask DETAIL messages as these could refer to current LSN positions.
66
\set VERBOSITY terse
77

8-
-- List what version 1.0 contains
9-
\dx+ pg_walinspect
8+
-- List what version 1.0 contains, using a locale-independent sorting.
9+
SELECT pg_describe_object(classid, objid,0)AS obj
10+
FROM pg_depend
11+
WHERE refclassid='pg_extension'::regclassAND
12+
refobjid= (SELECToidFROM pg_extension
13+
WHERE extname='pg_walinspect')AND deptype='e'
14+
ORDER BY pg_describe_object(classid, objid,0) COLLATE"C";
1015

1116
-- Make sure checkpoints don't interfere with the test.
1217
SELECT'init'FROM pg_create_physical_replication_slot('regress_pg_walinspect_slot', true, false);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp