From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Florian Pflug <fgp(at)phlo(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Michael Glaesemann <grzm(at)seespotcode(dot)net>, Merlin Moncure <mmoncure(at)gmail(dot)com> |
Subject: | Re: hstore ==> and deprecate => |
Date: | 2010-06-21 17:37:02 |
Message-ID: | 1740AA8D-A63B-4B6A-9D30-F592FC302FCF@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Jun 17, 2010, at 1:30 PM, Florian Pflug wrote:
> How about turning it into a function
> hstore hstore(hstore, text[])
> instead?
I just searched through the 2008 spec for a slice/subset operator and came up empty. It seems to define a bunch of predicates for multisets, but not much for arrays.
And looking again at the options, I'm *okay* with %, but not keen on %> anymore (I could see a future where %> and <% it as complement @> and <@ by confirming the presence of keys in an hstore:
bool = hstore %> text[];
So, frankly, I'm coming back to what Florian has suggested here. What about calling it slice?
hstore = slice(hstore, text[]);
It'd be nice to have one for arrays, too:
anyarray[] = slice(anyarray[], int[]);
An operator could always be added later if a good one appeared.
Okay, no more bikeshedding for me on this issue. I'm covered in paint.
Best,
David
From | Date | Subject | |
---|---|---|---|
Next Message | Dimitri Fontaine | 2010-06-21 17:46:17 | Re: deprecating =>, take two |
Previous Message | Robert Haas | 2010-06-21 17:33:32 | Re: deprecating =>, take two |