tsearch2 question

Lists: pgsql-sql
From: Wei Weng <wweng(at)kencast(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: tsearch2 question
Date: 2003-09-25 20:14:34
Message-ID: Pine.LNX.4.56.0309251610280.19659@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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 with ./configure (in the root level of the source
tree) to replace $libdir with the real library path?

Thanks

Wei


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wei Weng <wweng(at)kencast(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: tsearch2 question
Date: 2003-09-26 00:34:46
Message-ID: 5912.1064536486@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Wei Weng <wweng(at)kencast(dot)com> 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.

Yes it is.

regards, tom lane


From: Wei Weng <wweng(at)kencast(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: tsearch2 question
Date: 2003-09-26 14:37:45
Message-ID: Pine.LNX.4.56.0309261035270.28433@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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
ERROR: current transaction is aborted, queries ignored until end of
transaction block
ERROR: current transaction is aborted, queries ignored until end of
transaction block
...
(and the ERROR message repeats many times)

Where did I do wrong??

Thanks

Wei

On Thu, 25 Sep 2003, Tom Lane wrote:

> Wei Weng <wweng(at)kencast(dot)com> 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.
>
> Yes it is.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wei Weng <wweng(at)kencast(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: tsearch2 question
Date: 2003-09-26 15:07:33
Message-ID: 15816.1064588853@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Wei Weng <wweng(at)kencast(dot)com> 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 did, maybe it installed tsearch2.so in the wrong place?
("pg_config --pkglibdir" will tell you what the backend thinks
"$libdir" means.)

regards, tom lane


From: Wei Weng <wweng(at)kencast(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: tsearch2 question
Date: 2003-09-26 15:12:39
Message-ID: Pine.LNX.4.56.0309261109320.30346@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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 <wweng(at)kencast(dot)com> 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 did, maybe it installed tsearch2.so in the wrong place?
> ("pg_config --pkglibdir" will tell you what the backend thinks
> "$libdir" means.)
>
> regards, tom lane
>


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wei Weng <wweng(at)kencast(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: tsearch2 question
Date: 2003-09-26 15:39:15
Message-ID: 16196.1064590755@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Wei Weng <wweng(at)kencast(dot)com> 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-independent ...

regards, tom lane


From: Wei Weng <wweng(at)kencast(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: tsearch2 question
Date: 2003-09-26 18:34:11
Message-ID: Pine.LNX.4.56.0309261431540.10646@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

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 table testtb drop
column idxtest tsvector.

Where did I do wrong?

Thanks

Wei