Here is a working example of trigger based partitioning with a view and 'do instead' that works with ORM tools using the affected rows return (example attached).
The key things that make it work are:
1. RETURN NEW; (in the function after inserting into the partition)
2. INSTEAD OF INSERT (in the trigger)
example:
insert into data_log_view (date, thingy) values ('2015-01-02', 'test');
INSERT 0 1
On 3/24/16 8:28 AM, CS DBA wrote:
On 03/23/2016 02:48 AM, Chris Travers wrote:
All;
Thanks for the great Ideas, I'll let you know where we end up.