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