lib/sequel/extensions/pg_row.rb in sequel-5.60.0 vs lib/sequel/extensions/pg_row.rb in sequel-5.60.1
- old
+ new
@@ -373,11 +373,11 @@
db.instance_exec do
@row_types = {}
@row_schema_types = {}
extend(@row_type_method_module = Module.new)
add_conversion_proc(2249, PGRow::Parser.new(:converter=>PGRow::ArrayRow))
- if defined?(register_array_type)
+ if respond_to?(:register_array_type)
register_array_type('record', :oid=>2287, :scalar_oid=>2249)
end
end
end
@@ -462,10 +462,10 @@
parser_opts[:typecaster] = opts.fetch(:typecaster, parser_opts[:converter])
parser = Parser.new(parser_opts)
add_conversion_proc(parser.oid, parser)
- if defined?(register_array_type) && array_oid && array_oid > 0
+ if respond_to?(:register_array_type) && array_oid && array_oid > 0
array_type_name = if type_schema
"#{type_schema}.#{type_name}"
else
type_name
end