Search Postgresql Archives

Re: Partition Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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@xxxxxxxxxxxxxx)
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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux