From: Laurenz Albe <laurenz.albe@cybertec.at>
To: M Sarwar <sarwarmd02@outlook.com>
To: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: How to use long list of columns with COPY command
Date: Mon, 12 Jun 2023 18:43:17 +0200
Message-ID: <9b13df245873b7e5a408b5f6cffb7c2538552ed3.camel@cybertec.at> (raw)
In-Reply-To: <DM4PR19MB59786218A2CA7A09EB66AB2AD357A@DM4PR19MB5978.namprd19.prod.outlook.com>
References: <DM4PR19MB59786218A2CA7A09EB66AB2AD357A@DM4PR19MB5978.namprd19.prod.outlook.com>
On Sun, 2023-06-11 at 23:04 +0000, M Sarwar wrote:
> This is my command now.
>
> \COPY bronx.TEST_GLOBAL_MCM_RAW (single_date_a, single_start_time_b, dual_part_m, dual_data_n ) FROM C:\Mohammed\Work\NGC\Apps\Bronx\Tables\Test_TestData_MCM\Test_TestData_MCM-
> LoadData\N541652_IN3799A0_CLD_ABMN.csv DELIMITER ',' CSV Header ;
>
> Entire above command is run from a single line.
Great.
> I need to accommodate all the below columns and few more without losing the legibility.
>
> [long column list]
You will have to write a long line with all the columns in it, and if that's not
very legible, that's what you get for using wide tables.
\copy has to be in a single line.
> I have tried with \n option and that is not working.
I don't understand what you mean by that.
Yours,
Laurenz Albe
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, sarwarmd02@outlook.com, holger@jakobs.com, pgsql-admin@lists.postgresql.org
Subject: Re: How to use long list of columns with COPY command
In-Reply-To: <9b13df245873b7e5a408b5f6cffb7c2538552ed3.camel@cybertec.at>
* 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