Shopify/activerecord-rescue_from_duplicate — pull request #3 by gmalette (2014-09-24 13:54:48+00:00)
Title: Support postgresql

PG doesn't let you perform queries inside a transaction once it has failed. One such failure is when a duplicate index insertion failed. Because of this my strategy to lookup indexes wasn't working.

Instead, I parse the error string (:shit:) which contains all the necessary information about the failed index (same as the Sqlite strategy).