From: Craig Ringer <craig@2ndQuadrant.com>
To: pantelis vlachos <vlachos83@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: find sudstring on text (data type) field failure
Date: Sun, 11 Nov 2012 18:24:23 +0800
Message-ID: <509F7CD7.1080009@2ndQuadrant.com> (raw)
In-Reply-To: <CAAYHi_cTqLi9iP_x6_5pV+Jd+wYD2Ak08bF--0oJGk0yqUSUaA@mail.gmail.com>
References: <CAAYHi_cTqLi9iP_x6_5pV+Jd+wYD2Ak08bF--0oJGk0yqUSUaA@mail.gmail.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: craig@2ndQuadrant.com, vlachos83@gmail.com
Subject: Re: find sudstring on text (data type) field failure
In-Reply-To: <509F7CD7.1080009@2ndQuadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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