Re: Range Type constructors

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Range Type constructors
Date: 2011-02-09 06:39:23
Message-ID: AANLkTinrohQ1cbRYR6HiLYrTgcFM2RXjp017aSNPZyWD@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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)

http://publib.boulder.ibm.com/infocenter/db2luw/v9r8/index.jsp?topic=/com.ibm.db2.luw.sql.ref.doc/doc/r0000927.html

I'm not sure it is the best syntax, but at least it's easy to read
for beginners and works with parentheses completion by text editors.

--
Itagaki Takahiro

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2011-02-09 07:03:06 Re: SQL/MED - file_fdw
Previous Message Fujii Masao 2011-02-09 06:22:50 Re: [COMMITTERS] pgsql: Basic Recovery Control functions for use in Hot Standby. Pause,