Re: Record with a field consisting of table rows

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Record with a field consisting of table rows
Дата
Msg-id AANLkTikAL4=fasCBa44EgXUd23vW+B5JRDVzZy2UtEoL@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Record with a field consisting of table rows  (Jon Smark <jon.smark@yahoo.com>)
Ответы Re: Record with a field consisting of table rows
Список pgsql-general
2011/1/13 Jon Smark <jon.smark@yahoo.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

В списке pgsql-general по дате отправления:

Предыдущее
От: Jon Smark
Дата:
Сообщение: Re: Record with a field consisting of table rows
Следующее
От: Ben Chobot
Дата:
Сообщение: Re: Inconsistent time interval formatting