On Wed, 2011-02-09 at 15:39 +0900, Itagaki Takahiro wrote:
> On Wed, Feb 9, 2011 at 14:50, Jeff Davis <pgsql@j-davis.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