Re: Range Types, discrete and/or continuous

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Range Types, discrete and/or continuous
Date: 2010-10-26 00:01:20
Message-ID: 1288051280.10835.4.camel@jdavis-ux.asterdata.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

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.

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

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2010-10-26 00:13:10 Re: Range Types, discrete and/or continuous
Previous Message Tom Lane 2010-10-25 23:12:58 Re: Composite Types and Function Parameters