Re: [GENERAL] 'a' == 'a '

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] 'a' == 'a '
Дата
Msg-id 13595.1129839083@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] 'a' == 'a '  (Chris Travers <chris@travelamericas.com>)
Ответы Re: [GENERAL] 'a' == 'a '  (Richard_D_Levine@raytheon.com)
Список pgsql-hackers
Chris Travers <chris@travelamericas.com> writes:
> IIrc, varchar and bpchar are stored in a similar way, but are presented
> differently when retrieved.  I.e. storage is separate from presentation
> in this case.  I.e. the padding in bpchar occurs when it is presented
> and stripped when it is stored.

This is not so, although I've occasionally wondered whether we shouldn't
try to make it so.  Certainly we don't rely on char(N) to be physically
fixed-width (and can't, at least not with variable-width character
encodings) so there can be no performance advantage to actually storing
the insignificant spaces.  The hard part would be in figuring out how
the output routine could know how many spaces to add back.

            regards, tom lane

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Seeing context switch storm with 10/13 snapshot of
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: 8.04 and RedHat/CentOS init script issue and sleep