Re: return query and function result type must be real because of OUT parameters

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Ivan Sergio Borgonovo" <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: return query and function result type must be real because of OUT parameters
Date: 2008-12-24 14:19:22
Message-ID: 162867790812240619o6ca6c23cv3c947084b60c5da0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

this is feature. Record needs two and more fields. So when is only one
out variable, then result must be scalar, etc -- setof float4.

regards
Pavel Stehule

it's little bit simple in 8.4, there you can define

create or replace function test.test() returns table(_rank float4) as $$

2008/12/24 Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>:
> I was doing some test to track down an error in a more
> complicated function and I stumbled in this behaviour I can't
> understand:
>
> create or replace function test.test(out _rank float4) returns setof
> record as $$
> begin
> return query select 1::float4;
> return;
> end;
> $$ language plpgsql stable;
>
> and I get
>
> ERROR: function result type must be real because of OUT parameters
>
>
> ********** Error **********
>
> ERROR: function result type must be real because of OUT parameters
> SQL state: 42P13
>
> same with text etc...
>
> --
> Ivan Sergio Borgonovo
> http://www.webthatworks.it
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2008-12-24 14:45:49 happy holidays, christmas etc.
Previous Message Ivan Sergio Borgonovo 2008-12-24 11:29:02 return query and function result type must be real because of OUT parameters