public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: load fom csv
Date: Mon, 16 Sep 2024 11:47:16 -0400
Message-ID: <CANzqJaAm_SmiSZ63AfKUz8Wv=htBpJ-OhXwLvQSiGg+xpmVPWQ@mail.gmail.com> (raw)
In-Reply-To: <CAEZv3cqEZyUouS_0tCcUG1UOi6C0VcYLgoneq-Atf8i+ikge1A@mail.gmail.com>
References: <CAEZv3cqEZyUouS_0tCcUG1UOi6C0VcYLgoneq-Atf8i+ikge1A@mail.gmail.com>

On Mon, Sep 16, 2024 at 11:36 AM Andy Hartman <[email protected]>
wrote:

> 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?
>

Maybe I'm missing something obvious, but where in the psql command are you
using $connectionString?

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> crustacean!


view thread (4+ messages)  latest in thread

reply

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: load fom csv
  In-Reply-To: <CANzqJaAm_SmiSZ63AfKUz8Wv=htBpJ-OhXwLvQSiGg+xpmVPWQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox