Re: Dealing with tsvector in fuctions for data split - Mailing list pgsql-general

From Francisco Reyes
Subject Re: Dealing with tsvector in fuctions for data split
Date
Msg-id cone.1186421249.532643.21078.5001@35st.simplicato.com
Whole thread Raw
In response to Dealing with tsvector in fuctions for data split  (Francisco Reyes <lists@stringsutils.com>)
List pgsql-general
Oleg Bartunov writes:

> Francisco,
>
> you need to say us standard information about pg version

Postgresql 8.2 running in FreeBSD.

> error message you got.

ERROR:  operator does not exist: text || tsvector

> Also, it'd be worth to show simplified version of your function, which
> demonstrates your problem.


I did include that.

>> The function looks like:
>> AS $$
>> DECLARE
>>   v_sql TEXT;
>> BEGIN
>>   v_sql := 'INSERT INTO messagecatalog_'||
>> to_char(NEW.timestampfield,'YYYY')||
>>   '(field1, field2) values ('
>> ||New.field1||','||New.field2||')
>> ')';
>>   EXECUTE v_sql;
>>   RETURN NULL;
>> END
>> $$;

In the code above field1 is text and field2 is tsvector.

Basically I am trying to do partitioning. I have a master table, some
children which inherit from the master. Inserts will be redirected with a
trigger from the master to the children. The function I am having the
problem with is what the trigger calls to do the redirection.

pgsql-general by date:

Previous
From: Francisco Reyes
Date:
Subject: Re: Dealing with tsvector in fuctions for data split
Next
From: "Jasbinder Singh Bali"
Date:
Subject: new line in psotgres