I have been looking through FAQs and the docs and I cannot seem to find the answer to this question. If someone can
pointme to documentation I would really appreciate it.<br /><br /> I am trying to run this function but the return is
notcorrect. If I run the select statement from the psql command line it works. My guess is that the WHERE clause
couldbe causing the problem. Then again, it may be how I am using the FOR loop. The ides column is of type TEXT.<br
/><br/> CREATE OR REPLACE FUNCTION sp_description_search(varchar) RETURNS varchar AS $$<br /> DECLARE<br /> myrec
record;<br/> BEGIN<br /> FOR myrec IN SELECT * FROM tblStuff WHERE ides LIKE '%$1%' LOOP<br /> RETURN NEXT myrec;<br />
ENDLOOP;<br /> RETURN;<br /> END;<br /> $$ LANGUAGE 'plpgsql';<br /><br /> Thanks so much for any insight you can give
me!!!<br/> Mike<br />