Re: The same result for with SPACE and without SPACE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: The same result for with SPACE and without SPACE
Дата
Msg-id 2018059.1686782739@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: The same result for with SPACE and without SPACE  (M Sarwar <sarwarmd02@outlook.com>)
Ответы The same result for with SPACE and without SPACE  ("Wetmore, Matthew (CTR)" <Matthew.Wetmore@express-scripts.com>)
Re: The same result for with SPACE and without SPACE  (M Sarwar <sarwarmd02@outlook.com>)
Список pgsql-admin
M Sarwar <sarwarmd02@outlook.com> writes:
> I expect this to behave the same way whether it comes from CHAR or VARCHAR.

You expect incorrectly.  CHAR comparison is insensitive to trailing
spaces:

https://www.postgresql.org/docs/current/datatype-character.html

            regards, tom lane



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

Предыдущее
От: M Sarwar
Дата:
Сообщение: Re: The same result for with SPACE and without SPACE
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: The same result for with SPACE and without SPACE