X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 81534D1CC81 for ; Fri, 21 Nov 2003 14:34:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 91831-01 for ; Fri, 21 Nov 2003 10:33:37 -0400 (AST) Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2]) by svr1.postgresql.org (Postfix) with ESMTP id C3F7FD1D815 for ; Fri, 21 Nov 2003 10:33:25 -0400 (AST) Received: from ra (ra [158.250.29.2]) by ra.sai.msu.su (8.12.10/8.12.10) with ESMTP id hALEWbeF023670; Fri, 21 Nov 2003 17:32:38 +0300 (MSK) Date: Fri, 21 Nov 2003 17:32:37 +0300 (MSK) From: Oleg Bartunov X-X-Sender: megera@ra.sai.msu.su To: Christoph Haller Cc: Gulshan Babajee , pgsql-sql@postgresql.org Subject: Re: Compare strings which resembles each other In-Reply-To: <200311211422.PAA13790@rodos> Message-ID: References: <200311211422.PAA13790@rodos> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/259 X-Sequence-Number: 16074 On Fri, 21 Nov 2003, Christoph Haller wrote: > > > > Hy, I have a table containing some rows. Each row contains a field name > > which is of type String. > > > > For example: > > in row1 string1 is "Adieu Poulet", > > in row2 string2 is "Adieu a Poulet", > > in row3 string3 is "Adiue Poulet", > > in row4 string4 is "Adieu Pouleet", etc.. > > (That is each string resembles each other a bit, they are somewhat similar > > to each other) > > > > What type of query should I make so as it return me all these string. That > > is I watn a query which return me strings which are similar or somewhat > > similar to each other. > > > > thanks in advance > > gulshan > > > $PGSQLD/contrib/tsearch/README.tsearch > is your friend. I think tsearch(2) isn't what Gulshan need. He needs fuzzy search, there are several modules in contrib directory (metaphone, fuzzystrmatch). Also, we have trgm module which uses trigram and has index support. > > Regards, Christoph > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83