like vs = - Mailing list pgsql-admin

From Stefan Holzheu
Subject like vs =
Date
Msg-id 43BD30D4.1030202@bayceer.uni-bayreuth.de
Whole thread Raw
Responses Re: like vs =
List 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
-----------------------------

pgsql-admin by date:

Previous
From: Szabolcs BALLA
Date:
Subject: Vacuum is needed or not?
Next
From: Colton A Smith
Date:
Subject: strange system columns