rails/rails — pull request #5698 by dougcole (2012-04-01 22:32:26+00:00)
Title: Support postgresql partitioning by making INSERT RETURNING optional

Currently the Postgresql adapters use of INSERT RETURNING for insert statements makes using trigger based partitioning of tables impossible (See http://www.postgresql.org/docs/9.1/static/ddl-partitioning.html for more info). This patch adds a per connection option to disable INSERT RETURNING and use a simpler INSERT; SELECT currval() which works with trigger based inserts. Fixes #4955