Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V57O2-0008WQ-L5 for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Aug 2013 04:54:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V57O2-0001Wy-4L for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Aug 2013 04:54:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V52bv-0007iQ-5O for pgsql-bugs@postgresql.org; Thu, 01 Aug 2013 23:48:47 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V52br-0002gD-Nm for pgsql-bugs@postgresql.org; Thu, 01 Aug 2013 23:48:46 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V52bq-0000hO-MC for pgsql-bugs@postgresql.org; Thu, 01 Aug 2013 23:48:43 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1V52bl-0000K8-6j for pgsql-bugs@postgresql.org; Thu, 01 Aug 2013 23:48:37 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8352: Using UPPER in ON clause of JOIN To: pgsql-bugs@postgresql.org From: dyuen@rbauction.com Message-Id: Date: Thu, 01 Aug 2013 23:48:37 +0000 X-Pg-Spam-Score: -3.4 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 8352 Logged by: Daisy Email address: dyuen@rbauction.com PostgreSQL version: 9.2.4 Operating system: Windows 7 Description: When joining two tables on a varchar column wrapped in a upper statement, the join does not work if there is a trailing space in both of the varchar values. In the two examples below, VALUE1 and VALUE2 = "ABC " -- Doesn't work SELECT * FROM TABLE1 INNER JOIN TABLE2 ON UPPER(VALUE1) = UPPER(VALUE2) -- Works SELECT * FROM TABLE1 INNER JOIN TABLE2 ON UPPER(TRIM(VALUE1)) = UPPER(TRIM(VALUE2)) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs