Bacula-users

Re: [Bacula-users] Filename searching and case insensitivity

2011-04-06 03:14:48
Subject: Re: [Bacula-users] Filename searching and case insensitivity
From: Rory Campbell-Lange <rory AT campbell-lange DOT net>
To: Dan Langille <dan AT langille DOT org>
Date: Wed, 6 Apr 2011 08:10:03 +0100



On 6 Apr 2011, at 02:37, Dan Langille <dan AT langille DOT org> wrote:


On Apr 5, 2011, at 9:31 PM, Kernel Panic wrote:

USE bacula;
SELECT * FROM Filename WHERE name LIKE '%ZFS%';
SELECT * FROM Filename WHERE name LIKE '%zfs%';

Although the commands worked, they only returned case-sensitive
matches, despite MySQL's documentation stating that pattern matching
is case-insensitive by default:
http://dev.mysql.com/doc/refman/5.5/en/pattern-matching.html

Can anyone help me?

Have you tried ilike instead of like?  It is available on PostgreSQL.  I don't know about MySQL.

Consider also:

SELECT * FROM Filename where lower(name) LIKE %zfs%;
-------------------------------------------------

In Postgres a case insensitive regex match can be done like this:

name ~* 'zfs'
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users