diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-02-24 17:24:43 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-02-24 17:32:35 +0100 |
commit | 72c1557254aef2bca8a72f16a4f67862c9cca5cb (patch) | |
tree | 6aea8c0f37c9d3b26698fa74d42714522c80b4cb /actionpack/test/controller/request | |
parent | 48dcaeab38ed81abbe190662f81e1030a4032e21 (diff) | |
download | rails-72c1557254aef2bca8a72f16a4f67862c9cca5cb.tar.gz rails-72c1557254aef2bca8a72f16a4f67862c9cca5cb.tar.bz2 rails-72c1557254aef2bca8a72f16a4f67862c9cca5cb.zip |
rework `disable_referential_integrity` for PostgreSQL.
[Toby Ovod-Everett & Andrey Nering & Yves Senn]
Closes #17726.
Closes #10939.
This patch makes three distinct modifications:
1. no longer fall back to disabling user triggers if system triggers can't be disabled
2. warn the user when referential integrity can't be disabled
3. restore aborted transactions when referential integrity can't be disabled
The motivation behind these changes is to make the behavior of Rails
transparent and less error-prone. To require superuser privileges is not optimal
but it's what Rails currently needs. Users who absolutely rely on disabling user triggers
can patch `disable_referential_integrity`.
We should investigate `SET CONSTRAINTS` as a possible solution which does not require
superuser privileges.
/cc @matthewd
Diffstat (limited to 'actionpack/test/controller/request')
0 files changed, 0 insertions, 0 deletions