To whom it may concern,
Trying to get MMBase working on Postgresql 7.3.2 I encountered the following error:
ERROR: Cannot cast type integer to boolean
which happens when MMBase tries to create the following db function:
CREATE FUNCTION cpb_check_number(integer)
RETURNS boolean AS
'SELECT CASE WHEN
(( SELECT COUNT(*)
FROM cpb_object
WHERE cpb_object.number = $1 ) > 0 )
THEN 1::boolean
ELSE 0::boolean
END;'
LANGUAGE 'sql';
this syntax is not allowed anymore on 7.3, I guess. I created this function manually:
CREATE FUNCTION cpb_check_number(integer)
RETURNS boolean AS
'SELECT CASE WHEN
(( SELECT COUNT(*)
FROM cpb_object
WHERE cpb_object.number = $1 ) > 0 )
THEN true
ELSE false
END;'
LANGUAGE 'sql';
after which MMBase ran fine.
If MMBase is supposed to work fine on 7.3.2. than this might be a bug that should be
solved by someone in org.mmbase.module.database.support.PostgreSQL72
Regards,
Peter
---------------------------------
Peter Reitsma
telno. 855
Innovatie & ontwikkeling
www.kennisnet.nl