-
Notifications
You must be signed in to change notification settings - Fork 877
Description
When using npgsql with Babelfish, most of the domain types defined by the Babelfish extension are loaded in the DatabaseInfo dictionaries.
But sys.decimal seems to be exceptional and is not loaded.
This is causing me problems when using BeginBinaryImportAsync and calling Write and passing sys.decimal as dataTypeName, and results an exception:
The data type name `sys.decimal` could not be found in the types that were loaded by Npgsql. Your database details or Npgsql type loading configuration may be incorrect.
While debugging I noticed a sys.numeric was loaded and it matches the OID expected for sys.decimal:
When querying pg_type for numeric I don't see any results , so I assume npgsql extract the name some other way and we endup with sys.numeric
I think it may caused by some special handling in Babelfish to treat sys.decimal and sys.numeric as the same type since in mssql the types are essencially the same.
For now I will just change my code to force to use sys.numeric when the datatypeName is sys.decimal, but would be nice if npgsql could this internally.