Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 877491AB353A for ; Wed, 18 Jul 2012 09:39:45 -0300 (ADT) Received: from mahout.postgresql.org ([98.129.198.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SrTXb-00051Z-Pp for pgsql-bugs@postgresql.org; Wed, 18 Jul 2012 12:39:44 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SrTXO-00020G-Oe for pgsql-bugs@postgresql.org; Wed, 18 Jul 2012 12:39:30 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1SrTXO-0003XB-HO for pgsql-bugs@postgresql.org; Wed, 18 Jul 2012 12:39:30 +0000 Date: Wed, 18 Jul 2012 12:39:30 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6743: BETWEEN operator does not work for char(1) To: pgsql-bugs@postgresql.org From: spatarel1@yahoo.com X-Pg-Spam-Score: 0.6 (/) X-Archive-Number: 201207/154 X-Sequence-Number: 33630 The following bug has been logged on the website: Bug reference: 6743 Logged by: Sp=C4=83t=C4=83rel Dan Email address: spatarel1@yahoo.com PostgreSQL version: 9.1.4 Operating system: Windows Vista SP2 Description: = I use "UTF8" charset and "Romania, Romanian" locale. I came across this as I wanted to test if a symbol was a letter: SELECT 'a' BETWEEN 'a' AND 'z'; -- true SELECT 'z' BETWEEN 'a' AND 'z'; -- true SELECT 'A' BETWEEN 'a' AND 'z'; -- true SELECT 'Z' BETWEEN 'a' AND 'z'; -- false (!) SELECT 'a' BETWEEN 'A' AND 'Z'; -- false (!) SELECT 'z' BETWEEN 'A' AND 'Z'; -- true SELECT 'A' BETWEEN 'A' AND 'Z'; -- true SELECT 'Z' BETWEEN 'A' AND 'Z'; -- true It seems that the intent is for the comparison to be case-insensitive, but in some limit-cases it fails. Please let me know if this turns out to be a real bug on not.