Re: Range types - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Range types
Date
Msg-id 21446.1260900918@sss.pgh.pa.us
Whole thread Raw
In response to Re: Range types  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Range types  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> If I'm correct, continuous ranges always need two extra bits of storage
> for the exclusivity. But for timestamps, that means 16 bytes (2 x 8-byte
> timestamp) turns into 17 bytes, which is really more like 20 or 24 bytes
> with alignment.

You probably need some flag bits anyway, so flailing frantically to
avoid that doesn't seem like a profitable use of time.

One pretty obvious use for a flag bit is open-ended ranges, ierange(something, infinity)
You could only do this without a flag bit if the underlying datatype
has an "infinity" value, which not all do.

I'm also wondering what null range boundaries would do.  Maybe that's
the same as the infinity case, or maybe not.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Fast or immediate shutdown
Next
From: Tom Lane
Date:
Subject: Re: Closing out CommitFest 2009-11