Re: [GENERAL] Dealing with tsvector in fuctions for data split

2007-08-08 Thread Oleg Bartunov
On Wed, 8 Aug 2007, Francisco Reyes wrote: Francisco Reyes writes: ERROR: operator does not exist: text || tsvector what'd you expect from this operation ? In 8.2 you can cast tsvector to text like this: =# select textin( tsvector_out( strip( to_tsvector('1 b c'::text || 'some text'::

Re: [GENERAL] Dealing with tsvector in fuctions for data split

2007-08-08 Thread Francisco Reyes
Francisco Reyes writes: 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

Re: [GENERAL] Dealing with tsvector in fuctions for data split

2007-08-06 Thread Francisco Reyes
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

Re: [GENERAL] Dealing with tsvector in fuctions for data split

2007-08-06 Thread Francisco Reyes
Tom Lane writes: This is not a particularly good way of accomplishing partitioning, as you'll be needing *every* part of your application to be explicitly aware of the exact partitioning scheme. I am trying to follow the presentation at PGcon2007 by Robert Treat. I created a master table, then

Re: [GENERAL] Dealing with tsvector in fuctions for data split

2007-08-06 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > v_sql := 'INSERT INTO messagecatalog_'|| > to_char(NEW.timestampfield,'')|| > '(field1, field2) values (' > ||New.field1||','||New.field2||') > ')'; > EXECUTE v_sql; This is not a particularly good way of accomplishing partitioning

Re: [GENERAL] Dealing with tsvector in fuctions for data split

2007-08-06 Thread Oleg Bartunov
Francisco, you need to say us standard information about pg version, error message you got. Also, it'd be worth to show simplified version of your function, which demonstrates your problem. Oleg On Mon, 6 Aug 2007, Francisco Reyes wrote: I am trying to create a function to handle inserts in a

[GENERAL] Dealing with tsvector in fuctions for data split

2007-08-05 Thread Francisco Reyes
I am trying to create a function to handle inserts in a database with partitions in a particular table. The function looks like: AS $$ DECLARE v_sql TEXT; BEGIN v_sql := 'INSERT INTO messagecatalog_'|| to_char(NEW.timestampfield,'')|| '(field1, field2) values (' ||New.field1||','