Обсуждение: tsearch2 Upgrade to 8.3 tsearch2.so errors

Поиск
Список
Период
Сортировка

tsearch2 Upgrade to 8.3 tsearch2.so errors

От
"Darragh Gammell"
Дата:
Hi

I am currently upgrading from 8.1 to 8.3 and am getting errors when restoring the dump from 8.1 into 8.3. Like below:

ERROR:  could not find function "gtsvector_in" in file "/usr/lib/postgresql/8.3/lib/tsearch2.so"
ERROR:  function public.gtsvector_in(cstring) does not exist
ERROR:  could not find function "gtsvector_out" in file "/usr/lib/postgresql/8.3/lib/tsearch2.so"
ERROR:  function public.gtsvector_out(gtsvector) does not exist
ERROR:  function gtsvector_in(cstring) does not exist

I have read this is due to the tsearch2 functions being moved into the core section of postgres and I'll need to do some editing after the dump to change where the functions get referenced.

My question is: ( As I am no dba)
How do I change a create function statement like below so that it will load correctly in 8.3 and not lose the functionality.

CREATE FUNCTION gtsvector_in(cstring) RETURNS gtsvector
    AS '$libdir/tsearch2', 'gtsvector_in'
    LANGUAGE c STRICT;


Thanks in advance

Darragh




Re: tsearch2 Upgrade to 8.3 tsearch2.so errors

От
Richard Huxton
Дата:
Darragh Gammell wrote:
> I am currently upgrading from 8.1 to 8.3 and am getting errors when
> restoring the dump from 8.1 into 8.3. Like below:

> I have read this is due to the tsearch2 functions being moved into the core
> section of postgres and I'll need to do some editing after the dump to
> change where the functions get referenced.

What you want to do is exclude all the tsearch functions altogether,
since they're already in your 8.3 database. If you've installed all your
tsearch stuff into its own schema in 8.2 then there's an example at the
page below.

http://sql-info.de/postgresql/notes/converting-tsearch2-to-8.3.html

If not, you'll want to use the -l / -L options on pg_restore to generate
a list of all objects in your database. You can then comment out the
tsearch functions etc. and restore the db. Allow for some trial and
error on this.

A pain, but hopefully the last time you'll need to do it.

--
  Richard Huxton
  Archonet Ltd

Re: tsearch2 Upgrade to 8.3 tsearch2.so errors

От
"Darragh Gammell"
Дата:
Hi Richard

Thanks for your help. I'll try that.

Darragh


On Wed, Oct 1, 2008 at 6:03 PM, Richard Huxton <dev@archonet.com> wrote:
Darragh Gammell wrote:
> I am currently upgrading from 8.1 to 8.3 and am getting errors when
> restoring the dump from 8.1 into 8.3. Like below:

> I have read this is due to the tsearch2 functions being moved into the core
> section of postgres and I'll need to do some editing after the dump to
> change where the functions get referenced.

What you want to do is exclude all the tsearch functions altogether,
since they're already in your 8.3 database. If you've installed all your
tsearch stuff into its own schema in 8.2 then there's an example at the
page below.

http://sql-info.de/postgresql/notes/converting-tsearch2-to-8.3.html

If not, you'll want to use the -l / -L options on pg_restore to generate
a list of all objects in your database. You can then comment out the
tsearch functions etc. and restore the db. Allow for some trial and
error on this.

A pain, but hopefully the last time you'll need to do it.

--
 Richard Huxton
 Archonet Ltd

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