Simplifying varchar and bpchar behavior

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Simplifying varchar and bpchar behavior
Дата
Msg-id 18326.1053722088@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
We have had a couple of threads recently on improving
bpchar/varchar/text behavior by making bpchar-to-text promotion
go through rtrim() (instead of being a straight binary-compatible
conversion) and getting rid of redundant operators:

http://archives.postgresql.org/pgsql-hackers/2002-11/msg00703.php
http://archives.postgresql.org/pgsql-performance/2003-05/msg00151.php

I'm going to go ahead and make these changes for 7.4, as they will
clearly improve the intuitiveness of the behavior.  I don't think they
move us any closer to spec compliance --- the spec appears to require
a notion of a collation sequence that can be specified independently
of the character datatype, which is something we don't have and aren't
likely to have very soon.  (It's not clear to me that it's actually
*useful* to specify NO PAD collation with fixed-width character data,
or PAD SPACE with varchar data, but the spec lets you do it.)  In the
meantime though these changes seem to be a win, and they will not leave
us any worse off when we do get around to implementing collations.

We speculated about a couple of alternative solutions in the first of
the above-mentioned threads, but they didn't look nearly as practical
to implement as this way.

Last call for objections ...
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Static snapshot data
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Plan B for log rotation support: borrow Apache code