load fom csv

Andy Hartman <hartman60home@gmail.com>

From: Andy Hartman <hartman60home@gmail.com>
To: pgsql-general@lists.postgresql.org
Date: 2024-09-16T15:35:35Z
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]