Remove hstore tests that just reflect change in output format
authorPeter Geoghegan <[email protected]>
Thu, 6 Mar 2014 05:10:33 +0000 (21:10 -0800)
committerPeter Geoghegan <[email protected]>
Thu, 6 Mar 2014 05:10:33 +0000 (21:10 -0800)
contrib/hstore/expected/hstore.out

index 6e96ff2a19b202e5b6b9929889d53a2e5007f503..7eeb595f6746805007f525cc81cc0335c52eee5f 100644 (file)
@@ -450,63 +450,63 @@ select hstore 'a=>NULL, b=>qq' ?& '{}'::text[];
 
 -- delete
 select delete('a=>1 , b=>2, c=>3'::hstore, 'a');
-     delete     
-----------------
- "b"=>2, "c"=>3
+       delete       
+--------------------
+ "b"=>"2", "c"=>"3"
 (1 row)
 
 select delete('a=>null , b=>2, c=>3'::hstore, 'a');
-     delete     
-----------------
- "b"=>2, "c"=>3
+       delete       
+--------------------
+ "b"=>"2", "c"=>"3"
 (1 row)
 
 select delete('a=>1 , b=>2, c=>3'::hstore, 'b');
-     delete     
-----------------
- "a"=>1, "c"=>3
+       delete       
+--------------------
+ "a"=>"1", "c"=>"3"
 (1 row)
 
 select delete('a=>1 , b=>2, c=>3'::hstore, 'c');
-     delete     
-----------------
- "a"=>1, "b"=>2
+       delete       
+--------------------
+ "a"=>"1", "b"=>"2"
 (1 row)
 
 select delete('a=>1 , b=>2, c=>3'::hstore, 'd');
-         delete         
-------------------------
- "a"=>1, "b"=>2, "c"=>3
+            delete            
+------------------------------
+ "a"=>"1", "b"=>"2", "c"=>"3"
 (1 row)
 
 select 'a=>1 , b=>2, c=>3'::hstore - 'a'::text;
-    ?column?    
-----------------
- "b"=>2, "c"=>3
+      ?column?      
+--------------------
+ "b"=>"2", "c"=>"3"
 (1 row)
 
 select 'a=>null , b=>2, c=>3'::hstore - 'a'::text;
-    ?column?    
-----------------
- "b"=>2, "c"=>3
+      ?column?      
+--------------------
+ "b"=>"2", "c"=>"3"
 (1 row)
 
 select 'a=>1 , b=>2, c=>3'::hstore - 'b'::text;
-    ?column?    
-----------------
- "a"=>1, "c"=>3
+      ?column?      
+--------------------
+ "a"=>"1", "c"=>"3"
 (1 row)
 
 select 'a=>1 , b=>2, c=>3'::hstore - 'c'::text;
-    ?column?    
-----------------
- "a"=>1, "b"=>2
+      ?column?      
+--------------------
+ "a"=>"1", "b"=>"2"
 (1 row)
 
 select 'a=>1 , b=>2, c=>3'::hstore - 'd'::text;
-        ?column?        
-------------------------
- "a"=>1, "b"=>2, "c"=>3
+           ?column?           
+------------------------------
+ "a"=>"1", "b"=>"2", "c"=>"3"
 (1 row)
 
 select pg_column_size('a=>1 , b=>2, c=>3'::hstore - 'b'::text)
@@ -518,21 +518,21 @@ select pg_column_size('a=>1 , b=>2, c=>3'::hstore - 'b'::text)
 
 -- delete (array)
 select delete('a=>1 , b=>2, c=>3'::hstore, ARRAY['d','e']);
-         delete         
-------------------------
- "a"=>1, "b"=>2, "c"=>3
+            delete            
+------------------------------
+ "a"=>"1", "b"=>"2", "c"=>"3"
 (1 row)
 
 select delete('a=>1 , b=>2, c=>3'::hstore, ARRAY['d','b']);
-     delete     
-----------------
- "a"=>1, "c"=>3
+       delete       
+--------------------
+ "a"=>"1", "c"=>"3"
 (1 row)
 
 select delete('a=>1 , b=>2, c=>3'::hstore, ARRAY['a','c']);
- delete 
---------
- "b"=>2
+  delete  
+----------
+ "b"=>"2"
 (1 row)
 
 select delete('a=>1 , b=>2, c=>3'::hstore, ARRAY[['b'],['c'],['a']]);
@@ -542,27 +542,27 @@ select delete('a=>1 , b=>2, c=>3'::hstore, ARRAY[['b'],['c'],['a']]);
 (1 row)
 
 select delete('a=>1 , b=>2, c=>3'::hstore, '{}'::text[]);
-         delete         
-------------------------
- "a"=>1, "b"=>2, "c"=>3
+            delete            
+------------------------------
+ "a"=>"1", "b"=>"2", "c"=>"3"
 (1 row)
 
 select 'a=>1 , b=>2, c=>3'::hstore - ARRAY['d','e'];
-        ?column?        
-------------------------
- "a"=>1, "b"=>2, "c"=>3
+           ?column?           
+------------------------------
+ "a"=>"1", "b"=>"2", "c"=>"3"
 (1 row)
 
 select 'a=>1 , b=>2, c=>3'::hstore - ARRAY['d','b'];
-    ?column?    
-----------------
- "a"=>1, "c"=>3
+      ?column?      
+--------------------
+ "a"=>"1", "c"=>"3"
 (1 row)
 
 select 'a=>1 , b=>2, c=>3'::hstore - ARRAY['a','c'];
  ?column? 
 ----------
- "b"=>2
+ "b"=>"2"
 (1 row)
 
 select 'a=>1 , b=>2, c=>3'::hstore - ARRAY[['b'],['c'],['a']];
@@ -572,9 +572,9 @@ select 'a=>1 , b=>2, c=>3'::hstore - ARRAY[['b'],['c'],['a']];
 (1 row)
 
 select 'a=>1 , b=>2, c=>3'::hstore - '{}'::text[];
-        ?column?        
-------------------------
- "a"=>1, "b"=>2, "c"=>3
+           ?column?           
+------------------------------
+ "a"=>"1", "b"=>"2", "c"=>"3"
 (1 row)
 
 select pg_column_size('a=>1 , b=>2, c=>3'::hstore - ARRAY['a','c'])
@@ -593,15 +593,15 @@ select pg_column_size('a=>1 , b=>2, c=>3'::hstore - '{}'::text[])
 
 -- delete (hstore)
 select delete('aa=>1 , b=>2, c=>3'::hstore, 'aa=>4, b=>2'::hstore);
-     delete      
------------------
- "c"=>3, "aa"=>1
+       delete        
+---------------------
+ "c"=>"3", "aa"=>"1"
 (1 row)
 
 select delete('aa=>1 , b=>2, c=>3'::hstore, 'aa=>NULL, c=>3'::hstore);
-     delete      
------------------
- "b"=>2, "aa"=>1
+       delete        
+---------------------
+ "b"=>"2", "aa"=>"1"
 (1 row)
 
 select delete('aa=>1 , b=>2, c=>3'::hstore, 'aa=>1, b=>2, c=>3'::hstore);
@@ -611,27 +611,27 @@ select delete('aa=>1 , b=>2, c=>3'::hstore, 'aa=>1, b=>2, c=>3'::hstore);
 (1 row)
 
 select delete('aa=>1 , b=>2, c=>3'::hstore, 'b=>2'::hstore);
-     delete      
------------------
- "c"=>3, "aa"=>1
+       delete        
+---------------------
+ "c"=>"3", "aa"=>"1"
 (1 row)
 
 select delete('aa=>1 , b=>2, c=>3'::hstore, ''::hstore);
-         delete          
--------------------------
- "b"=>2, "c"=>3, "aa"=>1
+            delete             
+-------------------------------
+ "b"=>"2", "c"=>"3", "aa"=>"1"
 (1 row)
 
 select 'aa=>1 , b=>2, c=>3'::hstore - 'aa=>4, b=>2'::hstore;
-    ?column?     
------------------
- "c"=>3, "aa"=>1
+      ?column?       
+---------------------
+ "c"=>"3", "aa"=>"1"
 (1 row)
 
 select 'aa=>1 , b=>2, c=>3'::hstore - 'aa=>NULL, c=>3'::hstore;
-    ?column?     
------------------
- "b"=>2, "aa"=>1
+      ?column?       
+---------------------
+ "b"=>"2", "aa"=>"1"
 (1 row)
 
 select 'aa=>1 , b=>2, c=>3'::hstore - 'aa=>1, b=>2, c=>3'::hstore;
@@ -641,15 +641,15 @@ select 'aa=>1 , b=>2, c=>3'::hstore - 'aa=>1, b=>2, c=>3'::hstore;
 (1 row)
 
 select 'aa=>1 , b=>2, c=>3'::hstore - 'b=>2'::hstore;
-    ?column?     
------------------
- "c"=>3, "aa"=>1
+      ?column?       
+---------------------
+ "c"=>"3", "aa"=>"1"
 (1 row)
 
 select 'aa=>1 , b=>2, c=>3'::hstore - ''::hstore;
-        ?column?         
--------------------------
- "b"=>2, "c"=>3, "aa"=>1
+           ?column?            
+-------------------------------
+ "b"=>"2", "c"=>"3", "aa"=>"1"
 (1 row)
 
 select pg_column_size('a=>1 , b=>2, c=>3'::hstore - 'b=>2'::hstore)
@@ -668,33 +668,33 @@ select pg_column_size('a=>1 , b=>2, c=>3'::hstore - ''::hstore)
 
 -- ||
 select 'aa=>1 , b=>2, cq=>3'::hstore || 'cq=>l, b=>g, fg=>f';
-               ?column?                
----------------------------------------
- "b"=>"g", "aa"=>1, "cq"=>"l", "fg"=>f
+                 ?column?                  
+-------------------------------------------
+ "b"=>"g", "aa"=>"1", "cq"=>"l", "fg"=>"f"
 (1 row)
 
 select 'aa=>1 , b=>2, cq=>3'::hstore || 'aq=>l';
-              ?column?               
--------------------------------------
- "b"=>2, "aa"=>1, "aq"=>"l", "cq"=>3
+                 ?column?                  
+-------------------------------------------
+ "b"=>"2", "aa"=>"1", "aq"=>"l", "cq"=>"3"
 (1 row)
 
 select 'aa=>1 , b=>2, cq=>3'::hstore || 'aa=>l';
-          ?column?          
-----------------------------
- "b"=>2, "aa"=>"l", "cq"=>3
+            ?column?            
+--------------------------------
+ "b"=>"2", "aa"=>"l", "cq"=>"3"
 (1 row)
 
 select 'aa=>1 , b=>2, cq=>3'::hstore || '';
-         ?column?         
---------------------------
- "b"=>2, "aa"=>1, "cq"=>3
+            ?column?            
+--------------------------------
+ "b"=>"2", "aa"=>"1", "cq"=>"3"
 (1 row)
 
 select ''::hstore || 'cq=>l, b=>g, fg=>f';
-           ?column?           
-------------------------------
- "b"=>"g", "cq"=>"l", "fg"=>f
+            ?column?            
+--------------------------------
+ "b"=>"g", "cq"=>"l", "fg"=>"f"
 (1 row)
 
 select pg_column_size(''::hstore || ''::hstore) = pg_column_size(''::hstore);
@@ -777,21 +777,21 @@ select slice(hstore 'aa=>1, b=>2, c=>3', ARRAY['g','h','i']);
 (1 row)
 
 select slice(hstore 'aa=>1, b=>2, c=>3', ARRAY['c','b']);
-     slice      
-----------------
- "b"=>2, "c"=>3
+       slice        
+--------------------
+ "b"=>"2", "c"=>"3"
 (1 row)
 
 select slice(hstore 'aa=>1, b=>2, c=>3', ARRAY['aa','b']);
-      slice      
------------------
- "b"=>2, "aa"=>1
+        slice        
+---------------------
+ "b"=>"2", "aa"=>"1"
 (1 row)
 
 select slice(hstore 'aa=>1, b=>2, c=>3', ARRAY['c','b','aa']);
-          slice          
--------------------------
- "b"=>2, "c"=>3, "aa"=>1
+             slice             
+-------------------------------
+ "b"=>"2", "c"=>"3", "aa"=>"1"
 (1 row)
 
 select pg_column_size(slice(hstore 'aa=>1, b=>2, c=>3', ARRAY['c','b']))
@@ -925,9 +925,9 @@ select pg_column_size(hstore(ARRAY['a','b','asd'], ARRAY['g','h','i']))
 
 -- records
 select hstore(v) from (values (1, 'foo', 1.2, 3::float8)) v(a,b,c,d);
-                hstore                
---------------------------------------
- "a"=>1, "b"=>"foo", "c"=>1.2, "d"=>3
+                   hstore                   
+--------------------------------------------
+ "a"=>"1", "b"=>"foo", "c"=>"1.2", "d"=>"3"
 (1 row)
 
 create domain hstestdom1 as integer not null default 0;
@@ -936,9 +936,9 @@ create table testhstore1 (a integer, b text, c numeric, d float8, e hstestdom1);
 insert into testhstore0 values (1, 'foo', 1.2, 3::float8);
 insert into testhstore1 values (1, 'foo', 1.2, 3::float8);
 select hstore(v) from testhstore1 v;
-                    hstore                    
-----------------------------------------------
- "a"=>1, "b"=>"foo", "c"=>1.2, "d"=>3, "e"=>0
+                        hstore                        
+------------------------------------------------------
+ "a"=>"1", "b"=>"foo", "c"=>"1.2", "d"=>"3", "e"=>"0"
 (1 row)
 
 select hstore(null::testhstore0);
@@ -954,7 +954,7 @@ select hstore(null::testhstore1);
 (1 row)
 
 select pg_column_size(hstore(v))
-         = pg_column_size('a=>1, b=>"foo", c=>1.2, d=>3, e=>0'::hstore)
+         = pg_column_size('a=>1, b=>"foo", c=>"1.2", d=>"3", e=>"0"'::hstore)
   from testhstore1 v;
  ?column? 
 ----------
@@ -1574,37 +1574,37 @@ RESET enable_seqscan;
 drop index hidx;
 -- json
 select hstore_to_json('"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4');
-                                   hstore_to_json                                   
-------------------------------------------------------------------------------------
- {"b": true, "c": null, "d": 12345, "e": 12345, "f": 1.234, "g": 23450, "a key": 1}
+                                         hstore_to_json                                          
+-------------------------------------------------------------------------------------------------
+ {"b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4", "a key": "1"}
 (1 row)
 
 select cast( hstore  '"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4' as json);
-                                        json                                        
-------------------------------------------------------------------------------------
- {"b": true, "c": null, "d": 12345, "e": 12345, "f": 1.234, "g": 23450, "a key": 1}
+                                              json                                               
+-------------------------------------------------------------------------------------------------
+ {"b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4", "a key": "1"}
 (1 row)
 
 select hstore_to_json_loose('"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4');
-                                hstore_to_json_loose                                
-------------------------------------------------------------------------------------
- {"b": true, "c": null, "d": 12345, "e": 12345, "f": 1.234, "g": 23450, "a key": 1}
+                                   hstore_to_json_loose                                   
+------------------------------------------------------------------------------------------
+ {"b": true, "c": null, "d": 12345, "e": "012345", "f": 1.234, "g": 2.345e+4, "a key": 1}
 (1 row)
 
 create table test_json_agg (f1 text, f2 hstore);
 insert into test_json_agg values ('rec1','"a key" =>1, b => t, c => null, d=> 12345, e => 012345, f=> 1.234, g=> 2.345e+4'),
        ('rec2','"a key" =>2, b => f, c => "null", d=> -12345, e => 012345.6, f=> -1.234, g=> 0.345e-4');
 select json_agg(q) from test_json_agg q;
-                                                      json_agg                                                      
---------------------------------------------------------------------------------------------------------------------
- [{"f1":"rec1","f2":{"b": true, "c": null, "d": 12345, "e": 12345, "f": 1.234, "g": 23450, "a key": 1}},           +
-  {"f1":"rec2","f2":{"b": false, "c": "null", "d": -12345, "e": 12345.6, "f": -1.234, "g": 0.0000345, "a key": 2}}]
+                                                          json_agg                                                          
+----------------------------------------------------------------------------------------------------------------------------
+ [{"f1":"rec1","f2":{"b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4", "a key": "1"}},      +
+  {"f1":"rec2","f2":{"b": "f", "c": "null", "d": "-12345", "e": "012345.6", "f": "-1.234", "g": "0.345e-4", "a key": "2"}}]
 (1 row)
 
 select json_agg(q) from (select f1, hstore_to_json_loose(f2) as f2 from test_json_agg) q;
-                                                      json_agg                                                      
---------------------------------------------------------------------------------------------------------------------
- [{"f1":"rec1","f2":{"b": true, "c": null, "d": 12345, "e": 12345, "f": 1.234, "g": 23450, "a key": 1}},           +
-  {"f1":"rec2","f2":{"b": false, "c": "null", "d": -12345, "e": 12345.6, "f": -1.234, "g": 0.0000345, "a key": 2}}]
+                                                       json_agg                                                       
+----------------------------------------------------------------------------------------------------------------------
+ [{"f1":"rec1","f2":{"b": true, "c": null, "d": 12345, "e": "012345", "f": 1.234, "g": 2.345e+4, "a key": 1}},       +
+  {"f1":"rec2","f2":{"b": false, "c": "null", "d": -12345, "e": "012345.6", "f": -1.234, "g": 0.345e-4, "a key": 2}}]
 (1 row)