Postgresql 8.2, tsearch2

From: "Dai, Tino" <tdai(at)loc(dot)gov>
To: "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>
Subject: Postgresql 8.2, tsearch2
Date: 2011-06-13 14:05:15
Message-ID: E6C3CD6A1CC50449BC09314AE9E8B8B1866DCD@LCXCLMB03.LCDS.LOC.GOV
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi All,

I am having a problem with getting tsearch2 installed and working. And before I start, I know that postgresql 8.2 will be end of lifed at the end of this year. We can't move to a newer version for support reasons :( . This postgresql instance will be a backup of the main instance, and will receive the dump files nightly. So, I tried to restore the database to the backup instance, and got a bunch of errors among them was "to_tsvector not being found". I realized that I didn't install tsearch2, so I went ahead a compiled it from the contrib/tsearch2 directory and install it. I then went ahead and did a:

postgres name_of_db -U postgres -f tsearch2.sql (in the contrib/tsearch2 directory)

What I got was a bunch of:

psql:tsearch2.sql:20: ERROR: current transaction is aborted, commands ignored until end of transaction block

starting at the lexize function and ending at the CREATE OPERATOR CLASS gin_tsvector_ops in the tsearch2.sql

I then did:

name_of_db=# \df to_tsvector
List of functions
Schema | Name | Result data type | Argument data types
--------+-------------+------------------+---------------------
public | to_tsvector | tsvector | oid, text
public | to_tsvector | tsvector | text
public | to_tsvector | tsvector | text, text

But when I tried:
name_of_db=# select to_tsevector('this is one');
ERROR: function to_tsevector("unknown") does not exist
LINE 1: select to_tsevector('this is one');
^
HINT: No function matches the given name and argument types. You may need to add explicit type casts.

I'm kinda clueless on where to go next to get this database up and running. Some help please?

-Thanks,
Tino

Browse pgsql-admin by date

  From Date Subject
Next Message Dinesh Bhandary 2011-06-13 16:29:06 changing work_mem
Previous Message Ibrahim Harrani 2011-06-13 07:56:27 pg_dump and drop table if exists statement