Pavel Stehule <pavel.steh...@gmail.com> writes:
> 2017-11-19 18:57 GMT+01:00 Brahmam Eswar <brahmam1...@gmail.com>:
>> How to collect multiple columns into array which is composite data type of
>> all select colums

> SELECT ARRAY(SELECT ROW(col1, col2, ...) INTO

You probably need an explicit cast to the rowtype.  That is,

        declare myarray rowtypename[];
        ...
        select array(select row(col1, ...)::rowtypename from ...) into myarray;

                        regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to