Re: Why are default encoding conversions

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Why are default encoding conversions
Дата
Msg-id 20060328163133.GD12995@svana.org
обсуждение исходный текст
Ответ на Re: Why are default encoding conversions  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Список pgsql-hackers
On Wed, Mar 29, 2006 at 01:09:08AM +0900, Tatsuo Ishii wrote:
> BTW, what does the standard say about conversion vs. schema? Doesn't
> conversion belong to schema? If so, then schema specific default
> conversion seems more standard-friendly way.

The standard says nothing about conversions. They're only used when
communicating between the client and the server. By having them belong
to a schema you suggest that your queries be interpreted differently
character set-wise depending on the schema.

SELECT * FROM myschema.mytable;
SET search_path=otherschema;
SELECT * FROM myschema.mytable;

So the second may produce a different output because the schema changed
and the data to the client will be encoded in a different encoding.
Ofcourse, if the client and server are using the same encoding then the
queries will produce the same result. That sounds broken to me.

The reason it doesn't happen now is because (as Tom said) we only do
the lookup once. But can trigger it if you're careful.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] PANIC: heap_update_redo: no block
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Shared memory