Re: WIP: Range Types

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: Range Types
Date: 2011-01-09 01:36:48
Message-ID: AANLkTiks5d=AJZ-4n-=VPQ-eKwoicMEuwA8o4Y5x9SSK@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 8, 2011 at 6:06 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> If we use timestamps, then that's 8 bytes each, meaning 16 bytes. Then,
> there is the VARHDRSZ (now we're at 20), the flag byte (21), and the
> range type oid (25). With alignment (if it's aligned at all), that's
> either 28 or 32 bytes, which is starting to seem ridiculous.

It'll use the 1-byte varlena header format, which is unaligned. So
you'll end up with 8 + 8 + 2 bytes = 18 bytes, unaligned. Maybe you
could cram that down to 17 bytes unaligned with sufficient work, but
I'm not sure it's worth the complexity. If you end up having to
include the type OID though that's pretty horrible; it adds another 4
bytes.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-09 01:39:47 Re: obj_unique_identifier(oid)
Previous Message Robert Haas 2011-01-09 01:32:01 Re: WIP: Range Types