From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Range Type constructors |
Date: | 2011-02-09 07:09:51 |
Message-ID: | 1297235391.27157.404.camel@jdavis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 2011-02-09 at 15:39 +0900, Itagaki Takahiro wrote:
> On Wed, Feb 9, 2011 at 14:50, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> > 1.
> > The obvious constructor would be:
> > range(1, 10)
> > But is that [1, 10), (1, 10], (1, 10), or [1, 10]? We need to support
> > all 4, and it's not obvious how to do that easily.
>
> here is the same issue in table partitioning. Also, We might use the
> syntax for our partitioning in the future. Just for reference,
> DB2 uses EXCLUSIVE and INCLUSIVE keywords to specify boundaries.
>
> CREATE TABLE ... PARTITION BY RANGE (...)
> (STARTING 0 EXCLUSIVE ENDING 100 INCLUSIVE)
Interesting. It needs to be usable in normal expressions, however, so it
may require some adaptation.
That's how arrays do it: there's a special Expr node that represents an
array expression. Maybe the same thing could be used for range types,
but I fear that there may be some grammar conflicts. I doubt we'd want
to fully reserve the keyword "range".
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2011-02-09 08:11:50 | Range Types - representation and alignment |
Previous Message | Noah Misch | 2011-02-09 07:03:06 | Re: SQL/MED - file_fdw |