Re: Partial or incomplete dates - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Partial or incomplete dates
Date
Msg-id 20050312161719.GA22317@wolff.to
Whole thread Raw
In response to Partial or incomplete dates  ("Leif B. Kristensen" <leif@solumslekt.org>)
List pgsql-general
On Sat, Mar 12, 2005 at 11:30:03 +0100,
  "Leif B. Kristensen" <leif@solumslekt.org> wrote:
>
> In MySQL, the checking on dates is very relaxed, so it's totally legal
> to enter a date as '1731-00-00', and let your own program logic decide
> that this means just the year 1731. Do I have to make my own data type
> to store and manipulate partial dates, or has somebody already done it?
> Or is there a way to use relaxed date checking in PostgreSQL?

There is no existing datatype like that. Probably the best thing to do
is to store the year, month and day as separate integers and allow for
nulls or special codes to indicate missing data.

pgsql-general by date:

Previous
From: Mike Rylander
Date:
Subject: Re: partitionning
Next
From: Bruno Wolff III
Date:
Subject: Re: Unique Indexes