Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9mi6-0004OV-Pj for pgsql-admin@arkaria.postgresql.org; Thu, 15 Jun 2023 13:08:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9mi5-0003nW-Ej for pgsql-admin@arkaria.postgresql.org; Thu, 15 Jun 2023 13:08:21 +0000 Received: from makus.postgresql.org ([72.32.157.229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9mi4-0003mz-8y for pgsql-admin@lists.postgresql.org; Thu, 15 Jun 2023 13:08:20 +0000 Received: from mx0a-000e5c14.pphosted.com ([148.163.133.209]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q9mhw-002Lqq-5N for pgsql-admin@lists.postgresql.org; Thu, 15 Jun 2023 13:08:18 +0000 Received: from pps.filterd (m0206226.ppops.net [127.0.0.1]) by mx0a-000e5c14.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35FC0PrH029652; Thu, 15 Jun 2023 08:08:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=express-scripts.com; h=from : to : cc : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version : subject; s=pod140124231234; bh=lczObKjAgJ+CBgFc7Evnr/1xAPIcx9ceVqsZKoFZ+gY=; b=QJcFlv5oZpSQctNaUTVSHLOWUWUlhrdQEjAv+w2aSWbA1OIHx5KwmowzThZFwh3+0vwS 9nAIzjJA+fYrctjbXHJU2Sh7E+qZnulU+AalafBMHd31sSTsWJqdpglLD80ByLVh3KoB F/Ixgd/6oiV06hKDuPQK0O5Qf8D5sylLxokRyans+eLMONz66JWqzcmxTC0IwLpxCLWb o5KemOos1emhk1ynrMv79E/knJ0Fz2/vOazCOhmDRQupc2hRGAwHXFHmiWl+9R5GhOJ7 WQNSCMYIw+eUUOSk8740TY1S54QCk/7OICHIjYiyx3DIqdXFTJOSH5yIQZveJCJkrZMj AQ== Received: from eiaappxp0007.gid.prd.globalcore.com ([170.48.0.130]) by mx0a-000e5c14.pphosted.com (PPS) with ESMTPS id 3r6u1hcbr0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Jun 2023 08:08:08 -0500 Received: from cvlappxp20760.internal.cigna.com (HELO PS2PW1012187.accounts.root.corp) ([10.36.52.93]) by EIAAPPXP0007.gid.prd.globalcore.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2023 13:08:07 +0000 Received: from PS2PW1012186.accounts.root.corp (10.221.225.154) by PS2PW1012187.accounts.root.corp (10.221.225.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 15 Jun 2023 09:08:06 -0400 Received: from PS2PW1012186.accounts.root.corp ([fe80::9fec:fffb:1381:33ad]) by PS2PW1012186.accounts.root.corp ([fe80::9fec:fffb:1381:33ad%6]) with mapi id 15.02.1118.026; Thu, 15 Jun 2023 09:08:06 -0400 From: "Wetmore, Matthew (CTR)" To: Tom Lane , M Sarwar CC: Scott Ribe , "pgsql-admin@lists.postgresql.org" Thread-Topic: [EXTERNAL] Re: The same result for with SPACE and without SPACE Thread-Index: AQHZnxAAAKvo3iICYEWBd5YESodjGq+LKNCAgACtxPA= Date: Thu, 15 Jun 2023 13:08:06 +0000 Message-ID: <0055148e2cc742cbbc23485ae0c6c04e@express-scripts.com> References: <2018059.1686782739@sss.pgh.pa.us> In-Reply-To: <2018059.1686782739@sss.pgh.pa.us> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.221.252.1] x-proofpoint-routing: 000e5c14 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected Subject: The same result for with SPACE and without SPACE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-15_08,2023-06-14_02,2023-05-22_02 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I can reproduce this with a INT -----Original Message----- From: Tom Lane =20 Sent: Wednesday, June 14, 2023 3:46 PM To: M Sarwar Cc: Scott Ribe ; pgsql-admin@lists.postgresql.= org Subject: [EXTERNAL] Re: The same result for with SPACE and without SPACE M Sarwar writes: > I expect this to behave the same way whether it comes from CHAR or VARCHA= R. You expect incorrectly. CHAR comparison is insensitive to trailing spaces: https://urldefense.com/v3/__https://www.postgresql.org/docs/current/datatyp= e-character.html__;!!GFE8dS6aclb0h1nkhPf9!5ahVPSTPuRxIvywc-UhqjYfqPmkGYEBT5= b4GYndHqVaD0G98F0LrX6G6GgTNaJsMVaewVB5e1wox__K0nNGLZsEilYBU$=20 regards, tom lane