rails/rails — Issue #4955: ActiveRecord 3.1 removes support for posgresql trigger based partitioning
Author: dougcole
Created: 2012-02-09 04:59:46+00:00
State: open

Postgresql's INSERT ... RETURNING does not work with trigger based trigger based table partitioning:

http://www.postgresql.org/docs/9.1/static/ddl-partitioning.html

Prior to rails 3.1 simply overriding `supports_insert_with_returning?` to return false would remove RETURNING and simply use `last_insert_id` to retrieve the currval() of the table sequence. This is no longer possible.

I don't think it would be too hard to add this option back, but I want to make sure the rails core team would be willing to accept a patch for this and that there aren't any pitfalls that I haven't uncovered before I start.