Обсуждение: user names & non-ASCII

Поиск
Список
Период
Сортировка

user names & non-ASCII

От
"Pavel Holec"
Дата:
Hi All, please help.
=20
I Have PostgreSQL server 8.4.9 on Linux, database utf-8 and Client app on W=
indows (VC++ and libpq.dll).
I need to use user account with non-ASCII and PQconnectdb() with options=3D=
"client_encoding=3DWIN1250" doesn't work.
SET CLIENT_ENCODING TO 'WIN1250' after PQconnectdb is too late because conn=
ection fails.
=20
Best regards,
=20
Pavel Holec

Re: user names & non-ASCII

От
Pavel Stehule
Дата:
Hello

this is not bug

you can try use a system variable PGCLIENTENCODING

bash-4.2$ PGCLIENTENCODING=3D'latin2' psql postgres
psql (9.1.1)
Type "help" for help.

postgres=3D# show client_encoding ;
 client_encoding
-----------------
 LATIN2
(1 row)

other way is connect with "only ascii" user name, changing encoding
and changin current role

SET role TO specialcharsrole;

Regards

Pavel Stehule


2011/12/16 Pavel Holec <holec@email.cz>:
> Hi All, please help.
>
> I Have PostgreSQL server 8.4.9 on Linux, database utf-8 and=C2=A0Client a=
pp on
> Windows (VC++ and libpq.dll).
> I need to use user account with non-ASCII and PQconnectdb()=C2=A0with
> options=3D"client_encoding=3DWIN1250" doesn't work.
> SET CLIENT_ENCODING TO 'WIN1250' after PQconnectdb is too late because
> connection fails.
>
> Best regards,
>
> Pavel Holec

Re: user names & non-ASCII

От
"Pavel Holec"
Дата:
PGCLIENTENCODING=3D'latin2' - doesn't help (SetEnvironmentVariable)
SET CLIENT_ENCODING TO - doesn't help (too late)
connect with "only ascii" not possible (users are set)
SET role TO specialcharsrole? google doesn't know
On servers we have 8.4.7 not 9.1.1
In manual is PQconnectdb() with options=3D"client_encoding =3D..." doesn't =
work

Pavel

-----Original Message-----
From: Pavel Stehule [mailto:pavel.stehule@gmail.com]=20
Sent: Friday, December 16, 2011 12:18 AM
To: Pavel Holec
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] user names & non-ASCII

Hello

this is not bug

you can try use a system variable PGCLIENTENCODING

bash-4.2$ PGCLIENTENCODING=3D'latin2' psql postgres psql (9.1.1) Type "help=
" for help.

postgres=3D# show client_encoding ;
 client_encoding
-----------------
 LATIN2
(1 row)

other way is connect with "only ascii" user name, changing encoding and cha=
ngin current role

SET role TO specialcharsrole;

Regards

Pavel Stehule


2011/12/16 Pavel Holec <holec@email.cz>:
> Hi All, please help.
>
> I Have PostgreSQL server 8.4.9 on Linux, database utf-8 and Client app=20
> on Windows (VC++ and libpq.dll).
> I need to use user account with non-ASCII and PQconnectdb() with=20
> options=3D"client_encoding=3DWIN1250" doesn't work.
> SET CLIENT_ENCODING TO 'WIN1250' after PQconnectdb is too late because=20
> connection fails.
>
> Best regards,
>
> Pavel Holec

Re: user names & non-ASCII

От
"Pavel Holec"
Дата:
User name with PQescapeBytea also doesn't help. Pavel

-----Original Message-----
From: Pavel Stehule [mailto:pavel.stehule@gmail.com]=20
Sent: Friday, December 16, 2011 12:18 AM
To: Pavel Holec
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] user names & non-ASCII

Hello

this is not bug

you can try use a system variable PGCLIENTENCODING

bash-4.2$ PGCLIENTENCODING=3D'latin2' psql postgres psql (9.1.1) Type "help=
" for help.

postgres=3D# show client_encoding ;
 client_encoding
-----------------
 LATIN2
(1 row)

other way is connect with "only ascii" user name, changing encoding and cha=
ngin current role

SET role TO specialcharsrole;

Regards

Pavel Stehule


2011/12/16 Pavel Holec <holec@email.cz>:
> Hi All, please help.
>
> I Have PostgreSQL server 8.4.9 on Linux, database utf-8 and Client app=20
> on Windows (VC++ and libpq.dll).
> I need to use user account with non-ASCII and PQconnectdb() with=20
> options=3D"client_encoding=3DWIN1250" doesn't work.
> SET CLIENT_ENCODING TO 'WIN1250' after PQconnectdb is too late because=20
> connection fails.
>
> Best regards,
>
> Pavel Holec