From: Bruno Wolff III <bruno@wolff.to>
To: Kretschmer Andreas <andreas_kretschmer@despammed.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [despammed] How to search for a subString
Date: Sun, 6 Feb 2005 07:32:20 -0600
Message-ID: <20050206133220.GB952@wolff.to> (raw)
In-Reply-To: <20050206104520.GA3405@kaufbach.delug.de>
References: <20050206101246.28648.qmail@web61003.mail.yahoo.com>
<20050206104520.GA3405@kaufbach.delug.de>
On Sun, Feb 06, 2005 at 11:45:20 +0100,
Kretschmer Andreas <andreas_kretschmer@despammed.com> wrote:
> am Sun, dem 06.02.2005, um 2:12:46 -0800 mailte b t folgendes:
> > Hi, I'm building a database for a school project and I want to search for the
> > name of the movie, fro example in the database there is a table called movie
> > and has a movie call "The fast and the furious" so if the type in "the fast"
> > then it should return that movie. I tried using like and ilike and it still
>
> select .. ~ '*the fast*' ...
That should be:
select .. ~ '.*the fast.*' ...
As REs are unanchored, you can simplify this to:
select .. ~ 'the fast' ...
However, ilike should have worked if it was used properly.
Also note that these searches are going to be slow, since they won't
be able to use an index. If you have so many movies that the speed of
the search is unacceptably slow, then you might want to look at the
tsearch2 contrib module.
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-interfaces@postgresql.org
Cc: bruno@wolff.to, andreas_kretschmer@despammed.com
Subject: Re: [despammed] How to search for a subString
In-Reply-To: <20050206133220.GB952@wolff.to>
* 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