Re: tsearch2.sql and different versions of PostgreSQL

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Emil Oppeln-Bronikowski <emil(dot)oppeln(dot)bronikowski(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: tsearch2.sql and different versions of PostgreSQL
Date: 2007-07-31 10:20:31
Message-ID: 1185877231.10580.106.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Sun, 2007-07-29 at 14:50 +0200, Emil Oppeln-Bronikowski wrote:
...
> This project relies on tsearch code. Installer hits you should have
> tsearch2.sql used over your new database or on template1. On my server
> CREATE DATABASE gets functions from template1 and everything works. I
> assumed it will be same story for them.
>
> But it wasn't. I run:
>
> %apt-cache show postgresql-8.1 | grep Version
> Version: 8.1.8-1~bpo.1
>
> And they have PostgreSQL from same branch (ie. 8.1) but a little older
> revision. And their tsearch2.sql and mine tsearch2.sql is different!
> It gets different order and number of params, IIRC.
>
> Is this possible? Or am I blind or unaware of something? I never had
> to admin PostgreSQL database so I feel lost. :-)
>
> If tsearch2.sql changes over versions of PgSQL, what is the best
> scenario of managing installer development for PgSQL-enabled projects?
> Should I wrap function calls in my own functions? Help, help! I'm
> being repressed! :-)

If tsearch2 (or any similar contrib module) is installed from one
version of PostgreSQL it will not be automatically updated when a newer
version of the database is installed. The new version will have the
updated code, but it needs to be installed in the various databases.

I think you need to run the SQL script tsearch2.sql. It looks as if it
will try to create tables and functions that will already exist, so you
may have to run uninstall_tsearch2.sql first.

--
Oliver Elphick olly(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
Do you want to know God? http://www.lfix.co.uk/knowing_god.html

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2007-07-31 14:32:16 Re: SQL_CALC_FOUND_ROWS equivalent in PostgreSQL
Previous Message Nis Jørgensen 2007-07-31 07:56:47 Re: alter table table add column