Re: The postgres server don't work

From: Mohammed falih <moh(dot)falih98(at)gmail(dot)com>
To: Дмитрий Иванов <firstdismay(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: The postgres server don't work
Date: 2022-01-09 10:16:01
Message-ID: CADqaUh_Kz1wjGN=spZaQ3mw4Vtq=VU86TYBr6tS_0wq2w5ofew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

thank you for your efforts
I added chcp 1252 line
but when I try to save the changes . an error pop out says "you don't have
the permission to open this file ,see the owner of the file or an
administrator to obtain permission"
even though I went to properties/security/mylaptopaccount and made it full
control

On Sun, 9 Jan 2022, 7:18 am Дмитрий Иванов, <firstdismay(at)gmail(dot)com> wrote:

> Such gross changes should not be made to the registry. You changed the
> settings of the whole system for the needs of one console. This will affect
> many services and console applications.
> You need to find a shortcut in the start menu.
> "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PostgreSQL 12\SQL
> Shell (psql).lnk"
> By the right click, select "Change" and add to the batch file an
> indication of the need to change the code page, save.
> Here is an example of a standard script:
>
> @echo off
> *chcp 1251*
> REM Copyright (c) 2012-2020, EnterpriseDB Corporation. All rights reserved
> REM PostgreSQL server psql runner script for Windows
>
> SET server=localhost
> SET /P server="Server [%server%]: "
>
> SET database=postgres
> SET /P database="Database [%database%]: "
>
> SET port=5999
> SET /P port="Port [%port%]: "
>
> SET username=postgres
> SET /P username="Username [%username%]: "
>
> for /f "delims=" %%a in ('chcp ^|find /c "932"') do @ SET
> CLIENTENCODING_JP=%%a
> if "%CLIENTENCODING_JP%"=="1" SET PGCLIENTENCODING=SJIS
> if "%CLIENTENCODING_JP%"=="1" SET /P PGCLIENTENCODING="Client Encoding
> [%PGCLIENTENCODING%]: "
>
> REM Run psql
> "C:\Program Files\PostgreSQL\12\bin\psql.exe" -h %server% -U %username% -d
> %database% -p %port%
>
> pause
>
> --
> Regards, Dmitry!
>
>
> вс, 9 янв. 2022 г. в 05:19, Mohammed falih <moh(dot)falih98(at)gmail(dot)com>:
>
>> yes I think the service doesn't even start
>>
>> I have only the default protection that comes with the operating system
>>
>> wow the postgres started working!! but the problem came back that talks
>> about console code " WARNING: Console code page (437) differs from
>> Windows code page (1252)
>>
>> 8-bit characters might not work correctly. See psql reference
>> page "Notes for Windows users" for details.
>>
>>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mohammed falih 2022-01-09 10:27:16 Re: The postgres server don't work
Previous Message Дмитрий Иванов 2022-01-09 04:18:22 Re: The postgres server don't work