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:
@ -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
|
||||
|
Reference in New Issue
Block a user