Re: The same result for with SPACE and without SPACE - Mailing list pgsql-admin

From Tom Lane
Subject Re: The same result for with SPACE and without SPACE
Date
Msg-id 2018059.1686782739@sss.pgh.pa.us
Whole thread Raw
In response to Re: The same result for with SPACE and without SPACE  (M Sarwar <sarwarmd02@outlook.com>)
Responses The same result for with SPACE and without SPACE
Re: The same result for with SPACE and without SPACE
List 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 by date:

Previous
From: M Sarwar
Date:
Subject: Re: The same result for with SPACE and without SPACE
Next
From: Scott Ribe
Date:
Subject: Re: The same result for with SPACE and without SPACE