Re: Encoding problem with 7.4

Поиск
Список
Период
Сортировка
От E.Rodichev
Тема Re: Encoding problem with 7.4
Дата
Msg-id Pine.GSO.4.58.0312032328570.18319@ra.sai.msu.su
обсуждение исходный текст
Ответ на Re: Encoding problem with 7.4  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Ответы Re: Encoding problem with 7.4  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: Encoding problem with 7.4  (Andrew Dunstan <andrew@dunslane.net>)
Re: Encoding problem with 7.4  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-hackers
On Wed, 3 Dec 2003, Stephan Szabo wrote:

>
> On Wed, 3 Dec 2003, E.Rodichev wrote:
>
> > On Fri, 28 Nov 2003, Tom Lane wrote:
> >
> > > "E.Rodichev" <er@sai.msu.su> writes:
> > > > /e:2>createdb test
> > >
> > > >  test      | er       | SQL_ASCII   <----- Incorrect!
> > > > (3 rows)
> > >
> > > > Let's note than the last line is in fact completely incorrect.
> > >
> > > What's incorrect about it?  You didn't ask for any other encoding
> > > than SQL_ASCII.
> >
> > It is incorrect, because database "test" is, really, in KOI8, NOT in SQL_ASCII
> > in this example, as I explained in my mail.
>
> No, it isn't. As far as PostgreSQL is concerned the database is SQL_ASCII
> since you didn't override the default encoding at initdb time or at
> createdb time.  You did choose LC_ values that seem to want KOI8, but
> locale and encoding are separate, if you want KOI8 encoding, you have to
> say so.

Yes, it is!

If db "test" is SQL_ASCII, AND all LC_* env are set to "C", the sorting of
ASCII characters is, for example,

a
A
b
B
c
C

not

A
B
C
a
b
c

(the first order is true for ru_RU.KOI8-R, the latter one - for C).

To summarize shortly:

- initdb _without_ -E flag, but with ru_RU.KOI8-R environment;
- createdb with any environment;
- psql indicates SQL_ASCII;
- sorting and upper/lowercasing are in ru_RU.KOI8-R, even with LC_*
environment is set to "C".

Where is the logic?

Best wishes,
E.R.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: postgresql-7.4 make error: tuptoaster.c: In function `toast_delete_datum'
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Encoding problem with 7.4