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

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Osvaldo Kussama" <osvaldo(dot)kussama(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to fix set-valued function called in context that cannot accept a set in earlier versions
Date: 2010-04-05 15:19:20
Message-ID: 436E69CF3C9C4F6FB3EF7B02F9300D5F@andrusnotebook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Landscheidt 2010-04-05 15:22:40 Re: Null vs. Empty String in Postgres 8.3.8
Previous Message Andrus 2010-04-05 14:33:59 Re: How to fix set-valued function called in contextthat cannot accept a set in earlier versions