Re: psql and pgpass.conf on Windows

2023-07-03 Thread Kirk Wolak
On Sat, Jul 1, 2023 at 2:07 AM Julien Rouhaud wrote: > On Sat, Jul 01, 2023 at 01:40:49AM -0400, Kirk Wolak wrote: > > > > FWIW, I discovered that psql is case sensitive on the dbname, without > > quoting it! > > That's on purpose, since shell quoting behavior is entirely different from > SQL. >

Re: psql and pgpass.conf on Windows

2023-06-30 Thread Julien Rouhaud
On Sat, Jul 01, 2023 at 01:40:49AM -0400, Kirk Wolak wrote: > > FWIW, I discovered that psql is case sensitive on the dbname, without > quoting it! That's on purpose, since shell quoting behavior is entirely different from SQL. The quotes are discarded by the shell, so it would otherwise require u

Re: psql and pgpass.conf on Windows

2023-06-30 Thread Kirk Wolak
On Fri, Jun 30, 2023 at 8:39 AM wrote: > On Fri, 30 Jun 2023 11:16:36 +0800 Julien Rouhaud wrote: > > >Hi, > > > >On Thu, Jun 29, 2023 at 10:42:00PM -0400, p...@pfortin.com wrote: > >> > >> Windows: %APPDATA%\postgresql\pgpass.conf > >> > > echo %APPDATA% > C:\Users\Pierre\AppData\Roaming > > >

Re: psql and pgpass.conf on Windows

2023-06-30 Thread pf
On Thu, 29 Jun 2023 20:27:59 -0700 David G. Johnston wrote: >On Thu, Jun 29, 2023 at 7:42 PM wrote: > >> Trying to write a script that will run on Linux, Windows, and Mac. >> > >This seems impossible on its face unless you use WSL within the Windows >environment. And if you are doing that, the

Re: psql and pgpass.conf on Windows

2023-06-30 Thread pf
On Fri, 30 Jun 2023 11:16:36 +0800 Julien Rouhaud wrote: >Hi, > >On Thu, Jun 29, 2023 at 10:42:00PM -0400, p...@pfortin.com wrote: >> >> Windows: %APPDATA%\postgresql\pgpass.conf >> >> On Linux, this works. However, on Windows, psql will not read >> pgpass.conf (tried in just about every location

Re: psql and pgpass.conf on Windows

2023-06-29 Thread David G. Johnston
On Thu, Jun 29, 2023 at 7:42 PM wrote: > Trying to write a script that will run on Linux, Windows, and Mac. > This seems impossible on its face unless you use WSL within the Windows environment. And if you are doing that, then the pathing would be WSL pathing, not native Windows. David J.

Re: psql and pgpass.conf on Windows

2023-06-29 Thread Julien Rouhaud
Hi, On Thu, Jun 29, 2023 at 10:42:00PM -0400, p...@pfortin.com wrote: > > Windows: %APPDATA%\postgresql\pgpass.conf > > On Linux, this works. However, on Windows, psql will not read > pgpass.conf (tried in just about every location I could think of) > > Even: "set PGPASSFILE=" does not work. >

psql and pgpass.conf on Windows

2023-06-29 Thread pf
Hi, Trying to write a script that will run on Linux, Windows, and Mac. The "standard" credentials file contains: hostname:port:database:username:password in: Linux: .pgpass Windows: %APPDATA%\postgresql\pgpass.conf Mac: (I'm not there yet...) On Linux, this works. However, on Windows,