|
|
|
|
|
by goldmar
4422 days ago
|
|
Great introduction to partitions. I did not know how exactly they are used. And now I think that I do. Thank you! What I noticed (some improvement suggestions): 1)
"the planner could tell (using knowledge from the check constraint) that employees_1 was the only table it needed to look at." Well, I think it still checks the parent table, right? 2)
You could mention that it is possible to create a trigger function which inserts new data automatically into the correct child table (as described in your final link, here: http://www.postgresql.org/docs/9.3/static/ddl-partitioning.h...). I think it would be cool if PostgreSQL could create these trigger functions automatically based on the check constraints... I'm also wondering why foreign key constraints are not inherited? |
|
and yes, a trigger function is possible -- and I could have mentioned it (although this was written as an explanation of partitioning using the gem I created). I should mention the alternatives and why they weren't employed.