Mr Weinbach, Larry wrote:
> But at execution time I am getting thi error :
>
> WARNING: Error occurred while executing PL/pgSQL
> function word_case
> WARNING: line 5 at return next
> ERROR: Set-valued function called in context that
> cannot accept a set
>
You didn't show the execution time SQL statement, but the error you are
getting usually indicates you did something like:
SELECT word_case();
but you should have done:
(define the function to return setof record) SELECT * FROM word_case() AS (message text);
or
CREATE TYPE word_case_type AS (message text); (define the function to return setof word_case_type) SELECT * FROM
word_case();
HTH,
Joe