aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge pull request #21233 from ↵Rafael Mendonça França2017-01-031-43/+4
| | | | | | | | | | mtsmfm/disable-referential-integrity-without-superuser-privileges" This reverts commit eeac6151a55cb7d5f799e1ae33aa64a839cbc3aa, reversing changes made to 5c40239d3104543e70508360d27584a3e4dc5baf. Reason: Broke the isolated tests. https://travis-ci.org/rails/rails/builds/188721346
* Use `SET CONSTRAINTS` for `disable_referential_integrity` without superuser ↵Fumiaki MATSUSHIMA2016-12-031-4/+43
| | | | | | | | | privileges ref: 72c1557254 - We must use `authors` fixture with `author_addresses` because of its foreign key constraint. - Tests require PostgreSQL >= 9.4.2 because it had a bug about `ALTER CONSTRAINTS` and fixed in 9.4.2.
* pg, `disable_referential_integrity` only catches AR errors.Yves Senn2015-03-111-2/+2
| | | | This change was prompted by 598b841.
* fix typo in transaction argument. Closes #19265.Yves Senn2015-03-111-1/+1
| | | | | | There was a typo in the `:requires_new` option. This led to `#<ArgumentError: unknown keyword: require_new>` leaving all the triggers in a disabled state.
* rework `disable_referential_integrity` for PostgreSQL.Yves Senn2015-02-241-9/+28
| | | | | | | | | | | | | | | | | | | | | | | [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
* pg, add missing nodocs for extracted modules.Yves Senn2014-05-191-3/+3
|
* introduce AR::ConnectionAdapters::PostgreSQL for sharing modules (with AR-JDBC)kares2014-05-141-1/+1
| | | ... 'shared' OID, ArrayParser and Cast helpers, also re-arranged Column's dependencies
* #5523 Add ability for postgresql adapter to disable user triggers in ↵Gary S. Weaver2012-12-181-4/+12
| | | | disable_referential_integrity.
* Modularize postgresql adapterKonstantin Shabanov2012-09-051-0/+22