Victor,
Thanks for your time ..
When casting inside a COALESCE function should it be something like:
WHEN COALESCE( MAX(e.edate),'2003-01-01'::date ) >= now()::date THEN 'events'
instead of:
WHEN COALESCE( MAX(e.edate),'2003-01-01') >= now()::date THEN 'events'
Regards
Rudi