Re: About "ALTER USER" command

From: " Mónica Ivonne Herrera Alonso " <miherrera(at)ucatolica(dot)edu(dot)co>
To: " Álvaro " <alvherre(at)commandprompt(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: About "ALTER USER" command
Date: 2006-07-27 19:50:35
Message-ID: 44C9190B.000001.01648@DESARROLLO04
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Alvaro:

In effect I published the file pgpass.conf and I added the following line:

localhost:5432:*:postgres:kklliu

However. I continued my instruction and follows without working to me.
Exists the way to invoke psql that is not of interactive way so that It
alters password of a user with no need to be in psql?

With the commando psql - S “ALTER USER…” it continues saying to me that that
data base does not exist, still modified the file pgpass.conf. If you know
some way in that this can be done, would be thankful to you immensely.

Sincerelly,

-------Mensaje original-------

De: Álvaro
Fecha: 07/27/06 07:47:25
Para: Mónica
CC: pgsql-hackers(at)postgresql(dot)org
Asunto: Re: [HACKERS] About "ALTER USER" command

Mónica Ivonne Herrera Alonso wrote:

Mónica,

> I need to change password of the usuary POSTGRES using the commando "ALTER
> USER". This change I must do it by means of a program .bat in “quiet” way


>

> I have the following instruction in .bat program :

>

> psql -S "ALTER USER postgres WITH PASSWORD 'xxtyod';"

>

> But when I execute this program, it requests user password to me.


Sure. It's asking for the password of the user who will connect to the
database and issue the SQL command. There are several ways to avoid
this; the simplest is to create an appropiate .pgpass file (pgpass.conf
in Windows). The exact location is something like %APPDATA%/postgresql,
but better look it up in the documentation.

--
Alvaro Herrera Valdivia, Chile ICBM: S 39º 49' 18.1", W 73º 13' 56.4

"Having your biases confirmed independently is how scientific progress is
made, and hence made our great society what it is today" (Mary Gardiner)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-07-27 19:54:09 Re: patch implementing the multi-argument aggregates (SOC project)
Previous Message Nicolai Petri 2006-07-27 19:50:19 Re: Getting current transaction id