Re: Range Type constructors - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Range Type constructors
Date
Msg-id AANLkTindggjTFz8pt9ddNnrvatrXHRjFzKwq_20p1KPG@mail.gmail.com
Whole thread Raw
In response to Re: Range Type constructors  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Thu, Feb 10, 2011 at 1:41 PM, Jeff Davis <pgsql@j-davis.com> wrote:
> This might solve the constructor problem nicely if we could do things
> like:
>  RANGE[10,20)
> But I have a feeling that will either cause a bizarre problem with the
> grammar, or someone will think it's not very SQL-like.

I think won't cause any problem at all if RANGE is fully reserved, but
like you say we probably don't want to do that unless it's absolutely
necessary, and if you don't actually need to be able to type in foo
RANGE JOIN bar then it probably isn't.

I think your proposed naming schema for constructors is pretty
reasonable, except I might use "o" for open and "c" for closed rather
than "i" and "_", i.e. range_oo(), range_oc(), range_co(), range_cc().If that'll get us by without fully reserving
RANGEthen I'd certainly 
be in favor of doing it that way.  I was just saying - if we were
inevitably going to have to reserve RANGE, then we could try to
squeeze a little more out of it.

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


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Range Type constructors
Next
From: "David E. Wheeler"
Date:
Subject: Re: ALTER EXTENSION UPGRADE, v3