I don't think that supporting case insensitive Strings or ByteStrings is a goal of postgresql-simple, though, just based on my impression of the library (and like you said, it would be preferable to use bytea for ByteString).
@bergmark mentioned having newtypes around text, and it would be nice to support those. I suspect you'd more often be making newtypes around CI Text though (newtype Foo = Foo (CI Text) deriving (Show, Eq, ToField, FromField)), in which case you could use GeneralizedNewtypeDeriving to get the FromField/ToField instances.
Closes #231
I'm not positive I understand the conclusion from this comment thread: https://github.com/lpsmith/postgresql-simple/commit/bcbacfe9f2184692c5426ab9f6b89a2c4c4752b0
I don't think that supporting case insensitive Strings or ByteStrings is a goal of postgresql-simple, though, just based on my impression of the library (and like you said, it would be preferable to use bytea for ByteString).
@bergmark mentioned having newtypes around text, and it would be nice to support those. I suspect you'd more often be making newtypes around
CI Text
though (newtype Foo = Foo (CI Text) deriving (Show, Eq, ToField, FromField)
), in which case you could useGeneralizedNewtypeDeriving
to get theFromField
/ToField
instances.