Skip site navigation (1) Skip section navigation (2)

Re: How to write UDF in C that resemble the LIKE function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: b t <qtboyzz(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: How to write UDF in C that resemble the LIKE function
Date: 2005-02-13 04:07:32
Message-ID: 25708.1108267652@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
b t <qtboyzz(at)yahoo(dot)com> writes:
> 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.

Didn't your professor notice that there are two or three of those
already in contrib/fuzzystrmatch?

			regards, tom lane

In response to

pgsql-interfaces by date

Next:From: Michael FuhrDate: 2005-02-13 04:07:55
Subject: Re: How to write UDF in C that resemble the LIKE function
Previous:From: Joe ConwayDate: 2005-02-13 04:02:59
Subject: Re: How to use UDF in C

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group