We I set these up for our clients, I typically seperate the partition creation piece from the data insertion piece. (Mostly as partition creation, especially with rules, is a table locking event, which is better done in a non-critical path). If you really must do it all in one go, you'll have a
much better chance of accomplishing this using all triggers (and triggers are better anyway)... i think you could do it with a combination of rules and a trigger (on insert to parent, create new parition and insert into it and delete from parent) but it would certainly need testing to make sure you dont have multi-rule evaluation... course since your making a trigger anyway...
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных