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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Range Types, discrete and/or continuous
Date: 2010-10-26 00:13:10
Message-ID: 1288051990.10835.16.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: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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2010-10-26 00:24:47 Re: foreign keys for array/period contains relationships
Previous Message Jeff Davis 2010-10-26 00:01:20 Re: Range Types, discrete and/or continuous