Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 05, 2010 at 05:26:39PM +0300, Andrus wrote:
> Thank you.
>
>> another workaround is to wrap the pl/pgsql function in sql function.
>> it's not always easy to re-work the function all into a 'from'
>> expression.
>
> I tried code below in 8.3 but got error
> CREATE OR REPLACE FUNCTION wordwrap83(line text, linelen integer)
> RETURNS SETOF text as $$
> BEGIN
> select * from wordwrap(line,linelen);
> END
> $$ LANGUAGE sql;

remove begin and end from above function.

Best regards,

depesz

-- 
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: depesz@xxxxxxxxxx / aim:depeszhdl / skype:depesz_hdl / gg:6749007

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux