Ensure consistent output in the 'select_views' test case
authorPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 18 Sep 2018 10:31:43 +0000 (16:01 +0530)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 18 Sep 2018 10:31:43 +0000 (16:01 +0530)
We added ORDER BY clause to the query, but that returns different ordering
depending on the LC_COLLATE setting on a given machine. So enforce the correct
ordering by specifying the desired collation in the query itself.

src/test/regress/expected/select_views.out
src/test/regress/sql/select_views.sql

index 59b8d136f33ef74ad4660c9726344d698e200f68..4ab3a7c9d53bdc742b1bcde672a0759dc70f898e 100644 (file)
@@ -2,7 +2,7 @@
 -- SELECT_VIEWS
 -- test the views defined in CREATE_VIEWS
 --
-SELECT * FROM street ORDER BY name,cname,thepath::text;
+SELECT * FROM street ORDER BY name COLLATE "C",cname COLLATE "C",thepath::text COLLATE "C";
                 name                |                                                                                                                                                                                                                   thepath                                                                                                                                                                                                                    |   cname   
 ------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------
  100th                         Ave  | [(-122.1657,37.429),(-122.1647,37.432)]                                                                                                                                                                                                                                                                                                                                                                                                      | Oakland
index 1b175469125a3c54a992e5638450f6f683c096a9..2a79e410308a4c61d81593ee97719ec0c3e1c419 100644 (file)
@@ -3,7 +3,7 @@
 -- test the views defined in CREATE_VIEWS
 --
 
-SELECT * FROM street ORDER BY name,cname,thepath::text;
+SELECT * FROM street ORDER BY name COLLATE "C",cname COLLATE "C",thepath::text COLLATE "C";
 
 SELECT name, #thepath FROM iexit ORDER BY name COLLATE "C", 2;