Re: Range types

Поиск
Список
Период
Сортировка
От Takahiro Itagaki
Тема Re: Range types
Дата
Msg-id 20091214171024.8A94.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Range types  (Scott Bailey <artacus@comcast.net>)
Ответы Re: Range types  (tomas@tuxteam.de)
Re: Range types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Scott Bailey <artacus@comcast.net> wrote:

> CREATE TYPE periodtz AS RANGE (timestamptz, '1 microsecond'::interval);

What does the second argument mean? Is it a default interval?

> So basically I have a pg_range table to store the base typeid, a text 
> field for the granule value and the granule typeid.

As another approach, what about storing typeid in typmod?
(Oid can be assumed to be stored in int32.)

For example,   CREATE TABLE tbl ( r range(timestamp) );   SELECT '[ 2.0, 3.0 )'::range(float);

There might be some overhead to store typeid for each range instance,
but the typmod approach does not require additinal catalogs and syntax
changes. It can be possible even on 8.4.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




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

Предыдущее
От: Scott Bailey
Дата:
Сообщение: Range types
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Hot Standby, release candidate?