bug ? - Mailing list pgsql-general

From Mathieu Arnold
Subject bug ?
Date
Msg-id 3A09D4D9.1D11FDFB@club-internet.fr
Whole thread Raw
List pgsql-general
Hi

i've using the soundex module in the contrib for some time and
yesterday, i wanted to give a try to the soundex.sql that is with the
module. (it creates some functions and an operator).

so, what i did was :

test=# CREATE FUNCTION text_soundex(text) RETURNS text
test-#    AS '/opt/pg/lib/modules/soundex.so' LANGUAGE 'c';
CREATE
test=# CREATE FUNCTION text_sx_eq(text, text) RETURNS bool AS
test-# 'select text_soundex($1) = text_soundex($2)'
test-# LANGUAGE 'sql'\g
CREATE
test=# CREATE FUNCTION text_sx_lt(text,text) RETURNS bool AS
test-# 'select text_soundex($1) < text_soundex($2)'
test-# LANGUAGE 'sql'\g
CREATE
test=# CREATE FUNCTION text_sx_gt(text,text) RETURNS bool AS
test-# 'select text_soundex($1) > text_soundex($2)'
test-# LANGUAGE 'sql';
CREATE
test=# CREATE FUNCTION text_sx_le(text,text) RETURNS bool AS
test-# 'select text_soundex($1) <= text_soundex($2)'
test-# LANGUAGE 'sql';
CREATE
test=# CREATE FUNCTION text_sx_ge(text,text) RETURNS bool AS
test-# 'select text_soundex($1) >= text_soundex($2)'
test-# LANGUAGE 'sql';
CREATE
test=# CREATE FUNCTION text_sx_ne(text,text) RETURNS bool AS
test-# 'select text_soundex($1) <> text_soundex($2)'
test-# LANGUAGE 'sql';
CREATE
test=# CREATE OPERATOR #= (leftarg=text, rightarg=text,
procedure=text_sx_eq,
test(# commutator=text_sx_eq)\g
CREATE
test=# select 'joan'::text #= 'john'::text;
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!#

and, hum, is that the expected result ? :)

psql (PostgreSQL) 7.0.3 on an intel


--
Mathieu Arnold

pgsql-general by date:

Previous
From: "Mikheev, Vadim"
Date:
Subject: RE: Really SLOW using GROUP BY ...!?
Next
From: Peter Eisentraut
Date:
Subject: Re: Built-in Postgres Types as shown in Chap. 4 Programmer's Guide