dbTalk Databases Forums  

[BUGS] BUG #2262: WHERE-clause comparisons wrong

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2262: WHERE-clause comparisons wrong in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Richard Baverstock
 
Posts: n/a

Default [BUGS] BUG #2262: WHERE-clause comparisons wrong - 02-15-2006 , 10:52 AM







The following bug has been logged online:

Bug reference: 2262
Logged by: Richard Baverstock
Email address: richard (AT) 3dtechnologies (DOT) ca
PostgreSQL version: 8.1
Operating system: Windows XP Pro
Description: WHERE-clause comparisons wrong
Details:

History: Imported data from an 8.0 to 8.1 server. The 8.0 server was set to
use whatever the default encoding was on win32; the 8.1 server is set to use
utf8. Import using a dump from the 8.0 server went fine.

Problem: When querying the database, any requirements for "WHERE" that
involve comparing strings with spaces or dashes/hyphens return false, when
they should be true.

For example; assuming a table called inventory has a column named "Number"
(varchar), and a row has the value 'ABC 123' for the number, the following
returns the correct row:

select "Number" from "inventory" where "Number" LIKE 'ABC%';

however, the following two queries return no rows:

select "Number" from "inventory" where "NUMBER" LIKE 'ABC %';
select "Number" from "inventory" where "Number" = 'ABC 123';


IF however, the Number being searched for was not imported from the 8.0
database, everything is fine. The space as returned by the successful query
is the correct hex value (0x20).

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.