Search Postgresql Archives

Re: Record with a field consisting of table rows

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

 



2011/1/13 Jon Smark <jon.smark@xxxxxxxxx>:
> Hi,
>
>> That is certainly not going to work: that select does not produce an
>> array, it produces a column of user_t (of which SELECT INTO is only
>> gonna take the first, anyway).
>>
>> Untested, but I think you'd have better results with
>>
>> ÂÂÂ _page.users := array(select users from users limit 10);
>
> The above does work, thanks. ÂThere is however one drawback: the type
> associated with _page.users is now an array. ÂIs there a way to make
> it a 'SETOF user_t'?
>

no. PostgreSQL doesn't supports SET. Only arrays are supported.

Regards

Pavel

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

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