Created
December 5, 2019 14:05
-
-
Save johnston/84e7508828c86d49de1018667a71a421 to your computer and use it in GitHub Desktop.
Fixes Rails < 4.2 PostgreSQL 12 "panic" issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module ActiveRecord | |
| module ConnectionAdapters | |
| class PostgreSQLAdapter < AbstractAdapter | |
| def set_standard_conforming_strings | |
| old, self.client_min_messages = client_min_messages, 'error' | |
| execute('SET standard_conforming_strings = on', 'SCHEMA') rescue nil | |
| ensure | |
| self.client_min_messages = old | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment