From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Brahmam Eswar <brahmam1234(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to store multiple rows in array . |
Date: | 2017-11-19 17:59:47 |
Message-ID: | CAFj8pRBmDcB_0nMQp4uiyV6XMZTh3xAhARRyiatR=7ZELyq0+g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2017-11-19 18:57 GMT+01:00 Brahmam Eswar <brahmam1234(at)gmail(dot)com>:
> Hi ,
>
> System is migrating from Oracle to Postgre SQL.
> Oracle is providing BULK COLLECT INTO function to collect the multiple
> records from table .
>
> Select COL1,COL2 ,COL3 BULK COLLECT INTO LINES from Distinct_Records.
>
> LINES IS TABLE OF TABLE1 (Defined lines as IS TABLE OF type).
>
> In PotGres:
>
> INV_LINES_T validate_crtr_line_items$inv_lines_rt ARRAY;
> L_INV_LINES INV_LINES_T%TYPE;
> L_INV_LINES$temporary_record ap.validate_crtr_line_items$inv_lines_rt;
>
> I'm trying to collect the records in L_INV_LINES
>
> SELECT ARRAY (SELECT COL1,COL2,COL3 FROM Distinct_Records) INTO
> L_INV_LINES;
>
> Seems, Selecting multiple columns into an array doesn't work in PL/pgSQL
> .
>
> How to collect multiple columns into array which is composite data type of
> all select colums
>
SELECT ARRAY(SELECT ROW(col1, col2, ...) INTO
>
> --
> Thanks & Regards,
> Brahmeswara Rao J.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Mair | 2017-11-19 18:18:04 | parallel query in 9.6.6 + oracle_fdw -> ERROR: invalid cache ID: 41 |
Previous Message | Brahmam Eswar | 2017-11-19 17:57:00 | How to store multiple rows in array . |