Re: Storage sizes for dates/times (documentation bug?)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marc Munro <marc(at)bloodnok(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Storage sizes for dates/times (documentation bug?)
Date: 2008-04-15 01:27:30
Message-ID: 20080415012730.GD11292@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Marc Munro <marc(at)bloodnok(dot)com> writes:

> > It makes no sense to me that by storing the date with the time you
> > can save 4 bytes.
>
> Actually, your mistake is in imagining that timestamptz represents the
> timezone explicitly ... it doesn't. If it did, it'd be at least as
> large as timetz.

Hmm, so timetz does that? Amazing ... I didn't know that.

Which means that storing date + timetz in two separate columns is not
quite the same as storing a timestamptz. Oops.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message tosbalok@gmail.com 2008-04-15 01:37:26 Re: Unacceptable postgres performance vs. Microsoft sqlserver
Previous Message Tom Lane 2008-04-15 01:10:52 Re: Storage sizes for dates/times (documentation bug?)