Add name OID and register it as a textual type
This commit is contained in:
parent
79085906a5
commit
3879c2603f
@ -61,7 +61,7 @@ instance FromField ByteString where
|
||||
-- | See https://www.postgresql.org/docs/current/datatype-character.html.
|
||||
-- Accepts @text@, @character@ and @character varying@.
|
||||
instance FromField Text where
|
||||
validOid Proxy = eq Oid.text \/ eq Oid.character \/ eq Oid.characterVarying
|
||||
validOid Proxy = eq Oid.name \/ eq Oid.text \/ eq Oid.character \/ eq Oid.characterVarying
|
||||
parseField = Encoding.decodeUtf8 <$> AP.takeByteString
|
||||
|
||||
-- Accepts @text@, @character@ and @character varying@.
|
||||
|
@ -9,6 +9,9 @@ bytea = Oid 17
|
||||
|
||||
-- string types
|
||||
|
||||
name :: Oid
|
||||
name = Oid 19
|
||||
|
||||
text :: Oid
|
||||
text = Oid 25
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user