From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: hstore ==> and deprecate => |
Date: | 2010-06-18 03:04:45 |
Message-ID: | 4C1AE24D.3030308@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>
>> Currently for hstore, %% returns a flattened array and %# returns a
>> two-dimensional array. That means that it makes sense that the operator
>> which returns an hstore subset should be something based on %, either
>> %>, %% or just %.
>>
>
> But %% and %# are prefix operators. Extrapolating from those to an
> infix operator seems a bit thin. Nonetheless, something using % seems
> better than something using &, for the other reasons you mention.
>
>
>> I vote for % .
>>
>
> I'd vote for %>, out of those. Reason: the operator isn't commutative,
> in fact left and right inputs aren't even the same datatype, so a glyph
> that looks asymmetric seems more natural.
>
>
I think this bikeshed is going to be more paint than shed. However, I
just wondered about | as the operator. Think of the right hand operand
as a filter on the hstore, and a pipe seems to work.
Lots of operators aren't commutative. Arithmetic % for example ;-)
But honestly, I can live with just about anything.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-06-18 03:09:02 | Re: modular se-pgsql as proof-of-concept |
Previous Message | Takahiro Itagaki | 2010-06-18 02:33:27 | system views for walsender activity |