Re: How to put multiples results in just one column - Mailing list pgsql-sql

From Nei Rauni Santos
Subject Re: How to put multiples results in just one column
Date
Msg-id CADRPEPAiXjpCJ4KTVMJve5Amf4fFPWW6y2Piv4_0JAfZt3cJcA@mail.gmail.com
Whole thread Raw
In response to Re: How to put multiples results in just one column  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: How to put multiples results in just one column
List pgsql-sql
Thank you Pavel,

I could do that like this:


select p.id,

( select array_accum ((
room_name, room_id, room_group_name, room_group_id, room_order, availability_min, price_amount, price_min, price_avg, price_balcony_amount, price_balcony_avg, capacity, deposit_required, breakfast_included, room_min_stay
)::cms.room_availability_list_type)
from cms.sp_get_supplier_availability(2, '2013-02-01', '2013-02-05', 'pt_BR', 1, '{1}')
) room
from wr.prestadores p
where p.id = 2;

the only problem is that it takes about 2293 ms for just one result.


Any idea about the more effective way to do that?





On Thu, Jan 31, 2013 at 10:39 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
fce




--
[]s!!

Nei

pgsql-sql by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: How to put multiples results in just one column
Next
From: Pavel Stehule
Date:
Subject: Re: How to put multiples results in just one column