From: a <372660931@qq.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: amul sul <sulamul@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re:How do I copy an element of composite type array into csv file?
Date: Wed, 23 May 2018 22:03:13 +0800
Message-ID: <tencent_429D28F860920FD70BD9B46A@qq.com> (raw)
In-Reply-To: <CAKFQuwbaAV6WA9b7x7_BSGFstDq7Sp_Ui7Q4krx80FkuOn8iXQ@mail.gmail.com>
References: <tencent_428C1F5C4640DDCF140B725F@qq.com>
<CAAJ_b9650QJ+WgN3NRf92148dVVi3MT-f996LR_4ksChnWEYCg@mail.gmail.com>
<tencent_162F77570B85783C7568320B@qq.com>
<CAKFQuwbaAV6WA9b7x7_BSGFstDq7Sp_Ui7Q4krx80FkuOn8iXQ@mail.gmail.com>
Thank you so much, did you mean the section 8.15.6??
------------------ Original message ------------------
From: "David G. Johnston";
Sendtime: Wednesday, May 23, 2018 9:18 PM
To: "a"<372660931@qq.com>;
Cc: "amul sul"; "pgsql-general";
Subject: How do I copy an element of composite type array into csv file?
On Wednesday, May 23, 2018, a <372660931@qq.com> 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: 372660931@qq.com, david.g.johnston@gmail.com, sulamul@gmail.com
Subject: Re: How do I copy an element of composite type array into csv file?
In-Reply-To: <tencent_429D28F860920FD70BD9B46A@qq.com>
References: <tencent_428C1F5C4640DDCF140B725F@qq.com> <CAAJ_b9650QJ+WgN3NRf92148dVVi3MT-f996LR_4ksChnWEYCg@mail.gmail.com> <tencent_162F77570B85783C7568320B@qq.com> <CAKFQuwbaAV6WA9b7x7_BSGFstDq7Sp_Ui7Q4krx80FkuOn8iXQ@mail.gmail.com> <tencent_429D28F860920FD70BD9B46A@qq.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox