Обсуждение: text_soundex function

Поиск
Список
Период
Сортировка

text_soundex function

От
"Otandeka Simon Peter"
Дата:
Does this function(text_soundex) exist in the latest Postgresql versions or it was replaced?

Any example on how to use it?

Re: text_soundex function

От
Chris
Дата:
Otandeka Simon Peter wrote:
> Does this function(text_soundex) exist in the latest Postgresql versions
> or it was replaced?

It's called soundex:

http://www.postgresql.org/docs/8.3/interactive/fuzzystrmatch.html

--
Postgresql & php tutorials
http://www.designmagick.com/


Re: text_soundex function

От
"Otandeka Simon Peter"
Дата:
Hi Chris,

Tried it and I get

LINE 1: SELECT * FROM s WHERE soundex(nm) = soundex('john');
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

yet the data type of the nm is text.

I am using 8.3.1.

Anything am doing wrong?

On Thu, Dec 18, 2008 at 10:26 AM, Chris <dmagick@gmail.com> wrote:
Otandeka Simon Peter wrote:
Does this function(text_soundex) exist in the latest Postgresql versions or it was replaced?

It's called soundex:

http://www.postgresql.org/docs/8.3/interactive/fuzzystrmatch.html

--
Postgresql & php tutorials
http://www.designmagick.com/


Re: text_soundex function

От
Chris
Дата:
Otandeka Simon Peter wrote:
> Hi Chris,
>
> Tried it and I get
>
> LINE 1: SELECT * FROM s WHERE soundex(nm) = soundex('john');
> HINT:  No function matches the given name and argument types. You might
> need to add explicit type casts.

Ahh, it's a contrib module. It's not installed by default, it's like an
external package.

See http://www.postgresql.org/docs/8.3/interactive/contrib.html for how
to install it.

--
Postgresql & php tutorials
http://www.designmagick.com/


Re: text_soundex function

От
Chris
Дата:
Chris wrote:
> Otandeka Simon Peter wrote:
>> Hi Chris,
>>
>> Tried it and I get
>>
>> LINE 1: SELECT * FROM s WHERE soundex(nm) = soundex('john');
>> HINT:  No function matches the given name and argument types. You
>> might need to add explicit type casts.
>
> Ahh, it's a contrib module. It's not installed by default, it's like an
> external package.
>
> See http://www.postgresql.org/docs/8.3/interactive/contrib.html for how
> to install it.

Forgot to add, the package/script you want is 'fuzzystrmatch'.

--
Postgresql & php tutorials
http://www.designmagick.com/