load fom csv

From: Andy Hartman <hartman60home(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: load fom csv
Date: 2024-09-16 15:35:35
Message-ID: CAEZv3cqEZyUouS_0tCcUG1UOi6C0VcYLgoneq-Atf8i+ikge1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to run this piece of code from Powershell and it just sits there
and never comes back. There are only 131 records in the csv.

$connectionString =
"Host=$pgServer;Database=$pgDatabase;Username=$pgUser;Password=$pgPassword"
$copyCommand = "\COPY $pgTable FROM '$csvPath' DELIMITER ',' CSV HEADER;"

psql -h $pgServer -d $pgDatabase -U $pgUser -c $copyCommand

how can I debug this?

Table layout

[image: image.png]

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-09-16 15:45:46 Re: load fom csv
Previous Message Peter J. Holzer 2024-09-15 22:18:33 Re: update faster way