Re: Partition Help

Поиск
Список
Период
Сортировка
От Melvin Davidson
Тема Re: Partition Help
Дата
Msg-id CANu8Fix4dXUjGt_UNJeJg2-RcB9AhN4jQRrgXf=NBF050+1u0A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Partition Help  (akshunj <rickjackson001@gmail.com>)
Список pgsql-general
Rick,

I am glad I could help, but I am not quite sure you understand the purpose/use of the trigger to
partition the table.

The trigger merely decides which child should get the data, the "query" is not passed, only the data,
To be more specific, if your appropriate child table were child_1000, then the insert statement
would be
INSERT INTO child_1000 VALUES (NEW.*);

To insert by column name, then it would be:
INSERT INTO child_1000
( col_a, col_b, col_c)
VALUES
(NEW.col_a, NEW.col_b, NEW.col_c);

On Wed, Apr 29, 2015 at 7:25 PM, akshunj <rickjackson001@gmail.com> wrote:
Melvin, thanks. Syntax was indeed the problem there. Any idea how to pass the
original query to the child table? My insert has 113 parameters passed in,
but based on the constraint violations I am seeing, it seems they are not
making. I suspect that: VALUE (NEW.*) does not pass in the original query,
only the column I used for the comparison?



--
View this message in context: http://postgresql.nabble.com/Re-Partition-Help-tp5847286p5847360.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

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

Предыдущее
От: Qingqing Zhou
Дата:
Сообщение: how to read all physical rows (visible or not) from a heap
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: PostgreSQL HA config recommendations