Skip site navigation (1) Skip section navigation (2)

Strange query behavior where clause produces odd behavior on '>' query

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: "[HACKERS]" <pgsql-hackers(at)postgresql(dot)org>
Cc: "Sherry Griffin" <sgriffin(at)connx(dot)com>
Subject: Strange query behavior where clause produces odd behavior on '>' query
Date: 2008-10-31 00:17:23
Message-ID: D425483C2C5C9F49B5B7A41F89441547010011EE@postal.corporate.connx.com (view raw or flat)
Thread:
Lists: pgsql-hackers
The following query:
SELECT * FROM Customers_connxstore where customerid > 'specd'

Returns the row containing Customers_connxstore.customerid == 'SPECD'

I would expect to get that row if the query was:
SELECT * FROM Customers_connxstore where customerid >= 'specd'

The other operators (<, <=, >, =, !=) all work as expected.

Sample file to reproduce the problem:
http://cap.connx.com/bugreport/pgbug.sql.bz2

Is this a known issue with PostgreSQL or for some reason the desired
behavior?


Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-10-31 00:30:33
Subject: Re: Strange query behavior where clause produces odd behavior on '>' query
Previous:From: Tom LaneDate: 2008-10-30 23:54:43
Subject: Re: PG_PAGE_LAYOUT_VERSION 5 - time for change

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group