From qtboyzz@yahoo.com Sun Feb 13 03:39:21 2005 X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0980F8B9B3B for ; Sun, 13 Feb 2005 03:39:21 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67334-04 for ; Sun, 13 Feb 2005 03:39:18 +0000 (GMT) Received: from web61004.mail.yahoo.com (web61004.mail.yahoo.com [216.155.196.93]) by svr1.postgresql.org (Postfix) with SMTP id 486758BA009 for ; Sun, 13 Feb 2005 03:39:17 +0000 (GMT) Received: (qmail 95493 invoked by uid 60001); 13 Feb 2005 03:39:17 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=Ik73cFdduWEeD1MNQyV5uKuIoquqHf7Rhuz+z1N+DyKwJTjNGoP2WfXL4jvFI4T9rs6ZFpUe+Wpcbyt4FLwZu7WngzLue1hcoWBULgFe3HuUsZS9y0Yluvm+mB95s+QAwSpy8LFBHeFUwgB6lnhZgbklOfa6j/wTB4PTY6AEbFM= ; Message-ID: <20050213033917.95491.qmail@web61004.mail.yahoo.com> Received: from [68.120.230.43] by web61004.mail.yahoo.com via HTTP; Sat, 12 Feb 2005 19:39:17 PST Date: Sat, 12 Feb 2005 19:39:17 -0800 (PST) From: b t Subject: How to use UDF in C To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1135428332-1108265957=:92463" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.905 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_20_30, HTML_MESSAGE, RCVD_IN_NJABL_PROXY X-Spam-Level: * X-Archive-Number: 200502/49 X-Sequence-Number: 5294 --0-1135428332-1108265957=:92463 Content-Type: text/plain; charset=us-ascii First of all thanks to those who take time to reply to my message. I have a question, as part of the project that I have to do for school, we have to implement a User Define Function in C that is similar like the LIKE funtion in PostgreSQL. For example where a customer is searching for an actor whose last name sounds like "Schwarseneger" (notice the typo). However, the customer is not sure neither about the spelling nor the pronunciation. The real star name should be "Schwarzenegger". In this case, the "LIKE" operator in SQL is not capable enough. It would be nice if the search would match last names "similar to" "Schwarseneger". Can Some one please give me some pointer on this or even sample code that you might have implemented. So basically the thing that I'm doing is like a spell check system where it return the closest match to the word. Thanks in advance -Brian Trinh --------------------------------- Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' --0-1135428332-1108265957=:92463 Content-Type: text/html; charset=us-ascii
First of all thanks to those who take time to reply to my message.
 
I have a question, as part of the project that I have to do for school, we have to implement a User Define Function in C that is similar like the LIKE funtion in PostgreSQL. For example where a customer is searching for an actor whose last name sounds like "Schwarseneger" (notice the typo). However, the customer is not sure neither about the spelling nor the pronunciation. The real star name should be "Schwarzenegger". In this case, the "LIKE" operator in SQL is not capable enough. It would be nice if the search would match last names "similar to" "Schwarseneger". Can Some one please give me some pointer on this or even sample code that you might have implemented. So basically the thing that I'm doing is like a spell check system where it return the closest match to the word.
 
Thanks in advance
-Brian Trinh 


Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term' --0-1135428332-1108265957=:92463-- From mail@joeconway.com Sun Feb 13 04:03:10 2005 X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 88DE48B9B2B for ; Sun, 13 Feb 2005 04:03:10 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 70507-02 for ; Sun, 13 Feb 2005 04:03:01 +0000 (GMT) Received: from joeconway.com (wsip-24-249-201-67.sd.sd.cox.net [24.249.201.67]) by svr1.postgresql.org (Postfix) with ESMTP id A23C38B9CA2 for ; Sun, 13 Feb 2005 04:03:00 +0000 (GMT) Received: from [192.168.4.1] (account jconway [192.168.4.1] verified) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 2571787; Sat, 12 Feb 2005 21:03:48 -0800 Message-ID: <420ED173.6010005@joeconway.com> Date: Sat, 12 Feb 2005 20:02:59 -0800 From: Joe Conway User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: b t Cc: pgsql-interfaces@postgresql.org Subject: Re: How to use UDF in C References: <20050213033917.95491.qmail@web61004.mail.yahoo.com> In-Reply-To: <20050213033917.95491.qmail@web61004.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/51 X-Sequence-Number: 5296 b t wrote: > should be "Schwarzenegger". In this case, the "LIKE" operator in SQL > is not capable enough. It would be nice if the search would match > last names "similar to" "Schwarseneger". Can Some one please give me > some pointer on this or even sample code that you might have > implemented. So basically the thing that I'm doing is like a spell > check system where it return the closest match to the word. See contrib/fuzzystrmatch HTH, Joe