[kronolith] Export does not work with pgsql

Marcus I. Ryan marcus@riboflavin.net
Fri, 11 Jan 2002 09:45:52 -0600


All Dates - if I specify a range it works because it has valid dates.
 When I select all events the query generated is:

SELECT DISTINCT e.event_id, e.event_recurtype 
  FROM kronolith_events e 
 WHERE e.calendar_id = 'shad@riboflavin.net' 
   AND ((e.event_start < '9999-12-31 00:00:00.000' 
   AND e.event_end > '0000-00-00 00:00:00.000') 
    OR (e.event_recurenddate >= '0000-00-00 00:00:00.000' 
   AND e.event_start <= '9999-12-31 00:00:00.000' 
   AND e.event_recurtype != 0))

pgsql does not like months or monthdays of 00.  Changing the
0000-00-00 dates to 0000-01-01 fixes the problem.

I just haven't found WHERE those dates are stored...

-- 
Marcus I. Ryan, marcus@riboflavin.net
-----------------------------------------------------------------------
 "Love is a snowmobile racing across the tundra and then suddenly it
 flips over, pinning you underneath.  At night, the ice weasels come."
                 -- Matt Groening
-----------------------------------------------------------------------


Quoting Jan Schneider <jan@horde.org>:

> Zitat von "Marcus I. Ryan" <marcus@riboflavin.net>:
> 
> > When I try to do an export to a CSV file from kronolith HEAD, I
> get an
> > error from the database.  When I look at the error it includes
> the SQL
> > query with uses a date of 0000-00-00 00:00:00.000.  If I recall
> > correctly from the import script discussions a couple months ago
> that
> > date is valid in mysql, but NOT in PostgreSQL.  I'm not sure
> where to
> > find this or what the appropriate SQL syntax would be, but
> hopefully
> > someone else does.
> 
> Does it happen when you specify a date range or try to export all
> events? 
> How does the mentioned sql query look like?
> 
> Jan.
> 
> --
> ::::::::::::::::::::::::::::::::::::::::
> AMMMa AG - discover your knowledge
> :::::::::::::::::::::::::::
> Detmolder Str. 25-33 :: D-33604 Bielefeld
> fon +49.521.96878-0 :: fax  +49.521.96878-20
> http://www.ammma.de
> ::::::::::::::::::::::::::::::::::::::::::::::
> 
> -- 
> Kronolith mailing list: http://horde.org/kronolith/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: kronolith-unsubscribe@lists.horde.org
> 
>