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 E12228B9B33 for ; Sun, 13 Feb 2005 03:40:22 +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 67659-06 for ; Sun, 13 Feb 2005 03:40:21 +0000 (GMT) Received: from web61004.mail.yahoo.com (web61004.mail.yahoo.com [216.155.196.93]) by svr1.postgresql.org (Postfix) with SMTP id A46C38BA019 for ; Sun, 13 Feb 2005 03:40:16 +0000 (GMT) Received: (qmail 95693 invoked by uid 60001); 13 Feb 2005 03:40: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=Juce2VrkR5JadJZWVva2PZreqnpcapzId2EAg4mCK8ke4YeX7lPqqdI7ET30OngoWKOcKNkYQ5RXI/xcLDe8JSeTUvcfd8EYYHEIx511XrBYVF2wcE0Gm2arFVqewfzPRVOAgk714i8BGTOZdG1/rg3gOKYwJMGiqGaBBDMdP94= ; Message-ID: <20050213034017.95691.qmail@web61004.mail.yahoo.com> Received: from [68.120.230.43] by web61004.mail.yahoo.com via HTTP; Sat, 12 Feb 2005 19:40:17 PST Date: Sat, 12 Feb 2005 19:40:17 -0800 (PST) From: b t Subject: How to write UDF in C that resemble the LIKE function To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1627592157-1108266017=:93015" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.895 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, HTML_20_30, HTML_MESSAGE, RCVD_IN_NJABL_PROXY X-Spam-Level: * X-Archive-Number: 200502/50 X-Sequence-Number: 5295 --0-1627592157-1108266017=:93015 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-1627592157-1108266017=:93015 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-1627592157-1108266017=:93015--