public inbox for [email protected]help / color / mirror / Atom feed
Re: load fom csv 3+ messages / 3 participants [nested] [flat]
* Re: load fom csv @ 2024-09-18 12:39 Andy Hartman <[email protected]> 2024-09-18 13:29 ` Re: load fom csv Rob Sargent <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Andy Hartman @ 2024-09-18 12:39 UTC (permalink / raw) To: Rob Sargent <[email protected]>; +Cc: Adrian Klaver <[email protected]>; Muhammad Usman Khan <[email protected]>; [email protected] psql -h $pgServer -d $pgDatabase -U $pgUser -c $copyCommand I'm wondering if it's waiting on P/w ? Thanks. On Tue, Sep 17, 2024 at 7:10 PM Andy Hartman <[email protected]> wrote: > I'll echo vars and see if something looks strange. > > THanks. > > On Tue, Sep 17, 2024 at 3:46 PM Rob Sargent <[email protected]> wrote: > >> >> >> > On Sep 17, 2024, at 12:25 PM, Adrian Klaver <[email protected]> >> wrote: >> > >> > On 9/17/24 09:21, Andy Hartman wrote: >> >> The command work outside of powershell yes >> > >> > Then you are going to need to use whatever debugging tools PowerShell >> has available to step through the script to figure out where the problem is. >> > >> > >> >> Visual Studio can run/debug PS 1 files. I am not at my desk but have done >> ps1 oneliner queries against mssql >> >> Suggest echoing ALL vars used in psql command >> >> > >> > >> > ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: load fom csv 2024-09-18 12:39 Re: load fom csv Andy Hartman <[email protected]> @ 2024-09-18 13:29 ` Rob Sargent <[email protected]> 2024-09-18 14:50 ` Re: load fom csv Adrian Klaver <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Rob Sargent @ 2024-09-18 13:29 UTC (permalink / raw) To: Andy Hartman <[email protected]>; +Cc: Adrian Klaver <[email protected]>; Muhammad Usman Khan <[email protected]>; [email protected] --Apple-Mail-8E59F1DE-55EA-4CC0-9948-1EA37C9C3B48 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D= utf-8"></head><body dir=3D"auto"><div dir=3D"ltr"></div><div dir=3D"ltr"><br= ></div><div dir=3D"ltr"><br><blockquote type=3D"cite">On Sep 18, 2024, at 6:= 39=E2=80=AFAM, Andy Hartman <[email protected]> wrote:<br><br></= blockquote></div><blockquote type=3D"cite"><div dir=3D"ltr">=EF=BB=BF<div di= r=3D"ltr"><div dir=3D"ltr">psql -h $pgServer -d $pgDatabase -U $pgUser -c $c= opyCommand </div><div dir=3D"ltr"><br></div><div>I'm wondering if it's w= aiting on P/w ?<br><br>Thanks.</div></div></div></blockquote><div><br></div>= Very likely. Can you show the authentication <div>mechanisms used= (pg_hba)?<br><blockquote type=3D"cite"><div dir=3D"ltr"><br><div class=3D"g= mail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Sep 17, 2024 at 7:= 10=E2=80=AFPM Andy Hartman <<a href=3D"mailto:[email protected]">ha= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)= ;padding-left:1ex"><div dir=3D"ltr">I'll echo vars and see if something look= s strange.<br><br>THanks.</div><br><div class=3D"gmail_quote"><div dir=3D"lt= r" class=3D"gmail_attr">On Tue, Sep 17, 2024 at 3:46=E2=80=AFPM Rob Sargent &= lt;<a href=3D"mailto:[email protected]" target=3D"_blank">robjsargent@gm= ail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"m= argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:= 1ex"><br> <br> > On Sep 17, 2024, at 12:25=E2=80=AFPM, Adrian Klaver <<a href=3D"mail= to:[email protected]" target=3D"_blank">[email protected]</a= >> wrote:<br> > <br> > =EF=BB=BFOn 9/17/24 09:21, Andy Hartman wrote:<br> >> The command work outside of powershell yes<br> > <br> > Then you are going to need to use whatever debugging tools PowerShell h= as available to step through the script to figure out where the problem is.<= br> > <br> > <br> <br> Visual Studio can run/debug PS 1 files. I am not at my desk but have done ps= 1 oneliner queries against mssql<br> <br> Suggest echoing ALL vars used in psql command<br> <br> > <br> > <br> </blockquote></div> </blockquote></div> </div></blockquote></div></body></html>= --Apple-Mail-8E59F1DE-55EA-4CC0-9948-1EA37C9C3B48-- ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: load fom csv 2024-09-18 12:39 Re: load fom csv Andy Hartman <[email protected]> 2024-09-18 13:29 ` Re: load fom csv Rob Sargent <[email protected]> @ 2024-09-18 14:50 ` Adrian Klaver <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Adrian Klaver @ 2024-09-18 14:50 UTC (permalink / raw) To: Rob Sargent <[email protected]>; Andy Hartman <[email protected]>; +Cc: Muhammad Usman Khan <[email protected]>; [email protected] On 9/18/24 06:29, Rob Sargent wrote: > > >> On Sep 18, 2024, at 6:39 AM, Andy Hartman <[email protected]> wrote: >> >> >> psql -h $pgServer -d $pgDatabase -U $pgUser -c $copyCommand >> >> I'm wondering if it's waiting on P/w ? In a previous post I suggested: " To work through this you need to try what I call the crawl/walk/run process. In this case that is: 1) Crawl. Connect using psql and run the \copy in it with hard coded values. 2) Walk. Use psql with the -c argument and supply the command again with hard coded values 3) Run. Then use PowerShell and do the variable substitution. " Did you do this with the same command at each stage? If so at either 1) or 2) where you asked for a password? In a later posted I asked: "1) Are you logging connections/disconnection per?: https://www.postgresql.org/docs/current/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT If not do so as it will show you if a connection is being attempted. " Did you enable connection logging? Did you look at the Postgres log? If both the answers are yes you should see something like the below in case of password authentication: 2024-09-18 07:47:38.692 PDT [8090] [unknown]@[unknown] LOG: connection received: host=127.0.0.1 port=44840 2024-09-18 07:47:42.410 PDT [8095] [unknown]@[unknown] LOG: connection received: host=127.0.0.1 port=44848 2024-09-18 07:47:42.414 PDT [8095] aklaver@test LOG: connection authenticated: identity="aklaver" method=md5 (/etc/postgresql/16/main/pg_hba.conf:125) 2024-09-18 07:47:42.414 PDT [8095] aklaver@test LOG: connection authorized: user=aklaver database=test application_name=psql SSL enabled (protocol=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384, bits=256) >> >> Thanks. > > Very likely. Can you show the authentication > mechanisms used (pg_hba)? >> >> On Tue, Sep 17, 2024 at 7:10 PM Andy Hartman <[email protected] >> <mailto:[email protected]>> wrote: >> >> I'll echo vars and see if something looks strange. >> >> THanks. >> >> On Tue, Sep 17, 2024 at 3:46 PM Rob Sargent <[email protected] >> <mailto:[email protected]>> wrote: >> >> >> >> > On Sep 17, 2024, at 12:25 PM, Adrian Klaver >> <[email protected] <mailto:[email protected]>> >> wrote: >> > >> > On 9/17/24 09:21, Andy Hartman wrote: >> >> The command work outside of powershell yes >> > >> > Then you are going to need to use whatever debugging tools >> PowerShell has available to step through the script to figure >> out where the problem is. >> > >> > >> >> Visual Studio can run/debug PS 1 files. I am not at my desk >> but have done ps1 oneliner queries against mssql >> >> Suggest echoing ALL vars used in psql command >> >> > >> > >> -- Adrian Klaver [email protected] ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-09-18 14:50 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-09-18 12:39 Re: load fom csv Andy Hartman <[email protected]> 2024-09-18 13:29 ` Rob Sargent <[email protected]> 2024-09-18 14:50 ` Adrian Klaver <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox