Re: tsvector_update_trigger throws error "column is not of tsvector type"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Markus Wollny" <Markus(dot)Wollny(at)computec(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tsvector_update_trigger throws error "column is not of tsvector type"
Date: 2008-04-08 02:47:22
Message-ID: 13959.1207622842@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Markus Wollny" <Markus(dot)Wollny(at)computec(dot)de> writes:
> Now when I do anything that fires the trigger like
> UPDATE ct_com_board_message set count_reply = 1 where message_id = 12345;
> I get an error
> ERROR: column "idxfti" is not of tsvector type

This is leaping to conclusions, but what I suspect is that you've got
two types "tsvector" in your database and the column is the wrong one.
This situation is not too hard to get into if you try to restore a dump
from an old database that used contrib/tsearch2 --- the dump may create
a partially broken type "public.tsvector" while the built-in
pg_catalog.tsvector still remains.

There's some hints in the manual about safe migration from tsearch2
to built-in tsearch:
http://www.postgresql.org/docs/8.3/static/textsearch-migration.html

The whole thing is a bit of a mess :-(, and has certainly helped make
it clear that we need to invent some better-defined module concept to
help with major upgrades/replacements of add-on modules.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Manuel Sugawara 2008-04-08 03:11:54 Re: Cannot use a standalone backend to VACUUM in "postgres""
Previous Message Stephen Denne 2008-04-08 02:43:37 Re: select distinct and index usage