Commit 62d1d23b authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

If SELECT uses index (btree) then ordered results are returned.

parent fb100e6b
...@@ -90,26 +90,26 @@ QUERY: ALTER TABLE tenk1 RENAME TO ten_k; ...@@ -90,26 +90,26 @@ QUERY: ALTER TABLE tenk1 RENAME TO ten_k;
QUERY: SELECT unique1 FROM ten_k WHERE unique1 < 20; QUERY: SELECT unique1 FROM ten_k WHERE unique1 < 20;
unique1 unique1
------- -------
18 0
15
4
2
1 1
6 2
14
9
8
5
3 3
13 4
12 5
19 6
17
11
7 7
8
9
10 10
11
12
13
14
15
16 16
0 17
18
19
(20 rows) (20 rows)
QUERY: SELECT unique2 FROM ten_k WHERE unique2 < 20; QUERY: SELECT unique2 FROM ten_k WHERE unique2 < 20;
...@@ -246,10 +246,10 @@ QUERY: ALTER TABLE ten_k RENAME TO tenk1; ...@@ -246,10 +246,10 @@ QUERY: ALTER TABLE ten_k RENAME TO tenk1;
QUERY: SELECT unique1 FROM tenk1 WHERE unique1 < 5; QUERY: SELECT unique1 FROM tenk1 WHERE unique1 < 5;
unique1 unique1
------- -------
4 0
2
1 1
2
3 3
0 4
(5 rows) (5 rows)
QUERY: SELECT onek.* WHERE onek.unique1 < 10; QUERY: SELECT onek.* WHERE onek.unique1 < 10;
unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenthous|odd|even|stringu1|stringu2|string4 unique1|unique2|two|four|ten|twenty|hundred|thousand|twothousand|fivethous|tenthous|odd|even|stringu1|stringu2|string4
-------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+------- -------+-------+---+----+---+------+-------+--------+-----------+---------+--------+---+----+--------+--------+-------
6| 978| 0| 2| 6| 6| 6| 6| 6| 6| 6| 12| 13|GAAAAA |QLBAAA |OOOOxx
0| 998| 0| 0| 0| 0| 0| 0| 0| 0| 0| 0| 1|AAAAAA |KMBAAA |OOOOxx 0| 998| 0| 0| 0| 0| 0| 0| 0| 0| 0| 0| 1|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(10 rows) (10 rows)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment