| From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> | 
|---|---|
| To: | david(at)kineticode(dot)com ("David E(dot) Wheeler"), pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: hstore improvements? | 
| Date: | 2009-03-13 20:21:51 | 
| Message-ID: | 87zlfpgom8.fsf@news-spur.riddles.org.uk | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
>>>>> "David" == "David E Wheeler" <david(at)kineticode(dot)com> writes:
 > On Mar 13, 2009, at 11:06 AM, Andrew Gierth wrote:
 >> If there's any other features that people find notably missing
 >> from hstore, I could stick them in too; any requests?
 David> Can you create slices? That is, create a new hstore as a
 David> subset of an existing hstore?
ooh. good point. What would be a good operator for that?
I'm thinking that (hstore -> text[]) should probably return text[],
and maybe (hstore => text[]) returning hstore?
i.e.
select ('a=>1,b=>2,c=>3'::hstore) -> ARRAY['a','b'];
  -- returns '{1,2}'
select ('a=>1,b=>2,c=>3'::hstore) => ARRAY['a','b'];
  -- returns 'a=>1,b=>2'
(by analogy to the existing operators -> for lookup and => for
construction)
-- 
Andrew (irc:RhodiumToad)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Gierth | 2009-03-13 20:30:46 | Re: hstore improvements? | 
| Previous Message | Tom Lane | 2009-03-13 20:12:04 | Re: hstore improvements? |