The same result for with SPACE and without SPACE

Поиск
Список
Период
Сортировка
От Wetmore, Matthew (CTR)
Тема The same result for with SPACE and without SPACE
Дата
Msg-id 0055148e2cc742cbbc23485ae0c6c04e@express-scripts.com
обсуждение исходный текст
Ответ на Re: The same result for with SPACE and without SPACE  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: The same result for with SPACE and without SPACE  (Scott Ribe <scott_ribe@elevated-dev.com>)
Список pgsql-admin
I can reproduce this with a INT

-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: Wednesday, June 14, 2023 3:46 PM
To: M Sarwar <sarwarmd02@outlook.com>
Cc: Scott Ribe <scott_ribe@elevated-dev.com>; pgsql-admin@lists.postgresql.org
Subject: [EXTERNAL] Re: The same result for with SPACE and without SPACE

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://urldefense.com/v3/__https://www.postgresql.org/docs/current/datatype-character.html__;!!GFE8dS6aclb0h1nkhPf9!5ahVPSTPuRxIvywc-UhqjYfqPmkGYEBT5b4GYndHqVaD0G98F0LrX6G6GgTNaJsMVaewVB5e1wox__K0nNGLZsEilYBU$


            regards, tom lane





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

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