Re: Charset/collate support and function parameters

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Charset/collate support and function parameters
Дата
Msg-id 6799.1099161778@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Charset/collate support and function parameters  (Dennis Bjorklund <db@zigo.dhs.org>)
Ответы Re: Charset/collate support and function parameters  (Dennis Bjorklund <db@zigo.dhs.org>)
Список pgsql-hackers
Dennis Bjorklund <db@zigo.dhs.org> writes:
> On Sat, 30 Oct 2004, Tom Lane wrote:
>> Why would we not keep this information right in the string values?

> We could, but then we would need to parse it every time.

Huh?  We'd store it in the most compact pre-parsed form we could think
of; probably some sort of index into a list of supported character sets
and collations.  (This is not so different from representing timezones
inside timestamptz values, instead of using a global setting.)

> Are you worried about performance or is it the smaller change that you
> want?

I'm worried about the fact that instead of, say, one length(text)
function, we would now have to have a different one for every
characterset/collation.  Not to mention one for every possible N in
varchar(N).  Making those properties part of a function's parameter
signature is unworkable on its face --- it'll cause an exponential
explosion in the number of pg_proc entries, and probably make it
impossible to resolve a unique candidate function in many situations.
        regards, tom lane


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

Предыдущее
От: Dennis Bjorklund
Дата:
Сообщение: Re: Charset/collate support and function parameters
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: 8.0b4: COMMIT outside of a transaction echoes ROLLBACK