Skip site navigation (1) Skip section navigation (2)

Re: functional call named notation clashes with SQL feature

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Florian Pflug <fgp(at)phlo(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: functional call named notation clashes with SQL feature
Date: 2010-06-01 02:40:35
Message-ID: AANLkTik9AVOzx1qkwraiWBUN2HYKdBk4aLaZoCJKrB4s@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, May 31, 2010 at 9:24 PM, Florian Pflug <fgp(at)phlo(dot)org> wrote:
> On Jun 1, 2010, at 0:23 , Tom Lane wrote:
>> "David E. Wheeler" <david(at)kineticode(dot)com> writes:
>>> On May 31, 2010, at 8:56 AM, Andrew Dunstan wrote:
>>>> I don't have strong feelings about the timing - I'd be very surprised if := were to be used in this context for any other purpose, so I don't think we'd be biting ourselves too much by just using that now. But if we do that, we should deprecate use of => as an operator now, and definitely remove its use in hstore either now or in 9.1.
>>
>> My feeling is that (a) there is no hurry to do anything about an
>> unreleased draft of the standard, and (b) perhaps Peter could lobby
>> the committee to change the standard before it does get published.
>>
>> hstore's use of => is pretty well embedded already; waiting another
>> release or two before breaking things is not going to make it
>> significantly more painful.
>
>
> There might be some value in providing an alternative operator though, even if there is no definitive plan to deprecate '=>'.
>
> hstore gained quite a few new features in 9.0 that might attract new users. If there is even a slight chance that '=>' will be deprecated during the next few releases, it'd be nice to save these users the hassle of migration...
>
> For text => text and text[] => text[] I'd propose '||>' as an alternative, since they both combine their arguments, kind of a like a concatenation.
> For hstore => text[] I'd suggest '&>' since the result's set of keys is the intersection of both argument's key-sets.

I was going to propose ==> across the board.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

pgsql-hackers by date

Next:From: Takahiro ItagakiDate: 2010-06-01 02:55:11
Subject: Re: BUG #5487: dblink failed with 63 bytes connection names
Previous:From: Takahiro ItagakiDate: 2010-06-01 02:17:15
Subject: BUG #5487: dblink failed with 63 bytes connection names

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group