Skip to content

Commit 31c47e5

Browse files
committed
Rename hstore => text[] operator to %
This is not yet in any released version, so we still have the option to change the name. We may want to reserve the token => in a future release.
1 parent 78e8f00 commit 31c47e5

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

contrib/hstore/expected/hstore.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -757,39 +757,39 @@ select pg_column_size('a=>g, b=>c'::hstore || ('b'=>'gf'))
757757
t
758758
(1 row)
759759

760-
-- => arrays
761-
select hstore 'aa=>1, b=>2, c=>3' => ARRAY['g','h','i'];
760+
-- %
761+
select hstore 'aa=>1, b=>2, c=>3' % ARRAY['g','h','i'];
762762
?column?
763763
----------
764764

765765
(1 row)
766766

767-
select hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b'];
767+
select hstore 'aa=>1, b=>2, c=>3' % ARRAY['c','b'];
768768
?column?
769769
--------------------
770770
"b"=>"2", "c"=>"3"
771771
(1 row)
772772

773-
select hstore 'aa=>1, b=>2, c=>3' => ARRAY['aa','b'];
773+
select hstore 'aa=>1, b=>2, c=>3' % ARRAY['aa','b'];
774774
?column?
775775
---------------------
776776
"b"=>"2", "aa"=>"1"
777777
(1 row)
778778

779-
select hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b','aa'];
779+
select hstore 'aa=>1, b=>2, c=>3' % ARRAY['c','b','aa'];
780780
?column?
781781
-------------------------------
782782
"b"=>"2", "c"=>"3", "aa"=>"1"
783783
(1 row)
784784

785-
select pg_column_size(hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b'])
785+
select pg_column_size(hstore 'aa=>1, b=>2, c=>3' % ARRAY['c','b'])
786786
= pg_column_size('b=>2, c=>3'::hstore);
787787
?column?
788788
----------
789789
t
790790
(1 row)
791791

792-
select pg_column_size(hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b','aa'])
792+
select pg_column_size(hstore 'aa=>1, b=>2, c=>3' % ARRAY['c','b','aa'])
793793
= pg_column_size('aa=>1, b=>2, c=>3'::hstore);
794794
?column?
795795
----------

contrib/hstore/hstore.sql.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/contrib/hstore/hstore.sql.in,v 1.13 2010/06/15 19:48:30 rhaas Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/hstore/hstore.sql.in,v 1.14 2010/06/18 03:52:02 rhaas Exp $ */
22

33
-- Adjust this setting to control where the objects get created.
44
SET search_path = public;
@@ -66,7 +66,7 @@ RETURNS hstore
6666
AS 'MODULE_PATHNAME','hstore_slice_to_hstore'
6767
LANGUAGE C STRICT IMMUTABLE;
6868

69-
CREATE OPERATOR => (
69+
CREATE OPERATOR % (
7070
LEFTARG = hstore,
7171
RIGHTARG = text[],
7272
PROCEDURE = slice_hstore

contrib/hstore/sql/hstore.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,14 @@ select pg_column_size(('b'=>'gf'))
171171
select pg_column_size('a=>g, b=>c'::hstore || ('b'=>'gf'))
172172
= pg_column_size('a=>g, b=>gf'::hstore);
173173

174-
-- => arrays
175-
select hstore 'aa=>1, b=>2, c=>3' => ARRAY['g','h','i'];
176-
select hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b'];
177-
select hstore 'aa=>1, b=>2, c=>3' => ARRAY['aa','b'];
178-
select hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b','aa'];
179-
select pg_column_size(hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b'])
174+
-- %
175+
select hstore 'aa=>1, b=>2, c=>3' % ARRAY['g','h','i'];
176+
select hstore 'aa=>1, b=>2, c=>3' % ARRAY['c','b'];
177+
select hstore 'aa=>1, b=>2, c=>3' % ARRAY['aa','b'];
178+
select hstore 'aa=>1, b=>2, c=>3' % ARRAY['c','b','aa'];
179+
select pg_column_size(hstore 'aa=>1, b=>2, c=>3' % ARRAY['c','b'])
180180
= pg_column_size('b=>2, c=>3'::hstore);
181-
select pg_column_size(hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b','aa'])
181+
select pg_column_size(hstore 'aa=>1, b=>2, c=>3' % ARRAY['c','b','aa'])
182182
= pg_column_size('aa=>1, b=>2, c=>3'::hstore);
183183

184184
-- array input

contrib/hstore/uninstall_hstore.sql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/contrib/hstore/uninstall_hstore.sql,v 1.9 2009/09/30 19:50:22 tgl Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/hstore/uninstall_hstore.sql,v 1.10 2010/06/18 03:52:02 rhaas Exp $ */
22

33
-- Adjust this setting to control where the objects get dropped.
44
SET search_path = public;
@@ -22,8 +22,7 @@ DROP OPERATOR <@ ( hstore, hstore );
2222
DROP OPERATOR @ ( hstore, hstore );
2323
DROP OPERATOR ~ ( hstore, hstore );
2424
DROP OPERATOR => ( text, text );
25-
DROP OPERATOR => ( text[], text[] );
26-
DROP OPERATOR => ( hstore, text[] );
25+
DROP OPERATOR % ( hstore, text[] );
2726
DROP OPERATOR #= ( anyelement, hstore );
2827
DROP OPERATOR %% ( NONE, hstore );
2928
DROP OPERATOR %# ( NONE, hstore );

doc/src/sgml/hstore.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/hstore.sgml,v 1.9 2010/06/15 19:48:30 rhaas Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/hstore.sgml,v 1.10 2010/06/18 03:52:03 rhaas Exp $ -->
22

33
<sect1 id="hstore">
44
<title>hstore</title>
@@ -121,9 +121,9 @@
121121
</row>
122122

123123
<row>
124-
<entry><type>hstore</> <literal>=&gt;</> <type>text[]</></entry>
124+
<entry><type>hstore</> <literal>%</> <type>text[]</></entry>
125125
<entry>extract a subset of an <type>hstore</></entry>
126-
<entry><literal>'a=&gt;1,b=&gt;2,c=&gt;3'::hstore =&gt; ARRAY['b','c','x']</literal></entry>
126+
<entry><literal>'a=&gt;1,b=&gt;2,c=&gt;3'::hstore % ARRAY['b','c','x']</literal></entry>
127127
<entry><literal>"b"=&gt;"2", "c"=&gt;"3"</literal></entry>
128128
</row>
129129

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy