Re: #postgresql report

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: #postgresql report
Дата
Msg-id 3832.1087326235@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: #postgresql report  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: #postgresql report  (Dennis Bjorklund <db@zigo.dhs.org>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Christopher Kings-Lynne wrote:
>> * We have a request for how to change database encoding every other
>> day

> This is pretty much impossible.  It's analogous to changing, say, the 
> endianness of all integers.  You would need to rewrite the entire 
> database.  But pg_dump & restore already does that.

I wonder though, do the requestors actually know what they're asking for?
Are they really asking for encoding changes, or are they asking for
locale changes?

>> (i suggest a warning in initdb if no encoding is specified -
>> EVERY pgsql newbie fails to set it)

> Hm...

initdb already tells you pretty clearly what locale it's picking.
I think people don't read the message and/or don't understand the
implications.

IMHO the *real* issues here boil down to two things:

1. You can't change locale after initdb.  Even a per-database locale
setting would be better than that (though of course the SQL spec sets
the bar much higher, namely per-column locales).

2. You can shoot yourself in the foot by selecting a database encoding
that's not compatible with the (fixed) locale.

AFAICS there is not very much we can do about either of these things
without creating our own locale support layer so we can stop depending
on the standard C library's inflexible and taciturn API.

Peter has mentioned that he is working on that but that it might be
a year or so before it's ready.  Is that still a reasonable guess?
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: OWNER TO on all objects
Следующее
От: "Dann Corbit"
Дата:
Сообщение: Re: #postgresql report