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



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to