Test sql and output changes for some contrib modules
authorPallavi Sontakke <[email protected]>
Mon, 15 Feb 2016 13:04:51 +0000 (18:34 +0530)
committerPallavi Sontakke <[email protected]>
Mon, 15 Feb 2016 13:04:51 +0000 (18:34 +0530)
Accept expected XL behavior. Add ORDER BY where needed.

contrib/citext/expected/citext_1.out
contrib/citext/sql/citext.sql
contrib/ltree/expected/ltree.out
contrib/pg_trgm/expected/pg_trgm.out

index fcadd8d3929ff6e54a3a9d9d150f36592e0d2486..d2791a5eb4695d65779cf1eb11e12e2a0b73b960 100644 (file)
@@ -519,14 +519,14 @@ SELECT name FROM srt WHERE name !~ 'A$' ORDER BY name;
 (3 rows)
 
 -- SIMILAR TO should be case-insensitive.
-SELECT name FROM srt WHERE name SIMILAR TO '%a.*';
+SELECT name FROM srt WHERE name SIMILAR TO '%a.*' order by name;
  name 
 ------
  AAA
  aba
 (2 rows)
 
-SELECT name FROM srt WHERE name SIMILAR TO '%A.*';
+SELECT name FROM srt WHERE name SIMILAR TO '%A.*' order by name;
  name 
 ------
  AAA
@@ -2314,11 +2314,13 @@ SELECT *
 (2 rows)
 
 REFRESH MATERIALIZED VIEW CONCURRENTLY citext_matview;
+ERROR:  schema "pg_temp_2" does not exist
+CONTEXT:  SQL statement "ANALYZE pg_temp_2.pg_temp_16514_2"
 SELECT * FROM citext_matview ORDER BY id;
  id | name  
 ----+-------
   1 | one
-  2 | Two
+  2 | two
   3 | three
   4 | 
   5 | 
index 950895baea7998e6ee6d2ec83f0767c754ee2caf..caaff70f6ce05083da9f5aff51dc3793cbe9729f 100644 (file)
@@ -173,8 +173,8 @@ SELECT name FROM srt WHERE name ~  '^A' ORDER BY name;
 SELECT name FROM srt WHERE name !~ 'A$' ORDER BY name;
 
 -- SIMILAR TO should be case-insensitive.
-SELECT name FROM srt WHERE name SIMILAR TO '%a.*';
-SELECT name FROM srt WHERE name SIMILAR TO '%A.*';
+SELECT name FROM srt WHERE name SIMILAR TO '%a.*' order by name;
+SELECT name FROM srt WHERE name SIMILAR TO '%A.*' order by name;
 
 -- Explicit casts.
 SELECT true::citext = 'true' AS t;
index da6e39a785f18a3b5504f6ad60e2937240eb33ac..17690406b63f6df0b077a48bc9fbeefc8ebf3ba8 100644 (file)
@@ -3322,6 +3322,7 @@ SELECT * FROM ltreetest WHERE t ? '{23.*.1,23.*.2}' order by t asc;
 (4 rows)
 
 create unique index tstidx on ltreetest (t);
+ERROR:  Cannot locally enforce a unique index on round robin distributed table.
 set enable_seqscan=off;
 SELECT * FROM ltreetest WHERE t <  '12.3' order by t asc;
                 t                 
@@ -5362,6 +5363,7 @@ SELECT * FROM ltreetest WHERE t >  '12.3' order by t asc;
 (882 rows)
 
 drop index tstidx;
+ERROR:  index "tstidx" does not exist
 create index tstidx on ltreetest using gist (t);
 set enable_seqscan=off;
 SELECT * FROM ltreetest WHERE t <  '12.3' order by t asc;
index 13b1fde1b8ba058bb69b8d8e7b2ad9e090ca6be6..d66dbca3502d7fc7f43d80110d6d53e38b58275e 100644 (file)
@@ -2324,12 +2324,14 @@ select t,similarity(t,'gwertyu1988') as sml from test_trgm where t % 'gwertyu198
 
 explain (costs off)
 select t <-> 'q0987wertyu0988', t from test_trgm order by t <-> 'q0987wertyu0988' limit 2;
-                    QUERY PLAN                     
----------------------------------------------------
+                          QUERY PLAN                           
+---------------------------------------------------------------
  Limit
-   ->  Index Scan using trgm_idx on test_trgm
-         Order By: (t <-> 'q0987wertyu0988'::text)
-(3 rows)
+   ->  Remote Subquery Scan on all (datanode_1,datanode_2)
+         ->  Limit
+               ->  Index Scan using trgm_idx on test_trgm
+                     Order By: (t <-> 'q0987wertyu0988'::text)
+(5 rows)
 
 select t <-> 'q0987wertyu0988', t from test_trgm order by t <-> 'q0987wertyu0988' limit 2;
  ?column? |      t      
@@ -3475,23 +3477,27 @@ create index test2_idx_gin on test2 using gin (t gin_trgm_ops);
 set enable_seqscan=off;
 explain (costs off)
   select * from test2 where t like '%BCD%';
-                QUERY PLAN                
-------------------------------------------
- Bitmap Heap Scan on test2
-   Recheck Cond: (t ~~ '%BCD%'::text)
-   ->  Bitmap Index Scan on test2_idx_gin
-         Index Cond: (t ~~ '%BCD%'::text)
-(4 rows)
+                   QUERY PLAN                   
+------------------------------------------------
+ Remote Fast Query Execution
+   Node/s: datanode_1, datanode_2
+   ->  Bitmap Heap Scan on test2
+         Recheck Cond: (t ~~ '%BCD%'::text)
+         ->  Bitmap Index Scan on test2_idx_gin
+               Index Cond: (t ~~ '%BCD%'::text)
+(6 rows)
 
 explain (costs off)
   select * from test2 where t ilike '%BCD%';
-                QUERY PLAN                 
--------------------------------------------
- Bitmap Heap Scan on test2
-   Recheck Cond: (t ~~* '%BCD%'::text)
-   ->  Bitmap Index Scan on test2_idx_gin
-         Index Cond: (t ~~* '%BCD%'::text)
-(4 rows)
+                   QUERY PLAN                    
+-------------------------------------------------
+ Remote Fast Query Execution
+   Node/s: datanode_1, datanode_2
+   ->  Bitmap Heap Scan on test2
+         Recheck Cond: (t ~~* '%BCD%'::text)
+         ->  Bitmap Index Scan on test2_idx_gin
+               Index Cond: (t ~~* '%BCD%'::text)
+(6 rows)
 
 select * from test2 where t like '%BCD%';
  t 
@@ -3536,23 +3542,27 @@ select * from test2 where t like '  z foo%';
 
 explain (costs off)
   select * from test2 where t ~ '[abc]{3}';
-                 QUERY PLAN                 
---------------------------------------------
- Bitmap Heap Scan on test2
-   Recheck Cond: (t ~ '[abc]{3}'::text)
-   ->  Bitmap Index Scan on test2_idx_gin
-         Index Cond: (t ~ '[abc]{3}'::text)
-(4 rows)
+                    QUERY PLAN                    
+--------------------------------------------------
+ Remote Fast Query Execution
+   Node/s: datanode_1, datanode_2
+   ->  Bitmap Heap Scan on test2
+         Recheck Cond: (t ~ '[abc]{3}'::text)
+         ->  Bitmap Index Scan on test2_idx_gin
+               Index Cond: (t ~ '[abc]{3}'::text)
+(6 rows)
 
 explain (costs off)
   select * from test2 where t ~* 'DEF';
-                QUERY PLAN                
-------------------------------------------
- Bitmap Heap Scan on test2
-   Recheck Cond: (t ~* 'DEF'::text)
-   ->  Bitmap Index Scan on test2_idx_gin
-         Index Cond: (t ~* 'DEF'::text)
-(4 rows)
+                   QUERY PLAN                   
+------------------------------------------------
+ Remote Fast Query Execution
+   Node/s: datanode_1, datanode_2
+   ->  Bitmap Heap Scan on test2
+         Recheck Cond: (t ~* 'DEF'::text)
+         ->  Bitmap Index Scan on test2_idx_gin
+               Index Cond: (t ~* 'DEF'::text)
+(6 rows)
 
 select * from test2 where t ~ '[abc]{3}';
    t    
@@ -3663,19 +3673,23 @@ create index test2_idx_gist on test2 using gist (t gist_trgm_ops);
 set enable_seqscan=off;
 explain (costs off)
   select * from test2 where t like '%BCD%';
-                QUERY PLAN                
-------------------------------------------
- Index Scan using test2_idx_gist on test2
-   Index Cond: (t ~~ '%BCD%'::text)
-(2 rows)
+                   QUERY PLAN                   
+------------------------------------------------
+ Remote Fast Query Execution
+   Node/s: datanode_1, datanode_2
+   ->  Index Scan using test2_idx_gist on test2
+         Index Cond: (t ~~ '%BCD%'::text)
+(4 rows)
 
 explain (costs off)
   select * from test2 where t ilike '%BCD%';
-                QUERY PLAN                
-------------------------------------------
- Index Scan using test2_idx_gist on test2
-   Index Cond: (t ~~* '%BCD%'::text)
-(2 rows)
+                   QUERY PLAN                   
+------------------------------------------------
+ Remote Fast Query Execution
+   Node/s: datanode_1, datanode_2
+   ->  Index Scan using test2_idx_gist on test2
+         Index Cond: (t ~~* '%BCD%'::text)
+(4 rows)
 
 select * from test2 where t like '%BCD%';
  t 
@@ -3720,19 +3734,23 @@ select * from test2 where t like '  z foo%';
 
 explain (costs off)
   select * from test2 where t ~ '[abc]{3}';
-                QUERY PLAN                
-------------------------------------------
- Index Scan using test2_idx_gist on test2
-   Index Cond: (t ~ '[abc]{3}'::text)
-(2 rows)
+                   QUERY PLAN                   
+------------------------------------------------
+ Remote Fast Query Execution
+   Node/s: datanode_1, datanode_2
+   ->  Index Scan using test2_idx_gist on test2
+         Index Cond: (t ~ '[abc]{3}'::text)
+(4 rows)
 
 explain (costs off)
   select * from test2 where t ~* 'DEF';
-                QUERY PLAN                
-------------------------------------------
- Index Scan using test2_idx_gist on test2
-   Index Cond: (t ~* 'DEF'::text)
-(2 rows)
+                   QUERY PLAN                   
+------------------------------------------------
+ Remote Fast Query Execution
+   Node/s: datanode_1, datanode_2
+   ->  Index Scan using test2_idx_gist on test2
+         Index Cond: (t ~* 'DEF'::text)
+(4 rows)
 
 select * from test2 where t ~ '[abc]{3}';
    t