-
Notifications
You must be signed in to change notification settings - Fork 877
Description
Since we've released the NodaTime plugin in 4.0, we occasionally receive complaints about not being able to use both the BCL types and the NodaTime plugin in the same application. Marten specifically seems to be severely impacted by this (JasperFx/marten#1242), but there have been other requests (e.g. #2295, npgsql/efcore.pg#747).
One the write side things seem easy, but on the read side, there's one handler mapped to a given PostgreSQL type. We could have more than one handler mapped there (possibly by having NpgsqlTypeHandler reference the "next" handler as a linked list), but right now the handler API throws when it fails, so we'd have to catch that exception and move on to the next handler (which isn't really acceptable). We could modify the handler API to try writing (i.e. return a bool), but that's a non-trivial API change.
Interestingly we just ran into a very similar issue in #2435 (which we ended up not needing).