Search Postgresql Archives

Re: Newbiee Pls help.....

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

 



On Freitag, 29. Juli 2011, woow wrote:

> I have following function expectation is I want to return the
> items in array 
>       SELECT INTO rolelist role_id FROM roles WHERE role_type =
> $1; RETURN rolelist;

Hi,

you've to use array_agg:
      SELECT INTO rolelist array_agg(role_id) FROM roles WHERE 
role_type = $1;

Regards, Jens

-- 
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