Richard, >--------------------------- CREATE OR REPLACE FUNCTION public.locate(bpchar, > bpchar) > RETURNS int4 AS > ' > -- search for the position of $2 in $1 > > declare > srcstr alias for $1; > searchstr alias for $2; > > begin > return position(searchstr in srcstr);
You're missing "END;". > ' > LANGUAGE 'plpgsql' VOLATILE; Also, the function is not VOLATILE. It's IMMUTABLE, and STRICT as well. -- Josh Berkus Aglio Database Solutions San Francisco ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly