Thread: [NOVICE] Fwd: tsearch2 in Postgres 9.5

[NOVICE] Fwd: tsearch2 in Postgres 9.5

From
Anrik Drenth
Date:
Hi,

I'm trying to migrate a Postgres database from 8.3 to 9.5.  The database uses tsearch functionality.

The extensions tsearch2--1.0.sql and tsearch2--unpackaged--1.0.sql, found in /usr/share/postgresql/9.5/extension, have been loaded.  This took care of most of the error messages when loading the database.

However 3 error messages persist:
ERROR: function gin_extract_tsquery(pg_catalog.tsquery, internal, smallint) does not exist
ERROR: function gtsquery_consistent(bigint, internal, integer) does not exist
ERROR: function gtsvector_consistent(pg_catalog.gtsvector, internal, integer) does not exist

I'm struggling to find an answer how to resolve the error messages. Any assistance greatly appreciated. 

Thanks

Re: [NOVICE] Fwd: tsearch2 in Postgres 9.5

From
Tom Lane
Date:
Anrik Drenth <drentha@gmail.com> writes:
> I'm trying to migrate a Postgres database from 8.3 to 9.5.  The database
> uses tsearch functionality.

> The extensions tsearch2--1.0.sql and tsearch2--unpackaged--1.0.sql, found
> in /usr/share/postgresql/9.5/extension, have been loaded.

I think possibly you don't understand how to use those scripts.

The right thing to do is (1) dump your 8.3 database and load into an
empty 9.5 database, then (2) in that new database, execute

CREATE EXTENSION tsearch2 FROM unpackaged;

to convert 8.3's loose clutter of tsearch2 objects into a proper
extension.  Trying to load the extension first is just going to
make a mess.  Trying to execute both of those scripts is also
going to be a mess --- you only want to use one or the other,
depending on what you're doing.
        regards, tom lane


-- 
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice