Re: Why is time with timezone 12 bytes?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why is time with timezone 12 bytes?
Date: 2010-09-22 23:19:11
Message-ID: 4217.1285197551@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> It's the same, because the limits are calendar based (particularly,
>> the Julian-date functions) and not dependent on the representation.

> Hmmm? Just storing dates for the range described (until the year
> 294,000) takes 8bytes by my calculations. And that's without the 3
> bytes for the time zone. Is my math off?

timestamptz stores GMT; it doesn't store timezone separately.
(If it did, we'd need more than 8 bytes...)

> And, of course, this doesn't answer at all why time with time zone is so
> huge.

Because we haven't lifted a finger to optimize it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-09-22 23:20:49 Re: Why is time with timezone 12 bytes?
Previous Message Kevin Grittner 2010-09-22 23:14:06 Re: Serializable Snapshot Isolation