Re: LINE COMMAND - Mailing list pgsql-bugs

From Mike Fowler
Subject Re: LINE COMMAND
Date
Msg-id 4C694F65.2090008@mlfowler.com
Whole thread Raw
In response to LINE COMMAND  (Felipe Lopes <felipelopess@gmail.com>)
Responses Re: LINE COMMAND
List pgsql-bugs
On 16/08/10 15:03, Felipe Lopes wrote:
> I would like to run a line command (psql) with the supplied password
> without pausing the command, but this option is not available:
> psql --username=root --password=root my_bd < "script.sql"
> The pass only can be informed after execution, pausing the command:
> psql --username=root --password my_bd<script.sql
> Senha para usußrio root: ****
>
> Thanks.
>
> --
> Felipe L.

Yes, the --password option forces the server to request password
authentication. What you need to do is create a password file and
specify --no-password on your psql command. See:

http://www.postgresql.org/docs/8.4/interactive/libpq-pgpass.html

Regards,

--
Mike Fowler
Registered Linux user: 379787

pgsql-bugs by date:

Previous
From: Felipe Lopes
Date:
Subject: LINE COMMAND
Next
From: Tom Lane
Date:
Subject: Re: LINE COMMAND