Re: Record with a field consisting of table rows

Поиск
Список
Период
Сортировка
От Jon Smark
Тема Re: Record with a field consisting of table rows
Дата
Msg-id 846280.61221.qm@web112803.mail.gq1.yahoo.com
обсуждение исходный текст
Ответ на Re: Record with a field consisting of table rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Record with a field consisting of table rows
Список pgsql-general
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'?

Best regards,
Jon





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

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