Re: Partial dates - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Partial dates
Date
Msg-id 20050915013604.GB12198@surnet.cl
Whole thread Raw
In response to Re: Partial dates  (Brent Wood <b.wood@niwa.co.nz>)
List pgsql-general
On Wed, Sep 14, 2005 at 03:49:29PM +1200, Brent Wood wrote:

> In case anyone is interested, right now we store year, month & day and
> have a timestamp field where the entire field is null if any one part is
> unknown.
>
> Are there any better ways in Postgres?

You can create a new type, which is a privilege you don't have in some
other systems.  Or you can separate the column in three columns and
leave some of them NULL as appropiate.

--
Alvaro Herrera -- Valdivia, Chile         Architect, www.EnterpriseDB.com
"Right now the sectors on the hard disk run clockwise, but I heard a rumor that
you can squeeze 0.2% more throughput by running them counterclockwise.
It's worth the effort. Recommended."  (Gerry Pourwelle)

pgsql-general by date:

Previous
From: Brent Wood
Date:
Subject: Re: Partial dates
Next
From: John Fabiani
Date:
Subject: Re: Speed problems