Re: Win32 Postgresql Command Line Password Specification

From: Tom Arthurs <tom(at)jobflash(dot)com>
To: Andrei Bintintan <klodoma(at)ar-sd(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Win32 Postgresql Command Line Password Specification
Date: 2005-02-08 09:01:53
Message-ID: 42088001.3010602@jobflash.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message John Jensen 2005-02-08 09:36:15 Re: Win32 Postgresql Command Line Password
Previous Message Iain 2005-02-08 08:37:54 Re: Win32 Postgresql Command Line Password Specification