Lexicographic index ? - Mailing list pgsql-general

From arnaud.mlist1@free.fr
Subject Lexicographic index ?
Date
Msg-id 1021541277.3ce37b9db49fd@imp.free.fr
Whole thread Raw
List pgsql-general
Hello, I've been searching since last week how I could implement what looks
basically like a dictionnary with postgres :

I have a big table (million of rows) which contains a varchar column with words
like this for example :

Table Twords:

words
-----------------
guitar
saxophon
flute

And what I want to built a query that tells me if a word given in argument can
be found at least partially in the database. Something like

select * from twords where words||'%' like 'saxophones';

works but uses a sequential scan on the table...

Is it possible to do what I want with postgres or not ? How ? :-)
Thanks for your help !

pgsql-general by date:

Previous
From: Serkan Bektaş
Date:
Subject: Is there eny e-mail server that uses postgreSQL as backend server for mailboxes&users
Next
From: "Marin Dimitrov"
Date:
Subject: Re: Lexicographic index ?