Re: LIKE, CHAR(), and trailing spaces

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LIKE, CHAR(), and trailing spaces
Дата
Msg-id 24381.1296752879@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: LIKE, CHAR(), and trailing spaces  (Kenneth Marshall <ktm@rice.edu>)
Список pgsql-hackers
Kenneth Marshall <ktm@rice.edu> writes:
> On Wed, Feb 02, 2011 at 07:48:38PM -0500, Bruce Momjian wrote:
>>> It seems LIKE is considering the trailing CHAR(10) field spaces as
>>> significant, even though our documentations says:

> +10 for leaving the behavior as is.

Yeah, we've been around on this before if memory serves.  I don't think
there's a case for changing it that's strong enough to outweigh
backwards-compatibility considerations.

Also, anyone who does want the spaces to be stripped can just add an
explicit cast to text first:   char_variable::text LIKE ...
If we change it then we'll have to provide some other weird notation
to allow people to get at the old behavior (I suppose there are some
people out there relying on it).
        regards, tom lane


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

Предыдущее
От: Florian Pflug
Дата:
Сообщение: Re: ALTER EXTENSION UPGRADE, v3
Следующее
От: Robert Haas
Дата:
Сообщение: Re: ALTER EXTENSION UPGRADE, v3