From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Jon Smark <jon(dot)smark(at)yahoo(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Record with a field consisting of table rows |
Date: | 2011-01-13 18:25:04 |
Message-ID: | AANLkTikAL4=fasCBa44EgXUd23vW+B5JRDVzZy2UtEoL@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2011/1/13 Jon Smark <jon(dot)smark(at)yahoo(dot)com>:
> 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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ben Chobot | 2011-01-13 18:35:32 | Re: Inconsistent time interval formatting |
Previous Message | Jon Smark | 2011-01-13 17:58:25 | Re: Record with a field consisting of table rows |