Re: WIP: RangeTypes

Peter Eisentraut <peter_e@gmx.net>

From: Peter Eisentraut <peter_e@gmx.net>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-hackers@postgresql.org, Alexander Korotkov <aekorotkov@gmail.com>
Date: 2011-02-07T18:32:40Z
Lists: pgsql-hackers
On sön, 2011-01-30 at 14:52 -0800, Jeff Davis wrote:
>   * naming issues:
>     - period -> tsrange ?
>     - periodtz -> tstzrange ?
>     - intrange -> int4range

Have you considered a grammar approach like for arrays, so that you
would write something like

CREATE TABLE ... (
    foo RANGE OF int
);

instead of explicitly creating a range type for every scalar type in
existence?  I think that that might be easier to use in the common case.

I guess the trick might be how to store and pass the operator class and
some other parameters.