logo       

Re: [despammed] How to search for a subString: msg#00010

Subject: Re: [despammed] How to search for a subString
On Sun, Feb 06, 2005 at 11:45:20 +0100,
  Kretschmer Andreas <andreas_kretschmer@xxxxxxxxxxxxx> 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.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe