pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedlike vs =
3+ messages / 2 participants
[nested] [flat]
* like vs =
@ 2006-01-05 14:44 Stefan Holzheu <stefan.holzheu@bayceer.uni-bayreuth.de>
2006-01-12 05:02 ` Re: like vs = Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Holzheu @ 2006-01-05 14:44 UTC (permalink / raw)
To: pgsql-admin
Hallo,
I just encountered a stange behaviour:
The following query gives zero rows.
bitoek=> SELECT name from file where name =
'mitarbeiter/mit/mitarbeiter_ehemalig.php';
name
------
(0 Zeilen)
Replacing "=" by like and escaping the underscore gives the row I knew
to be there:
bitoek=> SELECT name from file where name like
'mitarbeiter/mit/mitarbeiter\_ehemalig.php';
name
------------------------------------------
mitarbeiter/mit/mitarbeiter_ehemalig.php
(1 Zeile)
Other queries with the equal operator do match rows. Am I missing something?
Postgresql: 8.1.1
Fieldtype: text
Database encoding: Latin9
Regards,
Stefan
--
-----------------------------
Dr. Stefan Holzheu
Tel.: 0921/55-5720
Fax.: 0921/55-5709
BayCEER
EDV und Datenbanken
Universitaet Bayreuth
D-95440 Bayreuth
-----------------------------
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: like vs =
2006-01-05 14:44 like vs = Stefan Holzheu <stefan.holzheu@bayceer.uni-bayreuth.de>
@ 2006-01-12 05:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-01-18 08:00 ` Re: like vs = Stefan Holzheu <stefan.holzheu@bayceer.uni-bayreuth.de>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2006-01-12 05:02 UTC (permalink / raw)
To: Stefan Holzheu <stefan.holzheu@bayceer.uni-bayreuth.de>; +Cc: pgsql-admin
Stefan Holzheu <stefan.holzheu@bayceer.uni-bayreuth.de> writes:
> Other queries with the equal operator do match rows. Am I missing something?
> Postgresql: 8.1.1
> Fieldtype: text
> Database encoding: Latin9
What LC_COLLATE locale are you using? Your report looks a whole lot
like the recently identified problem with locales that think that some
not-bitwise-identical strings are "equal", as in this thread:
http://archives.postgresql.org/pgsql-general/2005-12/msg00740.php
If the same queries return sane results after doing set enable_indexscan
= off, then that's probably what the problem is. If so, updating to
8.1.2 and REINDEXing should fix it.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: like vs =
2006-01-05 14:44 like vs = Stefan Holzheu <stefan.holzheu@bayceer.uni-bayreuth.de>
2006-01-12 05:02 ` Re: like vs = Tom Lane <tgl@sss.pgh.pa.us>
@ 2006-01-18 08:00 ` Stefan Holzheu <stefan.holzheu@bayceer.uni-bayreuth.de>
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Holzheu @ 2006-01-18 08:00 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
Tom Lane schrieb:
> Stefan Holzheu <stefan.holzheu@bayceer.uni-bayreuth.de> writes:
>>Other queries with the equal operator do match rows. Am I missing something?
>
>>Postgresql: 8.1.1
>>Fieldtype: text
>>Database encoding: Latin9
>
> What LC_COLLATE locale are you using? Your report looks a whole lot
> like the recently identified problem with locales that think that some
> not-bitwise-identical strings are "equal", as in this thread:
> http://archives.postgresql.org/pgsql-general/2005-12/msg00740.php
LC_COLLATE was POSIX
>
> If the same queries return sane results after doing set enable_indexscan
> = off, then that's probably what the problem is. If so, updating to
> 8.1.2 and REINDEXing should fix it.
>
You were right. Query works now. Thanks
Stefan
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
>
--
-----------------------------
Dr. Stefan Holzheu
Tel.: 0921/55-5720
Fax.: 0921/55-5709
BayCEER
EDV und Datenbanken
Universitaet Bayreuth
D-95440 Bayreuth
-----------------------------
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-01-18 08:00 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-05 14:44 like vs = Stefan Holzheu <stefan.holzheu@bayceer.uni-bayreuth.de>
2006-01-12 05:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-01-18 08:00 ` Stefan Holzheu <stefan.holzheu@bayceer.uni-bayreuth.de>
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