Re: How to fix set-valued function called in context that cannot accept a set in earlier versions - Mailing list pgsql-general

From Andrus
Subject Re: How to fix set-valued function called in context that cannot accept a set in earlier versions
Date
Msg-id 436E69CF3C9C4F6FB3EF7B02F9300D5F@andrusnotebook
Whole thread Raw
In response to How to fix set-valued function called in context that cannot accept a set in earlier versions  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
Osvaldo,

>CREATE OR REPLACE FUNCTION wordwrap83(line text, linelen integer)
>RETURNS SETOF text as $$
>select * from wordwrap($1,$2);
> $$ LANGUAGE sql;

Thank you. It works.

>select * FROM wordwrap83('fdgdf',10)
>If you have a "RETURN SETOF" function you must call it with "SELECT *
>FROM your_function();" not "SELECT your_function()"

select wordwrap83('fdgdf',10)

works in 8.3 and in 8.4

Andrus.

pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Re: How to fix set-valued function called in contextthat cannot accept a set in earlier versions
Next
From: Tim Landscheidt
Date:
Subject: Re: Null vs. Empty String in Postgres 8.3.8