Unix Technical Forum

BUG #2692: psql sends natively-localized strings to database without setting client_encoding first

This is a discussion on BUG #2692: psql sends natively-localized strings to database without setting client_encoding first within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2692 Logged by: Sergiy Vyshnevetskiy Email address: serg@vostok.net PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 11:17 AM
Sergiy Vyshnevetskiy
 
Posts: n/a
Default BUG #2692: psql sends natively-localized strings to database without setting client_encoding first


The following bug has been logged online:

Bug reference: 2692
Logged by: Sergiy Vyshnevetskiy
Email address: serg@vostok.net
PostgreSQL version: 8.1.4
Operating system: FreeBSD-6 stable
Description: psql sends natively-localized strings to database
without setting client_encoding first
Details:

psql mixes natively-localized string in SQL commands without setting
client_encoding first. Looks like we _really_ need some code in configure
script to find acceptable native names for our database charsets.

%zsh 1 11:27 serg@serg p0 /home/serg
set | egrep -a '^LANG|^LC_|^MM_CHAR'
LANG=ru_RU.KOI8-R
MM_CHARSET=KOI8-R
%zsh 0 11:27 serg@serg p0 /home/serg
psql -l
ERROR: invalid byte sequence for encoding "UTF8": 0xe9cdd1
%zsh 1 11:27 serg@serg p0 /home/serg
psql -d postgres
SET
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

#psql = serg@[local]:5432 postgres
\encoding KOI8
#psql = serg@[local]:5432 postgres
\l
Список баз данных
Имя | Владелец | Кодировка
------------+----------+-----------
postgres | pgsql | UTF8
template0 | pgsql | UTF8
template1 | pgsql | UTF8
(записей: 3)

#psql = serg@[local]:5432 postgres

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 11:17 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #2692: psql sends natively-localized strings to database without setting client_encoding first

"Sergiy Vyshnevetskiy" <serg@vostok.net> writes:
> psql mixes natively-localized string in SQL commands without setting
> client_encoding first. Looks like we _really_ need some code in configure
> script to find acceptable native names for our database charsets.


Actually, psql has no business sending those strings to the server at
all --- it's just laziness in describe.c not to find another method of
attaching the headings to the output tables ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:06 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com