Skip to content

Commit 7c441c0

Browse files
committed
[postgres] on 4.2 load core oid types (as they shall be shareable) to avoid hell.freeze
1 parent b9e4ff8 commit 7c441c0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/arjdbc/postgresql/oid_types.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
require 'arjdbc/postgresql/base/oid' # 'active_record/connection_adapters/postgresql/oid'
21
require 'thread'
32

43
module ArJdbc
54
module PostgreSQL
5+
6+
if AR42_COMPAT
7+
require 'active_record/connection_adapters/postgresql/oid'
8+
else
9+
require 'arjdbc/postgresql/base/oid'
10+
end
11+
612
# @private
713
module OIDTypes
814

915
OID = ActiveRecord::ConnectionAdapters::PostgreSQL::OID
10-
Type = ActiveRecord::Type if AR42_COMPAT
1116

1217
def get_oid_type(oid, fmod, column_name)
1318
type_map.fetch(oid, fmod) {

0 commit comments

Comments
 (0)