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

Commite5209bf

Browse files
committed
Try to stabilize output from rolenames regression test.
It's not quite clear why commit45b9805 has resulted insome instability here, though interference from concurrentautovacuum runs seems like a reasonable guess. What isclear is that the output ordering of the test queries isunderdetermined for no very good reason. Extend theORDER BY keys in hopes of fixing the buildfarm.Discussion:https://postgr.es/m/147499.1600351924@sss.pgh.pa.us
1 parent1ed6b89 commite5209bf

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎src/test/modules/unsafe_tests/expected/rolenames.out

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CREATEOR REPLACEFUNCTION chkrolattr()
1+
CREATE FUNCTION chkrolattr()
22
RETURNS TABLE ("role" name, rolekeyword text, canlogin bool, replication bool)
33
AS $$
44
SELECT r.rolname, v.keyword, r.rolcanlogin, r.rolreplication
@@ -13,9 +13,9 @@ SELECT r.rolname, v.keyword, r.rolcanlogin, r.rolreplication
1313
('None', '-'))
1414
AS v(uname, keyword)
1515
ON (r.rolname = v.uname)
16-
ORDER BY 1;
16+
ORDER BY 1, 2;
1717
$$ LANGUAGE SQL;
18-
CREATEOR REPLACEFUNCTION chksetconfig()
18+
CREATE FUNCTION chksetconfig()
1919
RETURNS TABLE (db name, "role" name, rolkeyword text, setconfig text[])
2020
AS $$
2121
SELECT COALESCE(d.datname, 'ALL'), COALESCE(r.rolname, 'ALL'),
@@ -31,14 +31,14 @@ SELECT COALESCE(d.datname, 'ALL'), COALESCE(r.rolname, 'ALL'),
3131
WHERE (r.rolname) IN ('Public', 'current_user', 'regress_testrol1', 'regress_testrol2')
3232
ORDER BY 1, 2;
3333
$$ LANGUAGE SQL;
34-
CREATEOR REPLACEFUNCTION chkumapping()
34+
CREATE FUNCTION chkumapping()
3535
RETURNS TABLE (umname name, umserver name, umoptions text[])
3636
AS $$
3737
SELECT r.rolname, s.srvname, m.umoptions
3838
FROM pg_user_mapping m
3939
LEFT JOIN pg_roles r ON (r.oid = m.umuser)
4040
JOIN pg_foreign_server s ON (s.oid = m.umserver)
41-
ORDER BY 2;
41+
ORDER BY 2, 1;
4242
$$ LANGUAGE SQL;
4343
--
4444
-- We test creation and use of these role names to ensure that the server

‎src/test/modules/unsafe_tests/sql/rolenames.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CREATEOR REPLACEFUNCTIONchkrolattr()
1+
CREATEFUNCTIONchkrolattr()
22
RETURNS TABLE ("role" name, rolekeywordtext, canlogin bool, replication bool)
33
AS $$
44
SELECTr.rolname,v.keyword,r.rolcanlogin,r.rolreplication
@@ -13,10 +13,10 @@ SELECT r.rolname, v.keyword, r.rolcanlogin, r.rolreplication
1313
('None','-'))
1414
AS v(uname, keyword)
1515
ON (r.rolname=v.uname)
16-
ORDER BY1;
16+
ORDER BY1,2;
1717
$$ LANGUAGE SQL;
1818

19-
CREATEOR REPLACEFUNCTIONchksetconfig()
19+
CREATEFUNCTIONchksetconfig()
2020
RETURNS TABLE (db name,"role" name, rolkeywordtext, setconfigtext[])
2121
AS $$
2222
SELECT COALESCE(d.datname,'ALL'), COALESCE(r.rolname,'ALL'),
@@ -33,14 +33,14 @@ SELECT COALESCE(d.datname, 'ALL'), COALESCE(r.rolname, 'ALL'),
3333
ORDER BY1,2;
3434
$$ LANGUAGE SQL;
3535

36-
CREATEOR REPLACEFUNCTIONchkumapping()
36+
CREATEFUNCTIONchkumapping()
3737
RETURNS TABLE (umname name, umserver name, umoptionstext[])
3838
AS $$
3939
SELECTr.rolname,s.srvname,m.umoptions
4040
FROM pg_user_mapping m
4141
LEFT JOIN pg_roles rON (r.oid=m.umuser)
4242
JOIN pg_foreign_server sON (s.oid=m.umserver)
43-
ORDER BY2;
43+
ORDER BY2,1;
4444
$$ LANGUAGE SQL;
4545

4646
--

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp