rails/rails — pull request #17726 by andreynering (2014-11-23 13:49:53+00:00)
Title: Improving disable integrity of PostgreSQL Connection Adapter.

Now checking if user is superuser and can disable referential integrity,
and commiting the right SQL, depending what is possible to do.

And showing a warning to the user if doing it is not possible.

---

@senny @matthewd I had thechnical problems with the other PR (https://github.com/rails/rails/pull/17663) and had to open another one.

I edited the file again. Now, the adapter just commit the right SQL, instead of unnecessarily trying to rescue when the first one fails. I kept the warning.