Skip to content

Commit 7982f05

Browse files
committed
Always push in the PgTypeId if we have it
1 parent e2807fd commit 7982f05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Npgsql/Internal/PgTypeInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public PgConcreteTypeInfo GetConcreteTypeInfo<T>(T? value)
8383
if (this is not PgProviderTypeInfo providerTypeInfo)
8484
return (PgConcreteTypeInfo)this;
8585

86-
return providerTypeInfo.GetConcreteTypeInfo(value, null) ?? providerTypeInfo.GetDefaultConcreteTypeInfo(null);
86+
return providerTypeInfo.GetConcreteTypeInfo(value, PgTypeId) ?? providerTypeInfo.GetDefaultConcreteTypeInfo(PgTypeId);
8787
}
8888

8989
// Note: this api is not called GetConcreteTypeInfoAsObject as the semantics are extended, DBNull is a NULL value for all object values.
@@ -96,8 +96,8 @@ public PgConcreteTypeInfo GetObjectConcreteTypeInfo(object? value)
9696
case PgProviderTypeInfo providerTypeInfo:
9797
PgConcreteTypeInfo? concreteTypeInfo = null;
9898
if (value is not DBNull)
99-
concreteTypeInfo = providerTypeInfo.GetAsObjectConcreteTypeInfo(value, null);
100-
return concreteTypeInfo ?? providerTypeInfo.GetDefaultConcreteTypeInfo(null);
99+
concreteTypeInfo = providerTypeInfo.GetAsObjectConcreteTypeInfo(value, PgTypeId);
100+
return concreteTypeInfo ?? providerTypeInfo.GetDefaultConcreteTypeInfo(PgTypeId);
101101
default:
102102
return ThrowNotSupported();
103103
}

0 commit comments

Comments
 (0)