Adjust unstable regression test case.

Test queries added by commit 69835bc89 are giving unexpected results
on some smaller buildfarm critters.  I think probably the seqscan
logic is kicking in to cause the scans to not start at the beginning
of the table.  Add ORDER BY to make them be indexscans instead.

Per buildfarm member chipmunk.
This commit is contained in:
Tom Lane 2017-09-13 12:27:01 -04:00
parent 44ba292064
commit 76e134fefd
2 changed files with 18 additions and 6 deletions

View File

@ -3161,7 +3161,7 @@ last error message: syntax error at end of input
last error code: 42601
-- check row count for a cursor-fetched query
\set FETCH_COUNT 10
select unique2 from tenk1 limit 19;
select unique2 from tenk1 order by unique2 limit 19;
unique2
---------
0
@ -3191,8 +3191,20 @@ error: false
error code: 00000
\echo 'number of rows:' :ROW_COUNT
number of rows: 19
-- cursor-fetched query with an error
select 1/unique1 from tenk1;
-- cursor-fetched query with an error after the first group
select 1/(15-unique2) from tenk1 order by unique2 limit 19;
?column?
----------
0
0
0
0
0
0
0
0
0
0
ERROR: division by zero
\echo 'error:' :ERROR
error: true

View File

@ -656,13 +656,13 @@ SELECT 4 AS \gdesc
-- check row count for a cursor-fetched query
\set FETCH_COUNT 10
select unique2 from tenk1 limit 19;
select unique2 from tenk1 order by unique2 limit 19;
\echo 'error:' :ERROR
\echo 'error code:' :SQLSTATE
\echo 'number of rows:' :ROW_COUNT
-- cursor-fetched query with an error
select 1/unique1 from tenk1;
-- cursor-fetched query with an error after the first group
select 1/(15-unique2) from tenk1 order by unique2 limit 19;
\echo 'error:' :ERROR
\echo 'error code:' :SQLSTATE
\echo 'number of rows:' :ROW_COUNT