Re: WIP: RangeTypes

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: WIP: RangeTypes
Дата
Msg-id 20110128171716.GC16469@fetter.org
обсуждение исходный текст
Ответ на Re: WIP: RangeTypes  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: WIP: RangeTypes  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Thu, Jan 27, 2011 at 11:45:30PM -0800, Jeff Davis wrote:
> Updated patch.
> 
> Changes:
> 
>   * Documentation for operators/functions
>   * a comprehensive set of operators and functions
>   * BTree opclass

Yay!

>   * Hash opclass
>   * built-in range types:
>     - PERIOD (timestamp)
>     - PERIODTZ (timestamptz)

For consistency, and in order not to continue our atrocious naming
tradition, I'd like to propose that the above be named timestamprange
(tsrange for short) and timestamptzrange (tstzrange for short).

>     - DATERANGE (date)

Yay!

>     - INTRANGE (int4)

int4range/intrange and the missing bigintrange/int8range

>     - NUMRANGE (numeric)

numericrange/numrange.

Should there also be a timerange and a timetzrange?

>   * added subtype float function to the API, which will be useful for 
>     GiST

w00t!

>   * created canonical functions for intrange and daterange, so that:
>       '[1,5]'::intrange = '[1,6)'::intrange

Excellent!

>   * 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

I'd offer to help, but personal matters press this weekend :)

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: SSI patch version 14
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: WIP: RangeTypes