Skip to content

Better support for official extension types, and 3rd party types in npgsql v3+ #696

@JohannesEH

Description

@JohannesEH

I would like to start a discussion on how improve the type mapping system to enable handling of official extension types from the following modules: citext, isn, ltree, hstore and cube, as well as types from 3rd-party extension modules like PostGIS.

It would be extremely useful to be able to write your own type handling for extension types. Also, it is extremely annoying to have to jump through "hoops" when using official extension types such as citext. For citext you have to manually cast the citext type to text in the queries you write (afaik this wasn't the case in 2.2.5).

It seems like the TypeHandlerRegistry is not allowing any changes or additions to the default type mapping npgsql as it is marked "internal". I realize it is not possible to simply open this class up, but I guess this is basically what needs to be done.

I'm fairly new to the npgsql codebase/project so I'm not sure if the regular maintainers see any big issues or obstacles if custom type mapping should be added to npgsql.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions