Fix unstable regression test results.

Commit 2ac3ef7a0 added a query with an underdetermined output row order;
it has failed multiple times in the buildfarm since then.  Add an ORDER BY
to fix.  Also, don't rely on a DROP CASCADE to drop in a well-determined
order; that hasn't failed yet but I don't trust it much, and we're not
saving any typing by using CASCADE anyway.
This commit is contained in:
Tom Lane 2016-12-31 18:39:08 -05:00
parent 80a7298b9e
commit 257d815720
2 changed files with 6 additions and 7 deletions

View File

@ -314,7 +314,8 @@ from pg_attribute
where attname = 'a'
and (attrelid = 'p'::regclass
or attrelid = 'p1'::regclass
or attrelid = 'p11'::regclass);
or attrelid = 'p11'::regclass)
order by attrelid::regclass::text;
attrelid | attname | attnum
----------+---------+--------
p | a | 1
@ -333,7 +334,4 @@ select tableoid::regclass, * from p;
(1 row)
-- cleanup
drop table p cascade;
NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to table p1
drop cascades to table p11
drop table p, p1, p11;

View File

@ -185,7 +185,8 @@ from pg_attribute
where attname = 'a'
and (attrelid = 'p'::regclass
or attrelid = 'p1'::regclass
or attrelid = 'p11'::regclass);
or attrelid = 'p11'::regclass)
order by attrelid::regclass::text;
alter table p1 attach partition p11 for values from (2) to (5);
alter table p attach partition p1 for values from (1, 2) to (1, 10);
@ -195,4 +196,4 @@ insert into p values (1, 2);
select tableoid::regclass, * from p;
-- cleanup
drop table p cascade;
drop table p, p1, p11;