Re: how to set password while loging into database

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "J Roy" <Jithendra(dot)Roy(at)effone(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: how to set password while loging into database
Date: 2005-01-25 16:54:26
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE4766FA@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

You can put your password in pgpass.conf, see
http://www.postgresql.org/docs/8.0/static/libpq-pgpass.html. It will
affect all libpq applications though, and not just psql.

You can also put it in the PGPASSWORD environment variable with SET, but
it's deprecated for security reasons (see
http://www.postgresql.org/docs/8.0/static/libpq-envars.html)

//Magnus

> -----Original Message-----
> From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of J Roy
> Sent: Saturday, January 22, 2005 2:43 AM
> To: pgsql-hackers(at)postgresql(dot)org
> Subject: [HACKERS] how to set password while loging into database
>
> Hi,
>
> Actually i installed postgresql 8.0 on my windows system.
> After that i want to connect database through command prompt
> so i type like this c:\programfiles\postgresql\8.0\bin>psql
> -U postgres -d mydb when i typed the above command then it
> asking password, when i give password it is able connect
> otherwise it won't Here what my problem is in psql command i
> want to give password after user name, it should not ask me
> onceagain password, so is there any option to give password
> within psql command. You can ask me why i am asking like this
> if i want to run a batch file then i can not enter for each
> every command the password, so pls help me and tell me how to
> set password to commands like psql and createdb and other
> commands. Pls help it's very urgent for me.
>
> My email id is jith_n(at)yahoo(dot)com
>
> Thanks,
> J R
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index
> scan if your
> joining column's datatypes do not match
>

Browse pgsql-hackers by date

  From Date Subject
Next Message Patrick Welche 2005-01-25 17:00:24 Re: Goals for 8.1
Previous Message Tom Lane 2005-01-25 16:39:35 Re: how to add a new column in pg_proc table