anchor.diff:      type_to_oid(Name, false, Codec).
   
   -spec type_to_oid(epgsql:type_name(), boolean(), codec()) -> epgsql_oid_db:oid().
  -type_to_oid(TypeName, IsArray, {OidDb, Db}) ->
  -    OidDb:oid_by_name(TypeName, IsArray, Db).
  +type_to_oid(TypeName, IsArray, #codec{oid_db = Db}) ->
  +    epgsql_oid_db:oid_by_name(TypeName, IsArray, Db).
   
   type_to_oid_info({array, Name}, Codec) ->
       type_to_info(Name, true, Codec);
  
positive.code:     type_to_info(Name, false, Codec).
  
  -spec oid_to_info(epgsql_oid_db:oid(), codec()) -> epgsql_oid_db:type_info() | undefined.
  oid_to_info(Oid, {OidDb, Db}) ->
      OidDb:find_by_oid(Oid, Db).
  
  -spec type_to_info(epgsql:type_name(), boolean(), codec()) -> epgsql_oid_db:type_info().
  type_to_info(TypeName, IsArray, {OidDb, Db}) ->
      OidDb:find_by_name(TypeName, IsArray, Db).
  
  typeinfo_to_name_array({unknown_oid, _} = Unknown, _) -> Unknown;
  typeinfo_to_name_array(TypeInfo, {OidDb, _}) ->
      case OidDb:type_to_oid_info(TypeInfo) of
          {_, Name, false} -> Name;
          {_, Name, true} -> {array, Name}
      end.
  
  typeinfo_to_oid_info({unknown_oid, _} = Unknown, _) -> Unknown;
  typeinfo_to_oid_info(TypeInfo, {OidDb, _}) ->
      OidDb:type_to_oid_info(TypeInfo).
  
  %%
  %% Decode
  
negative.code: decode_record1(<<>>, 0, _Codec) -> [];
  decode_record1(<<_Type:?int32, -1:?int32, Rest/binary>>, Size, Codec) ->
      [null | decode_record1(Rest, Size - 1, Codec)];
  decode_record1(<<Oid:?int32, Len:?int32, ValueBin:Len/binary, Rest/binary>>, Size, #codec{oid_db = Db} = Codec) ->
      Value =
          case epgsql_oid_db:find_by_oid(Oid, Db) of
              undefined -> ValueBin;
              Type ->
                  {Name, Mod, State} = epgsql_oid_db:type_to_codec_entry(Type),
                  Mod:decode(ValueBin, Name, State)
          end,
      [Value | decode_record1(Rest, Size - 1, Codec)].
  