Re: Dealing with tsvector in fuctions for data split

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Dealing with tsvector in fuctions for data split
Дата
Msg-id 27283.1186411310@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Dealing with tsvector in fuctions for data split  (Francisco Reyes <lists@stringsutils.com>)
Список pgsql-general
Francisco Reyes <lists@stringsutils.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

В списке pgsql-general по дате отправления:

Предыдущее
От: M S
Дата:
Сообщение: Re: Postgres service startup
Следующее
От: Henrik Zagerholm
Дата:
Сообщение: Re: [PERFORM] Planner making wrong decisions 8.2.4. Insane cost calculations.