Re: Range Types, discrete and/or continuous

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Range Types, discrete and/or continuous
Дата
Msg-id AANLkTimEc1CK+zxd3v9evqbEDwK6tbOV2pR+O7WBFjvn@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Range Types, discrete and/or continuous  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Mon, Oct 25, 2010 at 8:01 PM, Jeff Davis <pgsql@j-davis.com> wrote:
> On Mon, 2010-10-25 at 18:28 -0400, Robert Haas wrote:
>> Oh, maybe I'm confused.  Are you saying you'd need multiple copies of
>> the base type, or multiple range types based on a single base type?
>
> The latter. That is, if you want a timestamp range with granularity 1
> second, and a timestamp range with granularity 1 minute, I think those
> need to have their own entries in pg_type.

OK, I agree with that.  Sorry.

> The way I look at it, typmod just doesn't help at all. It's useful
> perhaps for constraining what a column can hold (like a different kind
> of CHECK constraint), or perhaps for display purposes. But typmod isn't
> really a part of the type system itself.

I view that as a problem in need of fixing, but that's another discussion.

> There may be some utility in a pseudo-type like "anyrange", but I think
> that's a separate issue.

Yeah, interesting idea.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: foreign keys for array/period contains relationships
Следующее
От: Greg Stark
Дата:
Сообщение: Re: foreign keys for array/period contains relationships