hstore_arrow_text_to_logical_and.patch
application/octet-stream
Filename: hstore_arrow_text_to_logical_and.patch
Type: application/octet-stream
Part: 0
Message:
Re: hstore ==> and deprecate =>
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| contrib/hstore/hstore.sql.in | 1 | 1 |
| contrib/hstore/sql/hstore.sql | 7 | 7 |
| contrib/hstore/uninstall_hstore.sql | 1 | 2 |
| doc/src/sgml/hstore.sgml | 2 | 2 |
diff --git a/contrib/hstore/hstore.sql.in b/contrib/hstore/hstore.sql.in
index aa33829..4d01a31 100644
--- a/contrib/hstore/hstore.sql.in
+++ b/contrib/hstore/hstore.sql.in
@@ -66,7 +66,7 @@ RETURNS hstore
AS 'MODULE_PATHNAME','hstore_slice_to_hstore'
LANGUAGE C STRICT IMMUTABLE;
-CREATE OPERATOR => (
+CREATE OPERATOR & (
LEFTARG = hstore,
RIGHTARG = text[],
PROCEDURE = slice_hstore
diff --git a/contrib/hstore/sql/hstore.sql b/contrib/hstore/sql/hstore.sql
index 190d7a2..00b31a5 100644
--- a/contrib/hstore/sql/hstore.sql
+++ b/contrib/hstore/sql/hstore.sql
@@ -171,14 +171,14 @@ select pg_column_size(('b'=>'gf'))
select pg_column_size('a=>g, b=>c'::hstore || ('b'=>'gf'))
= pg_column_size('a=>g, b=>gf'::hstore);
--- => arrays
-select hstore 'aa=>1, b=>2, c=>3' => ARRAY['g','h','i'];
-select hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b'];
-select hstore 'aa=>1, b=>2, c=>3' => ARRAY['aa','b'];
-select hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b','aa'];
-select pg_column_size(hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b'])
+-- &
+select hstore 'aa=>1, b=>2, c=>3' & ARRAY['g','h','i'];
+select hstore 'aa=>1, b=>2, c=>3' & ARRAY['c','b'];
+select hstore 'aa=>1, b=>2, c=>3' & ARRAY['aa','b'];
+select hstore 'aa=>1, b=>2, c=>3' & ARRAY['c','b','aa'];
+select pg_column_size(hstore 'aa=>1, b=>2, c=>3' & ARRAY['c','b'])
= pg_column_size('b=>2, c=>3'::hstore);
-select pg_column_size(hstore 'aa=>1, b=>2, c=>3' => ARRAY['c','b','aa'])
+select pg_column_size(hstore 'aa=>1, b=>2, c=>3' & ARRAY['c','b','aa'])
= pg_column_size('aa=>1, b=>2, c=>3'::hstore);
-- array input
diff --git a/contrib/hstore/uninstall_hstore.sql b/contrib/hstore/uninstall_hstore.sql
index 27463b9..f524c3d 100644
--- a/contrib/hstore/uninstall_hstore.sql
+++ b/contrib/hstore/uninstall_hstore.sql
@@ -22,8 +22,7 @@ DROP OPERATOR <@ ( hstore, hstore );
DROP OPERATOR @ ( hstore, hstore );
DROP OPERATOR ~ ( hstore, hstore );
DROP OPERATOR => ( text, text );
-DROP OPERATOR => ( text[], text[] );
-DROP OPERATOR => ( hstore, text[] );
+DROP OPERATOR & ( hstore, text[] );
DROP OPERATOR #= ( anyelement, hstore );
DROP OPERATOR %% ( NONE, hstore );
DROP OPERATOR %# ( NONE, hstore );
diff --git a/doc/src/sgml/hstore.sgml b/doc/src/sgml/hstore.sgml
index d65a487..cac4d42 100644
--- a/doc/src/sgml/hstore.sgml
+++ b/doc/src/sgml/hstore.sgml
@@ -121,9 +121,9 @@
</row>
<row>
- <entry><type>hstore</> <literal>=></> <type>text[]</></entry>
+ <entry><type>hstore</> <literal>&</> <type>text[]</></entry>
<entry>extract a subset of an <type>hstore</></entry>
- <entry><literal>'a=>1,b=>2,c=>3'::hstore => ARRAY['b','c','x']</literal></entry>
+ <entry><literal>'a=>1,b=>2,c=>3'::hstore & ARRAY['b','c','x']</literal></entry>
<entry><literal>"b"=>"2", "c"=>"3"</literal></entry>
</row>