@@ -74,6 +74,7 @@ data BuiltinType
7474 | Void
7575 | UUID
7676 | JSON
77+ | JSONB
7778 deriving (Eq, Ord, Enum, Bounded, Read, Show, Typeable)
7879
7980builtin2oid :: BuiltinType -> PQ.Oid
@@ -125,6 +126,7 @@ builtin2oid typ = PQ.Oid $ case typ of
125126 Void -> 2278
126127 UUID -> 2950
127128 JSON -> 114
129+ JSONB -> 3802
128130
129131oid2builtin :: PQ.Oid -> Maybe BuiltinType
130132oid2builtin (PQ.Oid x) = case x of
@@ -175,6 +177,7 @@ oid2builtin (PQ.Oid x) = case x of
175177 2278 -> Just Void
176178 2950 -> Just UUID
177179 114 -> Just JSON
180+ 3802 -> Just JSONB
178181 _ -> Nothing
179182
180183builtin2typname :: BuiltinType -> ByteString
@@ -226,6 +229,7 @@ builtin2typname typ = case typ of
226229 Void -> void
227230 UUID -> uuid
228231 JSON -> json
232+ JSONB -> jsonb
229233
230234oid2typname :: PQ.Oid -> Maybe ByteString
231235oid2typname (PQ.Oid x) = case x of
@@ -276,6 +280,7 @@ oid2typname (PQ.Oid x) = case x of
276280 2278 -> Just void
277281 2950 -> Just uuid
278282 114 -> Just json
283+ 3802 -> Just jsonb
279284 _ -> Nothing
280285
281286bool :: ByteString
@@ -418,3 +423,6 @@ uuid = "uuid"
418423
419424json :: ByteString
420425json = "json"
426+
427+jsonb :: ByteString
428+jsonb = "jsonb"