Re: Partial dates - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Partial dates
Date
Msg-id 20050916194011.GA29834@wolff.to
Whole thread Raw
In response to Re: Partial dates  (Joe <svn@freedomcircle.net>)
List pgsql-general
On Wed, Sep 14, 2005 at 00:09:58 -0400,
  Joe <svn@freedomcircle.net> wrote:
>
> I'm not sure I agree with the need to "fix" or "sanitize" the data.  The
> columns in question are used mostly for publication dates.  While you may
> be able to find a full release date for recent books, they are generally
> listed as published on a given year, period.  Most monthly magazines only
> have a month-year of publication.  And of course, daily newspapers and
> Internet articles usually have a full day-month-year.  In fact, the MySQL
> solution didn't address quarterly or bi-monthly publications as that data
> was only captured as one of the months in the period--as opposed to Mar/Apr
> 2005 or First Quarter 2005 (or worse: Winter 2004). As Tom Lane argued, it
> seems I'll have to bite the bullet and create a new datatype.  The only
> other alternative I see would be to split the publication date into three
> columns and that's rather ugly.

It seems like in your case the dates are best expressed as ranges and that
you could store the information you have using an earliest possible date
and a lastest possible date. If there are extra constraints based on how
far apart the begin and end dates are you could implement them as well.

pgsql-general by date:

Previous
From: Josh Berkus
Date:
Subject: Anyone use Eclipse?
Next
From: Scott Marlowe
Date:
Subject: Re: Restoring just a table or row from a backup copy.