From: Tom Arthurs <tom@jobflash.com>
To: Andrei Bintintan <klodoma@ar-sd.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Win32 Postgresql Command Line Password Specification
Date: Tue, 08 Feb 2005 01:01:53 -0800
Message-ID: <42088001.3010602@jobflash.com> (raw)
In-Reply-To: <007501c50db5$c6e204f0$0b00a8c0@forge>
References: <007501c50db5$c6e204f0$0b00a8c0@forge>
Not sure if it will work in windows, but in unix, I use the envrionmental variable PGPASSWORD
Not the safest thing in the world, but in my case, if a hacker's gotten through two layers of firewall, I'm sunk anyhow. :)
Andrei Bintintan wrote:
> Hi,
>
> I have to run some command line commands that I have to run on a windows
> machine. Like pgsql, dropdb, createdb etc.
> All these commands are runned from a php scripts.
>
> Now, my question is how can I specify a User and Password to postgresql
> database system. I found out how can I say the user, but the password is
> always asked in the command line. I need this also to be specified in
> the command.
>
> for example: dropdb database1 -U postgres -W.... always ask a password
> in the command line.
> I want to specify in the command line the pass.
>
> The only solution that I found for this problem is to put the postgre
> user autentication to trust and to skip the password.
>
> Andy.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tom@jobflash.com, klodoma@ar-sd.net
Subject: Re: Win32 Postgresql Command Line Password Specification
In-Reply-To: <42088001.3010602@jobflash.com>
References: <007501c50db5$c6e204f0$0b00a8c0@forge> <42088001.3010602@jobflash.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox