Hi,
On Fri, 20 Aug 2004, Richard Huxton wrote:
Emi Lu wrote:Hello all,
I have a question about "date" & "timestamp" types in PostgreSQL. I want to setup the default value '0000-00-00' and "0000-00-00 00:00:00" for them. However, it seems that PostgreSQL does not support it. Could someone helps me please?
PostgreSQL doesn't and almost certainly never will support "0000-00-00" as a date. That's because it isn't a valid date. You also can't store 13.723, "Hello world" or (12,13) in a date column either.
Where you don't have a valid date to store you should use NULL. This business of storing zeroes is a horrible MySQL design mistake.
which is because the last time when I last used mysql it did not support NULLs in indexed columns (at least not in myisam tables).
The workaround was to use something else like 0 to represent undefined values.... Horrible ...
Greetings Christian
-- Christian Kratzer [EMAIL PROTECTED] CK Software GmbH http://www.cksoft.de/ Phone: +49 7452 889 135 Fax: +49 7452 889 136
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend