You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@standard_conforming_strings == true# return false if :unsupported
end
In our app this didn't actually present a problem until we upgraded postgres to either 11 or 12 (we're on 12 now), so perhaps "panic" actually was an acceptable value in a prior version, despite the docs. In any case, it's not an acceptable value now.
The effect is that trying to set it to "panic" raises an error, which is rescued, and @standard_conforming_strings is incorrectly set to :unsupported, which causes problems later when our app constructs properly-escaped queries.
We've worked around it by monkeypatching these functions to remove the extra bits:
This has been a problem for us from 50.0 all the way up to 52.7. I see from the source in 60.x this may not be an issue anymore.
The postgresql docs (for pg versions that support client_min_messages, i.e. 10 through 13) specify the valid values for client_min_messages:
Yet, the postgres adapter here (up to 52.7 at least) tries setting it to "panic":
activerecord-jdbc-adapter/lib/arjdbc/postgresql/adapter.rb
Lines 206 to 219 in 1100221
activerecord-jdbc-adapter/lib/arjdbc/postgresql/adapter.rb
Lines 221 to 235 in 1100221
In our app this didn't actually present a problem until we upgraded postgres to either 11 or 12 (we're on 12 now), so perhaps "panic" actually was an acceptable value in a prior version, despite the docs. In any case, it's not an acceptable value now.
The effect is that trying to set it to "panic" raises an error, which is rescued, and
@standard_conforming_strings
is incorrectly set to:unsupported
, which causes problems later when our app constructs properly-escaped queries.We've worked around it by monkeypatching these functions to remove the extra bits:
As I said, it looks like this may be fixed in 60.x. Can this be backported to 52.x (or further)?
The text was updated successfully, but these errors were encountered: