aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-04-08 14:15:12 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-04-08 14:15:20 -0400
commit690c543550b0d2852060c18d270cdb534d339d9a (patch)
treec79e75f753bac4865a1c1ca92ba433973a201a2d /src/test
parent7c7d4fddab82dc756d8caa67b1b31fcdde355aab (diff)
downloadpostgresql-690c543550b0d2852060c18d270cdb534d339d9a.tar.gz
postgresql-690c543550b0d2852060c18d270cdb534d339d9a.zip
Fix unstable regression test output.
Output order from the pg_indexes view might vary depending on the phase of the moon, so add ORDER BY to ensure stable results of tests added by commit 386e3d7609c49505e079c40c65919d99feb82505. Per buildfarm.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/index_including.out26
-rw-r--r--src/test/regress/sql/index_including.sql24
2 files changed, 25 insertions, 25 deletions
diff --git a/src/test/regress/expected/index_including.out b/src/test/regress/expected/index_including.out
index ceccd55b2be..1199671a440 100644
--- a/src/test/regress/expected/index_including.out
+++ b/src/test/regress/expected/index_including.out
@@ -143,14 +143,14 @@ DROP TABLE tbl;
*/
CREATE TABLE tbl (c1 int,c2 int, c3 int, c4 int);
CREATE UNIQUE INDEX tbl_idx ON tbl using btree(c1, c2, c3, c4);
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
-----------------------------------------------------------------
CREATE UNIQUE INDEX tbl_idx ON tbl USING btree (c1, c2, c3, c4)
(1 row)
ALTER TABLE tbl DROP COLUMN c3;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------
(0 rows)
@@ -163,14 +163,14 @@ DROP TABLE tbl;
*/
CREATE TABLE tbl (c1 int,c2 int, c3 int, c4 box);
CREATE UNIQUE INDEX tbl_idx ON tbl using btree(c1, c2) INCLUDING(c3,c4);
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------------------------------------------------------------------------
CREATE UNIQUE INDEX tbl_idx ON tbl USING btree (c1, c2) INCLUDING (c3, c4)
(1 row)
ALTER TABLE tbl DROP COLUMN c3;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------
(0 rows)
@@ -182,20 +182,20 @@ DROP TABLE tbl;
* as well as key columns deletion. It's explained in documentation.
*/
CREATE TABLE tbl (c1 int,c2 int, c3 int, c4 box, UNIQUE(c1, c2) INCLUDING(c3,c4));
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------------------------------------------------------------------------------------
CREATE UNIQUE INDEX tbl_c1_c2_c3_c4_key ON tbl USING btree (c1, c2) INCLUDING (c3, c4)
(1 row)
ALTER TABLE tbl DROP COLUMN c3;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------
(0 rows)
ALTER TABLE tbl DROP COLUMN c1;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------
(0 rows)
@@ -207,11 +207,11 @@ DROP TABLE tbl;
CREATE TABLE tbl (c1 int,c2 int, c3 int, c4 box, UNIQUE(c1, c2) INCLUDING(c3,c4));
INSERT INTO tbl select x, 2*x, 3*x, box('4,4,4,4') from generate_series(1,1000) as x;
CREATE UNIQUE INDEX CONCURRENTLY on tbl (c1, c2) INCLUDING (c3, c4);
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------------------------------------------------------------------------------------
- CREATE UNIQUE INDEX tbl_c1_c2_c3_c4_key ON tbl USING btree (c1, c2) INCLUDING (c3, c4)
CREATE UNIQUE INDEX tbl_c1_c2_c3_c4_idx ON tbl USING btree (c1, c2) INCLUDING (c3, c4)
+ CREATE UNIQUE INDEX tbl_c1_c2_c3_c4_key ON tbl USING btree (c1, c2) INCLUDING (c3, c4)
(2 rows)
DROP TABLE tbl;
@@ -219,27 +219,27 @@ DROP TABLE tbl;
* 5. REINDEX
*/
CREATE TABLE tbl (c1 int,c2 int, c3 int, c4 box, UNIQUE(c1, c2) INCLUDING(c3,c4));
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------------------------------------------------------------------------------------
CREATE UNIQUE INDEX tbl_c1_c2_c3_c4_key ON tbl USING btree (c1, c2) INCLUDING (c3, c4)
(1 row)
ALTER TABLE tbl DROP COLUMN c3;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------
(0 rows)
REINDEX INDEX tbl_c1_c2_c3_c4_key;
ERROR: relation "tbl_c1_c2_c3_c4_key" does not exist
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------
(0 rows)
ALTER TABLE tbl DROP COLUMN c1;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
indexdef
----------
(0 rows)
diff --git a/src/test/regress/sql/index_including.sql b/src/test/regress/sql/index_including.sql
index 83ca670480d..c4c61c56d71 100644
--- a/src/test/regress/sql/index_including.sql
+++ b/src/test/regress/sql/index_including.sql
@@ -88,9 +88,9 @@ DROP TABLE tbl;
*/
CREATE TABLE tbl (c1 int,c2 int, c3 int, c4 int);
CREATE UNIQUE INDEX tbl_idx ON tbl using btree(c1, c2, c3, c4);
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
ALTER TABLE tbl DROP COLUMN c3;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
DROP TABLE tbl;
/*
@@ -100,9 +100,9 @@ DROP TABLE tbl;
*/
CREATE TABLE tbl (c1 int,c2 int, c3 int, c4 box);
CREATE UNIQUE INDEX tbl_idx ON tbl using btree(c1, c2) INCLUDING(c3,c4);
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
ALTER TABLE tbl DROP COLUMN c3;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
DROP TABLE tbl;
/*
@@ -111,11 +111,11 @@ DROP TABLE tbl;
* as well as key columns deletion. It's explained in documentation.
*/
CREATE TABLE tbl (c1 int,c2 int, c3 int, c4 box, UNIQUE(c1, c2) INCLUDING(c3,c4));
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
ALTER TABLE tbl DROP COLUMN c3;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
ALTER TABLE tbl DROP COLUMN c1;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
DROP TABLE tbl;
@@ -125,7 +125,7 @@ DROP TABLE tbl;
CREATE TABLE tbl (c1 int,c2 int, c3 int, c4 box, UNIQUE(c1, c2) INCLUDING(c3,c4));
INSERT INTO tbl select x, 2*x, 3*x, box('4,4,4,4') from generate_series(1,1000) as x;
CREATE UNIQUE INDEX CONCURRENTLY on tbl (c1, c2) INCLUDING (c3, c4);
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
DROP TABLE tbl;
@@ -133,13 +133,13 @@ DROP TABLE tbl;
* 5. REINDEX
*/
CREATE TABLE tbl (c1 int,c2 int, c3 int, c4 box, UNIQUE(c1, c2) INCLUDING(c3,c4));
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
ALTER TABLE tbl DROP COLUMN c3;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
REINDEX INDEX tbl_c1_c2_c3_c4_key;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
ALTER TABLE tbl DROP COLUMN c1;
-select indexdef from pg_indexes where tablename='tbl';
+select indexdef from pg_indexes where tablename = 'tbl' order by indexname;
DROP TABLE tbl;
/*