Re: WIP: RangeTypes - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: WIP: RangeTypes
Date
Msg-id 1296200730.11513.467.camel@jdavis
Whole thread Raw
In response to WIP: RangeTypes  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: WIP: RangeTypes  (David Fetter <david@fetter.org>)
Re: WIP: RangeTypes  (Thom Brown <thom@linux.com>)
List pgsql-hackers
Updated patch.

Changes:

  * Documentation for operators/functions
  * a comprehensive set of operators and functions
  * BTree opclass
  * Hash opclass
  * built-in range types:
    - PERIOD (timestamp)
    - PERIODTZ (timestamptz)
    - DATERANGE (date)
    - INTRANGE (int4)
    - NUMRANGE (numeric)
  * added subtype float function to the API, which will be useful for
    GiST
  * created canonical functions for intrange and daterange, so that:
      '[1,5]'::intrange = '[1,6)'::intrange
  * added length() function, written in SQL as:
      select upper($1) - lower($1)
    which uses polymorphic "-" operator to avoid the need to
    give the subtype subtract function and return type to the generic
    API

Open items:

  * More documentation work
  * Settle any representation/alignment concerns
  * Should the new length() function be marked as immutable, stable,
    or volatile? It uses the polymorphic "-" operator, and I suppose
    someone could define a non-immutable version of that before calling
    length(). Then again, it is likely to be inlined anyway, right?
  * GiST
    - docs
    - catalog work
    - implementation
  * typmod support (optional)

This is nearing completion. GiST is by far the most amount of effort
remaining that I'm aware of. Comments about the API, naming,
representation, interface, funcationality, grammar, etc. are welcome.

Regards,
    Jeff Davis

Attachment

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: pg_ctl failover Re: Latches, signals, and waiting
Next
From: Magnus Hagander
Date:
Subject: Re: pg_ctl failover Re: Latches, signals, and waiting