mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 10:01:14 +02:00
Try to stabilize output from rolenames regression test.
It's not quite clear why commit 45b980570
has resulted in
some instability here, though interference from concurrent
autovacuum runs seems like a reasonable guess. What is
clear is that the output ordering of the test queries is
underdetermined for no very good reason. Extend the
ORDER BY keys in hopes of fixing the buildfarm.
Discussion: https://postgr.es/m/147499.1600351924@sss.pgh.pa.us
This commit is contained in:
parent
1ed6b89563
commit
e5209bf37a
@ -1,4 +1,4 @@
|
||||
CREATE OR REPLACE FUNCTION chkrolattr()
|
||||
CREATE FUNCTION chkrolattr()
|
||||
RETURNS TABLE ("role" name, rolekeyword text, canlogin bool, replication bool)
|
||||
AS $$
|
||||
SELECT r.rolname, v.keyword, r.rolcanlogin, r.rolreplication
|
||||
@ -13,9 +13,9 @@ SELECT r.rolname, v.keyword, r.rolcanlogin, r.rolreplication
|
||||
('None', '-'))
|
||||
AS v(uname, keyword)
|
||||
ON (r.rolname = v.uname)
|
||||
ORDER BY 1;
|
||||
ORDER BY 1, 2;
|
||||
$$ LANGUAGE SQL;
|
||||
CREATE OR REPLACE FUNCTION chksetconfig()
|
||||
CREATE FUNCTION chksetconfig()
|
||||
RETURNS TABLE (db name, "role" name, rolkeyword text, setconfig text[])
|
||||
AS $$
|
||||
SELECT COALESCE(d.datname, 'ALL'), COALESCE(r.rolname, 'ALL'),
|
||||
@ -31,14 +31,14 @@ SELECT COALESCE(d.datname, 'ALL'), COALESCE(r.rolname, 'ALL'),
|
||||
WHERE (r.rolname) IN ('Public', 'current_user', 'regress_testrol1', 'regress_testrol2')
|
||||
ORDER BY 1, 2;
|
||||
$$ LANGUAGE SQL;
|
||||
CREATE OR REPLACE FUNCTION chkumapping()
|
||||
CREATE FUNCTION chkumapping()
|
||||
RETURNS TABLE (umname name, umserver name, umoptions text[])
|
||||
AS $$
|
||||
SELECT r.rolname, s.srvname, m.umoptions
|
||||
FROM pg_user_mapping m
|
||||
LEFT JOIN pg_roles r ON (r.oid = m.umuser)
|
||||
JOIN pg_foreign_server s ON (s.oid = m.umserver)
|
||||
ORDER BY 2;
|
||||
ORDER BY 2, 1;
|
||||
$$ LANGUAGE SQL;
|
||||
--
|
||||
-- We test creation and use of these role names to ensure that the server
|
||||
|
@ -1,4 +1,4 @@
|
||||
CREATE OR REPLACE FUNCTION chkrolattr()
|
||||
CREATE FUNCTION chkrolattr()
|
||||
RETURNS TABLE ("role" name, rolekeyword text, canlogin bool, replication bool)
|
||||
AS $$
|
||||
SELECT r.rolname, v.keyword, r.rolcanlogin, r.rolreplication
|
||||
@ -13,10 +13,10 @@ SELECT r.rolname, v.keyword, r.rolcanlogin, r.rolreplication
|
||||
('None', '-'))
|
||||
AS v(uname, keyword)
|
||||
ON (r.rolname = v.uname)
|
||||
ORDER BY 1;
|
||||
ORDER BY 1, 2;
|
||||
$$ LANGUAGE SQL;
|
||||
|
||||
CREATE OR REPLACE FUNCTION chksetconfig()
|
||||
CREATE FUNCTION chksetconfig()
|
||||
RETURNS TABLE (db name, "role" name, rolkeyword text, setconfig text[])
|
||||
AS $$
|
||||
SELECT COALESCE(d.datname, 'ALL'), COALESCE(r.rolname, 'ALL'),
|
||||
@ -33,14 +33,14 @@ SELECT COALESCE(d.datname, 'ALL'), COALESCE(r.rolname, 'ALL'),
|
||||
ORDER BY 1, 2;
|
||||
$$ LANGUAGE SQL;
|
||||
|
||||
CREATE OR REPLACE FUNCTION chkumapping()
|
||||
CREATE FUNCTION chkumapping()
|
||||
RETURNS TABLE (umname name, umserver name, umoptions text[])
|
||||
AS $$
|
||||
SELECT r.rolname, s.srvname, m.umoptions
|
||||
FROM pg_user_mapping m
|
||||
LEFT JOIN pg_roles r ON (r.oid = m.umuser)
|
||||
JOIN pg_foreign_server s ON (s.oid = m.umserver)
|
||||
ORDER BY 2;
|
||||
ORDER BY 2, 1;
|
||||
$$ LANGUAGE SQL;
|
||||
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user