Odd query behavior - Mailing list pgsql-sql

From Dan McFadyen
Subject Odd query behavior
Date
Msg-id BA48DC793F18724D862C27C8F2C131CC62060B@exchange03.cryptocard.internal
Whole thread Raw
List pgsql-sql
<div class="Section1"><p class="MsoNormal">Hello,<p class="MsoNormal"> <p class="MsoNormal">I've come across an odd
situation.I've had access to a database where a the following happens:<p class="MsoNormal"> <p class="MsoNormal">"
SELECT* FROM table WHERE name LIKE 'abc%' "    returns 2 rows...<p class="MsoNormal"> <p class="MsoNormal">but...<p
class="MsoNormal"> <pclass="MsoNormal">" SELECT * FROM table WHERE name IN (SELECT name FROM table WHERE name LIKE
'abc%')"  returns 0 rows...<p class="MsoNormal"> <p class="MsoNormal">I've also tried doing a join on the column to
anothertable that has what appears to be the same data, and the join comes out with zero rows. Weirder yet, I took the
hashof both of the values and it came out identical.<p class="MsoNormal"> <p class="MsoNormal">Now, I know the first
thingyou'll ask is if you can get a copy of the data to re-produce it, and the problem is, I got a  copy of the data in
question,and loaded into another server and it works fine. Both queries return 2 rows.<p class="MsoNormal"> <p
class="MsoNormal">Ido know that server it was running on was not an english server, but don't know the exact language.
Thedatabase uses a UTF8 encoding though, so I don't know what that would make any difference.<p class="MsoNormal"> <p
class="MsoNormal">Anyideas about things I should be looking at?<p class="MsoNormal"> <p class="MsoNormal">Thanks<p
class="MsoNormal"> <pclass="MsoNormal">Dan</div> The information transmitted is intended only for the person or entity
towhich it is addressed and may contain confidential and/or privileged material. Statements and opinions expressed in
thise-mail may not represent those of the company. Any review, retransmission, dissemination or other use of, or taking
ofany action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.
Ifyou received this in error, please contact the sender immediately and delete the material from any computer. Please
seeour legal details at http://www.cryptocard.com CRYPTOCard Inc. is registered in the province of Ontario, Canada with
Businessnumber 80531 6478. CRYPTOCard Europe is limited liability company registered in England and Wales (with
registerednumber 05728808 and VAT number 869 3979 41); its registered office is Aztec Centre, Aztec West, Almondsbury,
Bristol,UK, BS32 4TD  

pgsql-sql by date:

Previous
From: dennis
Date:
Subject: Re: Help : insert a bytea data into new table
Next
From: dennis
Date:
Subject: Re: Help : insert a bytea data into new table