Re: warning about console code page on starting psql
От | Michael Wood |
---|---|
Тема | Re: warning about console code page on starting psql |
Дата | |
Msg-id | CAP6d-HVg9oY+FuDKyvigtVoAhC_3KD0_+67ege85bhYUS3NwYA@mail.gmail.com обсуждение исходный текст |
Ответ на | warning about console code page on starting psql (Scott Robertson <stumpednomore@gmail.com>) |
Список | pgsql-novice |
Hi Scott Sorry, I forgot to Cc the list earlier when I was replying from my phone. On 18 December 2014 at 07:38, Scott Robertson <stumpednomore@gmail.com> wrote: > > > On 12/18/2014 1:17 PM, Michael Wood wrote: > > > Hi > > > > On 17 Dec 2014 9:10 AM, "Scott Robertson" <stumpednomore@gmail.com> wrote: > > > > > > > > > On 12/17/2014 2:15 PM, David Johnston wrote: > > >> > > ... > > >> I don't know psql is launched on windows (or, specifically, how you are launching it) so cannot answer that particularquestion. Using "start->run" you can type "cmd" then in the resulting console change the codepage before manuallyrunning "psql" > > > > > > Tried this, nothing changed. > > > > I get the impression you are talking past each other. > > > > Try this: > > > > Click on Start -> Run and type cmd.exe > > Inside the black window that comes up, run chcp 1252 and change the font. > > Still inside the same clack window type psql. Oops, "clack" was meant to be "black". I'd blame my phone, but not sure I'd be believed :) > Michael, good advice, thanks. Here is what I did and it has got me down the road quite a ways, now it seems I have to studythe chapter on > user authentication since, if I go in this way instead of using the psql console, postgresql now relates to me as my Windowsuser account name > Luther. I tried the password for that, as well as the password for pg superuser postgres, but neither was accepted. SoI think I have to make a > map to equate Luther with postgres. > > This is what I did: > > Microsoft Windows [Version 6.1.7600] > Copyright (c) 2009 Microsoft Corporation. All rights reserved. > > C:\Users\Luther>cd\ > > C:\>chcp > Active code page: 437 > > C:\>chcp 1252 > Active code page: 1252 I assume you also changed the font. Since I don't currently use Postgres and have never used it on Windows, I'm not sure how important it is to change the font, but since it was mentioned in the docs, I assume it should be done. > C:\>cd \program files\postgresql\9.4\bin\ > > C:\Program Files\PostgreSQL\9.4\bin>psql > Password: > psql: FATAL: password authentication failed for user "Luther" > > C:\Program Files\PostgreSQL\9.4\bin>psql > Password: > psql: FATAL: password authentication failed for user "Luther" The way you were running psql before seems to be via a .bat or .cmd file. Did the authentication work that way? If so, it might be easiest to edit that file to add in the "chcp 1252" command before the call to the actual psql command. Or otherwise see how that file calls the actual psql command and do the same thing manually. If you decide to edit the .bat (or .cmd) file, make a backup of it first in case you make a mistake. Good luck. -- Michael Wood <esiotrot@gmail.com>
В списке pgsql-novice по дате отправления: