[SQL] Tsearch2 question: getting histogram of the vector elements

2004-03-10 Thread Rajesh Kumar Mallah
Greetings! My original problem is to de duplicate a list of around 0.3 million company names. Since a company name can be potentially (mis)spelt in numerous ways exactmatch obviously wont work. To make the searches faster i am using tsearch. For each company name i want to search other compa

Re: [SQL] tsearch2 question

2003-09-26 Thread Wei Weng
When I ran psql testdb < untsearch2.sql I got the following error message: psql:untsearch2.sql:15: ERROR: RemoveAggregate: aggregate stat(tsvector) does not exist I didn't really do anything before this. Only dropped the trigger and gist index I created (in order to use tsearch2), and alter t

Re: [SQL] tsearch2 question

2003-09-26 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > When I run psql < tsearch2.sql, is psql going to substitute $libdir > internally with what $libdir really is (in my case, it would be > /usr/lib/pgsql)? Not psql, the backend. The point of this is that your CREATE FUNCTION definition can be platform-indep

Re: [SQL] tsearch2 question

2003-09-26 Thread Wei Weng
When I run psql < tsearch2.sql, is psql going to substitute $libdir internally with what $libdir really is (in my case, it would be /usr/lib/pgsql)? Thanks Wei On Fri, 26 Sep 2003, Tom Lane wrote: > Wei Weng <[EMAIL PROTECTED]> writes: > > But then when I do a psql < tsearch2.sql, it compla

Re: [SQL] tsearch2 question

2003-09-26 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > But then when I do a psql < tsearch2.sql, it complains: > bash-2.05a$ psql testdb < tsearch2.sql > ERROR: stat failed on file '$libdir/tsearch2': No such file or directory > Where did I do wrong?? Did you do "make install" after building tsearch2? If you d

Re: [SQL] tsearch2 question

2003-09-26 Thread Wei Weng
But then when I do a psql < tsearch2.sql, it complains: bash-2.05a$ psql testdb < tsearch2.sql SET BEGIN NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pg_ts_dict_pkey' for table 'pg_ts_dict' CREATE TABLE ERROR: stat failed on file '$libdir/tsearch2': No such file or directory

Re: [SQL] tsearch2 question

2003-09-25 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > In my tsearch2.sql there are statements like : > --dict interface > CREATE FUNCTION lexize(oid, text) > returns _text > as '$libdir/tsearch2' > language 'C' > with (isstrict); > I don't think $libdir is the real value that we want. Y

[SQL] tsearch2 question

2003-09-25 Thread Wei Weng
In my tsearch2.sql there are statements like : --dict interface CREATE FUNCTION lexize(oid, text) returns _text as '$libdir/tsearch2' language 'C' with (isstrict); I don't think $libdir is the real value that we want. Do I need to set some special parameters wit