Search Postgresql Archives

Re: Pet Peeves?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009-01-29, Steve Crawford <scrawford@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>>> 3. Date handling
>>> Sometimes I've got data with invalid dates and it would be great if it
>>> could replace all the bad ones with, say "0000-00-00".
>>>     

 0000-00-00 doesn't fit in a date column.
 perhaps you could use null?
 
 write a function that casts and catches the exception caused when bad 
 dates are attempted and returens null, use it to translate your data.
 


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux