Re: How to setup default value "0000-00-00" for "date" - Mailing list pgsql-general

From Harald Fuchs
Subject Re: How to setup default value "0000-00-00" for "date"
Date
Msg-id puy8k7cqso.fsf@srv.protecting.net
Whole thread Raw
In response to How to setup default value "0000-00-00" for "date" type under PostgreSQL?  (Emi Lu <emilu@cs.concordia.ca>)
Responses Re: How to setup default value "0000-00-00" for "date"  ("Jim Wilson" <jimw@kelcomaine.com>)
List pgsql-general
In article <twig.1093012692.59157@kelcomaine.com>,
"Jim Wilson" <jimw@kelcomaine.com> writes:

> It'd probably be better design to not use the date as a flag.  This issue
> actually came up for me yesterday with an application that is now being ported
> to Postgres.  Previously a null "ship date" indicated that an item to be
> shipped had not gone yet.  I'm adding a flag, not just because of this issue
> you describe,  but it is also more intuitive for anyone looking at the data
> who is unfamiliar with the business logic.

Me thinks that's somewhat unclean.  Is your shipDate nullable?  If
yes, what's the meaning of "shipDate IS NULL"?  If no, what do you put
in that field if notYetShipped is true?

pgsql-general by date:

Previous
From: Sim Zacks
Date:
Subject: Re: Unsupported 3rd-party solutions (Was: Few questions on postgresql (dblink, 2pc, clustering))
Next
From: Christopher Browne
Date:
Subject: Re: Few questions on postgresql (dblink, 2pc, clustering)