File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
lib/active_record/connection_adapters
test/cases/adapters/postgresql Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change
1
+ * Emit a warning for pg gem < 1.6.0 when using PostgreSQL 18+
2
+
3
+ * Yasuo Honda*
4
+
1
5
* Fix ` #merge ` with ` #or ` or ` #and ` and a mixture of attributes and SQL strings resulting in an incorrect query.
2
6
3
7
``` ruby
Original file line number Diff line number Diff line change @@ -666,6 +666,9 @@ def check_version # :nodoc:
666
666
if database_version < 9_03_00 # < 9.3
667
667
raise "Your version of PostgreSQL (#{ database_version } ) is too old. Active Record supports PostgreSQL >= 9.3."
668
668
end
669
+ if database_version >= 18_00_00 && Gem ::Version . new ( PG ::VERSION ) < Gem ::Version . new ( "1.6.0" )
670
+ warn "pg gem version #{ PG ::VERSION } is known to be incompatible with PostgreSQL 18+. Please upgrade to pg 1.6.0 or later."
671
+ end
669
672
end
670
673
671
674
class << self
Original file line number Diff line number Diff line change @@ -181,6 +181,9 @@ class Sample < ActiveRecord::Base
181
181
end
182
182
183
183
test "raises Interrupt when canceling statement via interrupt" do
184
+ if ActiveRecord ::Base . lease_connection . database_version >= 18_00_00 && Gem ::Version . new ( PG ::VERSION ) < Gem ::Version . new ( "1.6.0" )
185
+ skip "pg gem version #{ PG ::VERSION } is known to be incompatible with PostgreSQL 18+. "
186
+ end
184
187
start_time = Time . now
185
188
thread = Thread . new do
186
189
Sample . transaction do
You can’t perform that action at this time.
0 commit comments