Re: functional call named notation clashes with SQL feature

From: Florian Pflug <fgp(at)phlo(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "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 01:24:26
Message-ID: C88D37EB-8DCF-4895-810A-01A680E3DF12@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

best regards,
Florian Pflug

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Takahiro Itagaki 2010-06-01 02:17:15 BUG #5487: dblink failed with 63 bytes connection names
Previous Message Greg Stark 2010-06-01 00:50:35 Re: is_absolute_path incorrect on Windows