Re: How to use long list of columns with COPY command - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: How to use long list of columns with COPY command
Date
Msg-id 9b13df245873b7e5a408b5f6cffb7c2538552ed3.camel@cybertec.at
Whole thread Raw
In response to Re: How to use long list of columns with COPY command  (M Sarwar <sarwarmd02@outlook.com>)
List pgsql-admin
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



pgsql-admin by date:

Previous
From: M Sarwar
Date:
Subject: Re: How to use long list of columns with COPY command
Next
From: Norbert Poellmann
Date:
Subject: Re: How to use long list of columns with COPY command