Skip to content

Commit ace5b54

Browse files
committed
Skip test_via_to_sql_with_complicating_connection for PostgreSQL 19+
PostgreSQL 19 no longer allows setting standard_conforming_strings to OFF. ```sql postgres=# SET standard_conforming_strings = off; ERROR: non-standard string literals are not supported postgres=# select version(); version -------------------------------------------------------------------- PostgreSQL 19devel on x86_64-linux, compiled by gcc-15.2.1, 64-bit (1 row) ``` According to rails#14632, the purpose of the failing test is to ensure that the unescape_bytea method is per-connection, not global. Since PostgreSQL 19dev no longer allows setting standard_conforming_strings to OFF, the value will no longer vary per connection, so we can skip this test when the PostgreSQL version is 19 or higher. Fix rails#56789
1 parent 58c94cb commit ace5b54

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

activerecord/test/cases/adapters/postgresql/bytea_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ def test_via_to_sql
110110
end
111111

112112
def test_via_to_sql_with_complicating_connection
113+
skip "PostgreSQL 19+ no longer allows setting standard_conforming_strings to OFF" if @connection.database_version >= 190000
114+
113115
Thread.new do
114116
other_conn = ActiveRecord::Base.lease_connection
115117
other_conn.execute("SET standard_conforming_strings = off")

0 commit comments

Comments
 (0)