Search Postgresql Archives

How do I copy an element of composite type array into csv file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, May 23, 2018, a <372660931@xxxxxx> wrote:
Thank you very much.

BTW, may I ask if I would like to do the opposite that copy csv file content into the first element, how should I do it??

COPY B(Ay[1])
from 'E:/products_199.csv'  DELIMITER ',' CSV HEADER;

you cannot put "[1]" there.  The csv file value has to be an array input literal with only one element. i.e., something like: {(1,2)}

There is no first element as such when you are creating a new record.  There will be however many elelements to supply to the array input.

David J.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux