Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q8kde-000153-Bw for pgsql-admin@arkaria.postgresql.org; Mon, 12 Jun 2023 16:43:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q8kdc-0005Lj-G8 for pgsql-admin@arkaria.postgresql.org; Mon, 12 Jun 2023 16:43:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q8kdc-0005LZ-1X for pgsql-admin@lists.postgresql.org; Mon, 12 Jun 2023 16:43:28 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q8kdW-001omb-0N for pgsql-admin@lists.postgresql.org; Mon, 12 Jun 2023 16:43:26 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-973bf581759so798726566b.0 for ; Mon, 12 Jun 2023 09:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20221208.gappssmtp.com; s=20221208; t=1686588199; x=1689180199; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=e4hWmnHfZjzLUyznVYQ+Su57QM9qGnyT7xnAOalOrPs=; b=aFI931DyWHV0k3QVfepnlY7cZ5IdW3unfajazyRb8puiB5Kfd73iaQbbc6LEgoDbGw KGZJ65ldVxdH596mzjYcilwsiSolQK+v+zSOykYhFM+eriewoBmAvn96aKUiQ8sAmBZC r/GooZt87EE8KI0eJkSF13hlV7/CamttR51EB6s367GcwkM2AwyU2mL4NrZuWeYig/OM XP+Wxhbe05gPqsuyAQRFMLPAlJwl9h3WAwf+EZCiLqfEYblhBOx5VZ/06+aK+XiVYcW6 ydhXW8VC3SKKwlLU5+l8K/rmCbawoiOJTzzAILks0JrBehIv22ropd6K1/5A4kqC5gIr WNDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686588199; x=1689180199; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=e4hWmnHfZjzLUyznVYQ+Su57QM9qGnyT7xnAOalOrPs=; b=I55CyaAY58CILwbww9Gl1WXP+daFaAVK8T2MnJztM6ZftNACrX2nmQ/2YJUf7GaGNh oWJrJVpl5IHgYnR3dKJtrPUGnlqTX1UKxJz8sHg8ShaSv35GPApP/P5qV/koqF3TDMdt m7dsSZbApbWgRXcLil0IessVoDw9if3ys1XyiRcp8qae9Aw0Q0p3/YClPdA9LFI/anav fMMOCNjGjQY4co3M8rq6Oe6KkKudrGd+D/gea6iCzOAGPgGpg8+1oAIL47pwhcjQrEW+ iQq+7+4h3xH4SPvLADy33tkSKOGXU0vP6V1M7xg3GTP/N+rRisl1Ml8hUgum0vfn2TEP w7hg== X-Gm-Message-State: AC+VfDyDfLygi+6XO7iP4hPLjV8IlP/3SX2oGFEXUUFVZd88s3bx4Jt5 Pzyogcc/cwGwsVwkyv4ooSNx1w== X-Google-Smtp-Source: ACHHUZ6ZSd6he2cRFHX3J8aC40AImfckhcDK2mQIppvbgqfkBx+4KDBmnvI7/XpOsG9T7ZdpCpAtWA== X-Received: by 2002:a17:906:da85:b0:966:2123:e0ca with SMTP id xh5-20020a170906da8500b009662123e0camr10567800ejb.34.1686588198751; Mon, 12 Jun 2023 09:43:18 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:b6d7:c402:98ab:8654:da0f]) by smtp.gmail.com with ESMTPSA id a9-20020a17090680c900b0096f782f727esm5529133ejx.140.2023.06.12.09.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 09:43:18 -0700 (PDT) Message-ID: <9b13df245873b7e5a408b5f6cffb7c2538552ed3.camel@cybertec.at> Subject: Re: How to use long list of columns with COPY command From: Laurenz Albe To: M Sarwar , Holger Jakobs , "pgsql-admin@lists.postgresql.org" Date: Mon, 12 Jun 2023 18:43:17 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 2023-06-11 at 23:04 +0000, M Sarwar wrote: > This is my command now. >=20 > \COPY bronx.TEST_GLOBAL_MCM_RAW (single_date_a, single_start_time_b,=C2= =A0dual_part_m, dual_data_n ) FROM C:\Mohammed\Work\NGC\Apps\Bronx\Tables\T= est_TestData_MCM\Test_TestData_MCM- > LoadData\N541652_IN3799A0_CLD_ABMN.csv=C2=A0 DELIMITER ','=C2=A0 CSV Head= er ; >=20 > Entire above command is run from a single line. Great. > I need to accommodate all the below columns and few more=C2=A0 without lo= sing=C2=A0 the legibility. >=20 > [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