Re: createdb.exe and psql.exe without Promting Password

From: Richard Huxton <dev(at)archonet(dot)com>
To: Iñigo Barandiaran <ibarandiaran(at)vicomtech(dot)org>
Cc: rod(at)iol(dot)ie, Sam Mason <sam(at)samason(dot)me(dot)uk>, pgsql-general(at)postgresql(dot)org
Subject: Re: createdb.exe and psql.exe without Promting Password
Date: 2009-02-11 08:24:29
Message-ID: 49928B3D.6080307@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Iñigo Barandiaran wrote:
> Thank you all!
>
> and Thanks Sam for the explanation about environment variable. I didn't
> know about that :)
>
> I've also tried the option of .pgpass file, that as far as I understand
> in Windows is pgpass.conf. I did a file containing only this line
>
> /*/:/*///:/*///:/MyPostgres///User/:MyPostgres://Password

If you want to run psql logged into your machine as "inigo" and connect
to "mydb1" as user "pguser1" with password "pass1" then the line should be:

localhost:5432:mydb1:pguser1:pass1

You might want some stars in there

*:*:*:pguser1:pass1

> /I put this file in:
> c:\MyPosgreInstalation and c:\MyPosgreInstalation\bin and
> c:\MyPosgreInstalation\data and
> C:\Documents and Settings\postgres\Application Data\

If you are logged into your machine as "inigo" it would go into:

C:\Documents and Settings\inigo\Application Data\postgresql\pgpass.conf

If you logged into your machine as user "richard" you would need to
create a new pgpass.conf file and put it in richard's "Application Data"
folder.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2009-02-11 08:32:41 Re: Difference between Windows pgsql and Linux pgsql?
Previous Message Russell Hltn 2009-02-11 08:15:02 Difference between Windows pgsql and Linux pgsql?