Re: Range Types, discrete and/or continuous - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Range Types, discrete and/or continuous
Date
Msg-id 1288051990.10835.16.camel@jdavis-ux.asterdata.local
Whole thread Raw
In response to Re: Range Types, discrete and/or continuous  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Range Types, discrete and/or continuous
List pgsql-hackers
On Mon, 2010-10-25 at 18:03 -0400, Robert Haas wrote:
> Hmm.  Do you have some concrete examples of cases where a range type
> might want to do some representational optimization?

Let's say for instance you want to keep an timestamp range in 16 bytes.
You could have an 8-byte timestamp, a 7-byte integer that represents the
offset from that timestamp in microseconds, and one byte for flags (e.g.
NULL or infinite boundaries, etc.). I'm not sure that you can make that
representation work in a generic way.

It's not critical, and perhaps not even desirable. But it crossed my
mind because alignment might make a 17-byte type look like 24 bytes,
which seems pretty wasteful to me.

Regards,Jeff Davis




pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Range Types, discrete and/or continuous
Next
From: Jeff Davis
Date:
Subject: Re: foreign keys for array/period contains relationships