Re: Record with a field consisting of table rows

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Record with a field consisting of table rows
Дата
Msg-id CB651D01-881E-48F8-B4B3-03091040A2E8@solfertje.student.utwente.nl
обсуждение исходный текст
Ответ на 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
On 14 Jan 2011, at 16:03, Jon Smark wrote:

> Hi,
>
> This thread has veered off-topic, but my original problem still remains.
> Basically, I want to declare a function that returns a tuple consisting
> of an integer and a set of table rows.  Something like the following:
>
> CREATE FUNCTION foobar () RETURNS (int4, SETOF users)
>
> Now, if I understand correctly, the only way to have a function return
> a tuple is to create a named record and have the function return that
> record:


Nope, see my reply from yesterday around 20:23
You can return a table instead, with the count added as an extra column.

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4d308e2711871421280230!



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: tsearch (or related) question
Следующее
От: Luis Fernando Lopez Aguilar
Дата:
Сообщение: [ANNOUNCE] Re: [pgsql-es-ayuda] Oferta de Entrenamientos en el marco del Cuarto PGDay Latinoamericano.