Windows psql changes after 8.1.1

Started by John DeSoiabout 19 years ago4 messages
#1John DeSoi
desoi@pgedit.com

Hi,

My editor starts a shell session to communicate with psql. On builds
after 8.1.1 this is no longer working on Windows. It seems that I'm
no longer getting the password prompt (even if using the -W).
Everything appears to be the same as before if I run interactively
from the command line. I tried to compare the source, but I could not
find anything that would explain the difference (and no problems on
the Mac).

Any suggestions on where to look?

Thanks and Happy Thanksgiving,

John

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

#2Magnus Hagander
mha@sollentuna.net
In reply to: John DeSoi (#1)
Re: Windows psql changes after 8.1.1

Hi,

My editor starts a shell session to communicate with psql. On
builds after 8.1.1 this is no longer working on Windows. It
seems that I'm no longer getting the password prompt (even if
using the -W).
Everything appears to be the same as before if I run
interactively from the command line. I tried to compare the
source, but I could not find anything that would explain the
difference (and no problems on the Mac).

Any suggestions on where to look?

Hmm, not sure why that changed after 8.1.1 - I see changes in 8.1.4
only. But - you're not supposed to send the password over stdin/stdout.
I would suggest you set the PGPASSWORD environment variable in the
custom environment. (it's secure on windows)

//Magnus

#3John DeSoi
desoi@pgedit.com
In reply to: Magnus Hagander (#2)
Re: Windows psql changes after 8.1.1

Hi Magnus,

I did not use PGPASSWORD because the documentation says it is not
secure. I'll give it a try on Windows. Just curious, why is stdin/
stdout insecure if that is what is used for normal interactive
operation?

Could you point me to the file that changed in 8.1.4?

Thanks!

John

On Nov 23, 2006, at 9:12 AM, Magnus Hagander wrote:

Hmm, not sure why that changed after 8.1.1 - I see changes in 8.1.4
only. But - you're not supposed to send the password over stdin/
stdout.
I would suggest you set the PGPASSWORD environment variable in the
custom environment. (it's secure on windows)

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

#4Magnus Hagander
mha@sollentuna.net
In reply to: John DeSoi (#3)
Re: Windows psql changes after 8.1.1

Hi Magnus,

I did not use PGPASSWORD because the documentation says it is
not secure.

Well, it says "some operating systems allow non-root users to see
process environment variables via ps". This is very much not the case on
Windows, so I don't beleive there is any problem with it on windows.

I'll give it a try on Windows. Just curious, why
is stdin/ stdout insecure if that is what is used for normal
interactive operation?

It's not used for normal interactive operation. The password is
retreived directly from CON: (just like it does on Unix)

Could you point me to the file that changed in 8.1.4?

It's src/port/sprompt.c.

//Magnus