Thread: Bug: When installing pgpass.conf does not get created under XP

Bug: When installing pgpass.conf does not get created under XP

From
"Athanasios E. Samaras"
Date:
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US" style="font-size:
10.0pt;font-family:Arial">Hi there, I notice a bug in PGADMIN 1.6.3 when installing under on Windows XP box and the
useraccount used is not in English.</span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US"
style="font-size:
10.0pt;font-family:Arial">More details:</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
lang="EN-US"style="font-size: 
10.0pt;font-family:Arial">Windows XP 32bit / SP2 </span></font><p class="MsoNormal"><font face="Arial" size="2"><span
lang="EN-US"style="font-size: 
10.0pt;font-family:Arial">User account </span></font><font face="Arial" size="2"><span lang="EL"
style="font-size:10.0pt;font-family:Arial">ΑθανάσιοςΣαμαράς </span></font><font face="Arial" size="2"><span
lang="EN-US"style="font-size:10.0pt;font-family:Arial">(Greek Name</span></font><font face="Arial" size="2"><span
lang="EL"style="font-size:10.0pt; 
font-family:Arial">, </span></font><font face="Arial" size="2"><span lang="EN-US"
style="font-size:10.0pt;font-family:Arial">mostprobably it will appear as????, but I assume that all the languages
apartEnglish must have the same issue)</span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US"
style="font-size:
10.0pt;font-family:Arial">Application data location: “C:\Documents and Settings\Αθανάσιος Σαμαράς\Application
Data\”</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span lang="EN-US" style="font-size: 
10.0pt;font-family:Arial">Result: Can not open any database in pgadmin III due to error message “can not open file
C:\Documentsand Settings\Αθανάσιος Σαμαράς\Application Data\postgresql\pgpass.conf” and the program crashes, sending
reportback.</span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US" style="font-size: 
10.0pt;font-family:Arial">Reason: During installation the posgresql folder and pgpass.conf does not get
created.</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span lang="EN-US" style="font-size: 
10.0pt;font-family:Arial">Workaround: go to application data and create the postgresql folder manually, create an empty
filecalled pgpass.conf, since it is under your account there should not be any problems with
privileges.</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span lang="EN-US" style="font-size: 
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US"
style="font-size:
10.0pt;font-family:Arial">Cheers</span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US"
style="font-size:
10.0pt;font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US"
style="font-size:
10.0pt;font-family:Arial">A.E.S.</span></font><p class="MsoNormal"><font face="Arial" size="2"><span lang="EN-US"
style="font-size:
10.0pt;font-family:Arial">Sakis Samaras </span></font></div>

Re: Bug: When installing pgpass.conf does not get created under XP

From
Dave Page
Date:
Athanasios E. Samaras wrote:
> Hi there, I notice a bug in PGADMIN 1.6.3 when installing under on
> Windows XP box and the user account used is not in English.
> 
> More details:
> 
> Windows XP 32bit / SP2
> 
> User account Αθανάσιος Σαμαράς (Greek Name, most probably it will appear
> as????, but I assume that all the languages apart English must have the
> same issue)
> 
> Application data location: “C:\Documents and Settings\Αθανάσιος
> Σαμαράς\Application Data\”
> 
> Result: Can not open any database in pgadmin III due to error message
> “can not open file C:\Documents and Settings\Αθανάσιος
> Σαμαράς\Application Data\postgresql\pgpass.conf” and the program
> crashes, sending report back.
> 
> Reason: During installation the posgresql folder and pgpass.conf does
> not get created.
> 
> Workaround: go to application data and create the postgresql folder
> manually, create an empty file called pgpass.conf, since it is under
> your account there should not be any problems with privileges.

It's normal for the file not to exist - pgAdmin should work fine in
those cases. Is it failing only when you try to save the password? This
should also work if the file isn't there (it'll create it), but I wonder
if it's somehow getting confused by unicode characters in your username.
That doesn't explain why it works if you create it though... unless
there's something broken in the create file code path.

Regards, Dave



Re: Bug: When installing pgpass.conf does not get created under XP

From
"Athanasios E. Samaras"
Date:
It seems to me that the create fails, most probably because of the space in
the user name, probably you would like to escape the space and it should  be
just fine.

Cheers, Sakis


-----Original Message-----
From: Dave Page [mailto:dpage@postgresql.org]
Sent: Saturday, May 26, 2007 7:52 PM
To: Athanasios E. Samaras
Cc: pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Bug: When installing pgpass.conf does not get
created under XP

Athanasios E. Samaras wrote:
> Hi there, I notice a bug in PGADMIN 1.6.3 when installing under on
> Windows XP box and the user account used is not in English.
>
> More details:
>
> Windows XP 32bit / SP2
>
> User account Αθανάσιος Σαμαράς (Greek Name, most probably it will appear
> as????, but I assume that all the languages apart English must have the
> same issue)
>
> Application data location: “C:\Documents and Settings\Αθανάσιος
> Σαμαράς\Application Data\”
>
> Result: Can not open any database in pgadmin III due to error message
> “can not open file C:\Documents and Settings\Αθανάσιος
> Σαμαράς\Application Data\postgresql\pgpass.conf” and the program
> crashes, sending report back.
>
> Reason: During installation the posgresql folder and pgpass.conf does
> not get created.
>
> Workaround: go to application data and create the postgresql folder
> manually, create an empty file called pgpass.conf, since it is under
> your account there should not be any problems with privileges.

It's normal for the file not to exist - pgAdmin should work fine in
those cases. Is it failing only when you try to save the password? This
should also work if the file isn't there (it'll create it), but I wonder
if it's somehow getting confused by unicode characters in your username.
That doesn't explain why it works if you create it though... unless
there's something broken in the create file code path.

Regards, Dave



Re: Bug: When installing pgpass.conf does not get created under XP

From
Dave Page
Date:
Athanasios E. Samaras wrote:
> It seems to me that the create fails, most probably because of the space in
> the user name, probably you would like to escape the space and it should  be
> just fine.

That's not it - on a standard UK English XP install, the full path is
C:\Documents and Settings\<username>\Application Data\postgresql\pgpass.conf

To be sure, I also created a username containing a space and it worked
just fine.

Can you please send me your username in a UTF-8 text file (so that my
mail client doesn't mangle it) for testing?

Thanks, Dave


Re: Bug: When installing pgpass.conf does not get created under XP

From
Dave Page
Date:
Athanasios E. Samaras wrote:
> Hi there,
> Sorry for the delay, but yesterday was a holiday in Greece...
> Please find attached the full path to system data.
> Hope it helps.

Thanks - it seems that the username gets mangled in the environment.
I've changed the code to avoid getting it that way and it seems to work
as expected now. Fix committed for the next release.

Regards, Dave