From: spatarel1@yahoo.com
To: pgsql-bugs@postgresql.org
Subject: BUG #6743: BETWEEN operator does not work for char(1)
Date: Wed, 18 Jul 2012 12:39:30 +0000
Message-ID: <E1SrTXO-0003XB-HO@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 6743
Logged by: Spătărel 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: spatarel1@yahoo.com
Subject: Re: BUG #6743: BETWEEN operator does not work for char(1)
In-Reply-To: <E1SrTXO-0003XB-HO@wrigleys.postgresql.org>
References: <E1SrTXO-0003XB-HO@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox