Search Postgresql Archives

Re: How to handle nested record data.

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


create or replace function call_foo()
returns void as $$
declare r record;
  r := foo('Hello');
  raise notice ''% %', r.somerow, r.otherinfo;
$$ language plpgsql;



2012/5/30 yi huang <yi.codeplayer@xxxxxxxxx>:
> I'm porting a oracle function to postgresql, which has signature like this:
>   FUNCTION foo
>      ( seq IN varchar
>      , somerow OUT SomeTable
>      , otherinfo OUT varchar
>      )
> It's easy to port this function itself to postgresql, but i have problem to
> execute this function and assign the results into variables:
>   SELECT (foo(seq)).* INTO (v_somerow, v_otherinfo);
> It complains v_somerow can not be row type.
> How to handle the result of function foo?
> Best regards.
> YiHuang.

Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:

[Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Programming PHP]     [Kernel Newbies]     [PHP Classes]     [Find Someone Nice]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

Add to Google Powered by Linux