Re: Fwd: tsearch2 in Postgres 9.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Anrik Drenth <drentha(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Fwd: tsearch2 in Postgres 9.5
Date: 2017-09-13 00:02:42
Message-ID: 31828.1505260962@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Anrik Drenth <drentha(at)gmail(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Browder 2017-09-17 10:25:11 Users: must all Pg users be system users?
Previous Message Anrik Drenth 2017-09-12 22:05:23 Fwd: tsearch2 in Postgres 9.5