BUG #1590: Comparison Operation with Strings

From: "Michaela" <rambo1503-postgresql(at)yahoo(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1590: Comparison Operation with Strings
Date: 2005-04-07 15:04:35
Message-ID: 20050407150435.3FE14F0D1A@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1590
Logged by: Michaela
Email address: rambo1503-postgresql(at)yahoo(dot)de
PostgreSQL version: 8.0.1
Operating system: SuSE Linux 9.1
Description: Comparison Operation with Strings
Details:

Hello!

conditions:
-----------
Our database is defined with SQL_ASCII. We also tested Latin1.

CREATE TABLE test(feld varchar(100))
INSERT INTO test VALUES ('ABC');
INSERT INTO test VALUES ('?');
INSERT INTO test VALUES ('100');
INSERT INTO test VALUES ('B');
INSERT INTO test VALUES ('? ABC');
INSERT INTO test VALUES ('Z');

We want to use e.g. the following conditions:

1.example
---------
select * from test where field>='?' and field<'A'

result:
?
100

But it doesn`t find the '? ABC'. And '100' is wrong.

This command should give me this output:
?
? ABC

2.example
---------
select * from test where feld>='?' and feld<'@'

result:
?

It doesn`t find the '? ABC'.

This command should give me this output:
?
? ABC

3.example
---------
select * from test where feld>='A' and feld<'C'

result:
ABC
B
? ABC

the correct result would be:
ABC
B

We tested it with PostgreSQL version 7.2.1. There it works.

Kind Regards
Michaela

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Fetter 2005-04-07 16:10:10 Re: float conversion / presentation problem ?
Previous Message Ezequiel Tolnay 2005-04-07 09:20:25 Unexpected behaviour of numeric datatype when mixed with,float4, domains and plpgsql variables