Search Postgresql Archives

tsvector_update_trigger throws error "column is not of tsvector type"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I am in the process of migrating a PostgreSQL 8.2.4 database to 8.3. So far, everything has worked fine, even tsearch2-searching an indexed table.

There's something severely wrong with the trigger-function I use to keep the tsvector-column updated.

Here's my table definition:

CREATE TABLE public.ct_com_board_message
(
board_id integer DEFAULT 0,
thread_id integer DEFAULT 0,
father_id integer DEFAULT 0,
message_id integer NOT NULL DEFAULT 0,
user_id integer DEFAULT 0,
title text,
signature text,
follow_up text,
count_reply integer DEFAULT 0,
last_reply timestamptz,
created timestamptz DEFAULT now(),
article_id integer DEFAULT 0,
logged_ip text,
state_id smallint DEFAULT 0,
text text,
deleted_date timestamptz,
deleted_login text,
poll_id integer DEFAULT 0,
last_updated timestamptz DEFAULT now(),
idxfti tsvector,
CONSTRAINT "pk_ct_com_board_message" PRIMARY KEY (message_id)
);

And there's this trigger definition:

CREATE TRIGGER "tsvectorupdate"
BEFORE 
INSERT OR UPDATE 
ON "public"."ct_com_board_message"
FOR EACH ROW 
EXECUTE PROCEDURE pg_catalog.tsvector_update_trigger(idxfti,pg_catalog.german,title,text,user_login);

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

I didn't touch the tsvector_update_trigger-function at all, it still reads

CREATE or REPLACE FUNCTION "pg_catalog"."tsvector_update_trigger"()
RETURNS "pg_catalog"."trigger" AS 
$BODY$
tsvector_update_trigger_byid
$BODY$
LANGUAGE 'internal' VOLATILE;

So what's happening here?

Kind regards

   Markus


Computec Media AG
Sitz der Gesellschaft und Registergericht: Fürth (HRB 8818)
Vorstandsmitglieder: Johannes S. Gözalan (Vorsitzender) und Rainer Rosenbusch
Vorsitzender des Aufsichtsrates: Jürg Marquard 
Umsatzsteuer-Identifikationsnummer: DE 812 575 276




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux