Re: Detecting SQL_ASCII databases

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Detecting SQL_ASCII databases
Дата
Msg-id 415218FC.9010801@opencloud.com
обсуждение исходный текст
Ответ на Re: Detecting SQL_ASCII databases  (Kris Jurka <books@ejurka.com>)
Ответы Re: Detecting SQL_ASCII databases
Список pgsql-jdbc
Kris Jurka wrote:
>
> On Sun, 19 Sep 2004, Oliver Jowett wrote:
>
>
>>8.0 backends report the server_encoding value of the database via
>>ParameterStatus during startup. I'd like to use this to detect SQL_ASCII
>>databases and complain loudly.
>
>
> That would certainly help people who have setup their databases
> incorrectly, but it is actually legal to have a setup like this as long as
> you only use seven bit ascii characters.

We could support this case by requiring charSet=SQL_ASCII to be
specified if you have this case. (this would set client_encoding =
SQL_ASCII and interpret data as US-ASCII).

Part of the problem is that SQL_ASCII seems to mean "just store whatever
I'm given directly"; there is no real "7-bit ascii only" encoding?

> I'm not sure where I stand on
> this.  There are probably plenty of databases that are working fine with
> the current setup.  For example even using 8 bit chars in a SQL_ASCII
> database, if all clients are unicode then the only problem you'll see is
> the length check in something like varchar(100) failing.

We could support this with charSet=UNICODE (set client_encoding =
SQL_ASCII and interpret data as UTF-8)

-O

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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: raising the default prepareTheshold
Следующее
От: "Jaroslaw J. Pyszny"
Дата:
Сообщение: Re: Auto-increment serial (Postgresql JDBC driver w/