Re: Dealing with tsvector in fuctions for data split

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Francisco Reyes <lists(at)stringsutils(dot)com>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Dealing with tsvector in fuctions for data split
Date: 2007-08-06 14:41:50
Message-ID: 27283.1186411310@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Francisco Reyes <lists(at)stringsutils(dot)com> writes:

> v_sql := 'INSERT INTO messagecatalog_'||
> to_char(NEW.timestampfield,'YYYY')||
> '(field1, field2) values ('
> ||New.field1||','||New.field2||')
> ')';
> EXECUTE v_sql;

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.

However, if you insist on doing it like that, don't you need
quote_literal() for the field values?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Henrik Zagerholm 2007-08-06 14:46:43 Re: [PERFORM] Planner making wrong decisions 8.2.4. Insane cost calculations.
Previous Message Charlie Clark 2007-08-06 14:35:41 Backup & Restore