[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-sql
Subject:    Re: [SQL] find sudstring on text (data type) field failure
From:       Achilleas Mantzios <achill () smadev ! internal ! net>
Date:       2012-11-12 7:52:26
Message-ID: 2124145.U7R12LdlNH () smadev ! internal ! net
[Download RAW message or body]

Gia sou Panteli,

are you suggesting that the results are incinsistent and unpredictable with every run?
pls present a case demontsrating the problem.

On Τετ 07 Νοε 2012 10:36:34 pantelis vlachos wrote:

I was trying to find a substring on a text (data type) column like 'cat foo dog ...'. 
I use the query below
SELECT id FROM table WHERE name LIKE '% foo %';
Sometimes the query return with nTuples=0 but there are matching rows.
On retry, the query return with expected results. Any ideas;

(postgres ver 9.2, libpq - C Library)




-
Achilleas Mantzios
IT DEPT
[Attachment #3 (unknown)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; \
font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">Gia sou Panteli,</p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">are you suggesting that the results are \
incinsistent and unpredictable with every run?</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">pls present a case demontsrating the problem.</p> \
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Τετ 07 Νοε 2012 \
10:36:34 pantelis vlachos wrote:<br /></p> <p style=" margin-top:12px; \
margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">I was trying to find a substring on a text (data \
type) column like 'cat foo dog ...'. <br />I use the query below<br />SELECT id FROM \
table WHERE name LIKE '% foo %';<br />Sometimes the query return with nTuples=0 but \
there are matching rows.<br />On retry, the query return with expected results. Any \
ideas;<br /><br />(postgres ver 9.2, libpq - C Library)<br /></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Achilleas Mantzios</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">IT DEPT</p></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic