From: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com> |
---|---|
To: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: load fom csv |
Date: | 2024-09-16 15:47:16 |
Message-ID: | CANzqJaAm_SmiSZ63AfKUz8Wv=htBpJ-OhXwLvQSiGg+xpmVPWQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Sep 16, 2024 at 11:36 AM Andy Hartman <hartman60home(at)gmail(dot)com>
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!
From | Date | Subject | |
---|---|---|---|
Next Message | Francisco Olarte | 2024-09-16 15:51:28 | Re: load fom csv |
Previous Message | Adrian Klaver | 2024-09-16 15:45:46 | Re: load fom csv |