From: | "Markus Wollny" <Markus(dot)Wollny(at)computec(dot)de> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | tsvector_update_trigger throws error "column is not of tsvector type" |
Date: | 2008-04-08 02:08:17 |
Message-ID: | 28011CD60FB1724DBA4442E38277F62608B9836A@hermes.computec.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-04-08 02:15:03 | Re: select distinct and index usage |
Previous Message | Alvaro Herrera | 2008-04-08 01:53:12 | Re: Cannot use a standalone backend to VACUUM in "postgres"" |