Perhaps this is simple, but it has me stumped. What is the data type to
use for returning a value from count?
Example:
CREATE FUNCTION ev3(int4) RETURNS int4
AS 'Select count(id) from events where id = $1;' LANGUAGE 'sql';
ERROR: return type mismatch in function declared to return integer
I've tried this with text, character, numeric, etc. Nothing seems to
work.
Any ideas?
Thanks,
Ev