pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
find sudstring on text (data type) field failure
3+ messages / 3 participants
[nested] [flat]

* find sudstring on text (data type) field failure
@ 2012-11-07 08:36  pantelis vlachos <vlachos83@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: pantelis vlachos @ 2012-11-07 08:36 UTC (permalink / raw)
  To: pgsql-sql

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)

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: find sudstring on text (data type) field failure
@ 2012-11-11 10:24  Craig Ringer <craig@2ndQuadrant.com>
  parent: pantelis vlachos <vlachos83@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Craig Ringer @ 2012-11-11 10:24 UTC (permalink / raw)
  To: pantelis vlachos <vlachos83@gmail.com>; +Cc: pgsql-sql

On 11/07/2012 04:36 PM, 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)

Nowhere near enough information. I'd say you have concurrency issues; at
the time you ran the query there weren't actually matching rows. See if
you can put together a test case that demonstrates the issue, or follow
up with a lot more detail.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: find sudstring on text (data type) field failure
@ 2012-11-12 07:52  Achilleas Mantzios <achill@smadev.internal.net>
  parent: pantelis vlachos <vlachos83@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Achilleas Mantzios @ 2012-11-12 07:52 UTC (permalink / raw)
  To: pgsql-sql

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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2012-11-12 07:52 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-11-07 08:36 find sudstring on text (data type) field failure pantelis vlachos <vlachos83@gmail.com>
2012-11-11 10:24 ` Craig Ringer <craig@2ndQuadrant.com>
2012-11-12 07:52 ` Achilleas Mantzios <achill@smadev.internal.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox