1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

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.
This commit is contained in:
Robert Haas
2010-06-18 03:52:03 +00:00
parent 78e8f0025e
commit 31c47e53aa
5 changed files with 21 additions and 22 deletions

View File

@ -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