Structure
PostgresDataType
Data types and their raw OIDs.
struct PostgresDataType
Overview
Use select * from pg_type where oid = <idhere> to look up more information for a given type.
This list was generated by running select oid, typname from pg_type where oid < 10000 order by oid and manually trimming Postgres-internal types.
Topics
Initializers
init(_:)init(rawValue:)Creates a new instance with the specified raw value.
Instance Properties
descriptionA textual representation of this instance.isUserDefinedReturnstrueif the type’s raw value is greater than or equal to2^14. This appears to be true for all user-defined types, but I don’t have any documentation to back this up.knownSQLNameReturns the known SQL name, if one exists. Note: This only supports a limited subset of all PSQL types and is meant for convenience only. This list was manually generated.rawValueThe raw data type code recognized by PostgreSQL.
Type Properties
aclitem1033aclitemArray1034_aclitemany2276anyarray2277anycompatible5077anycompatiblearray5078anycompatiblemultirange4538anycompatiblenonarray5079anycompatiblerange5080anyelement2283anyenum3500anymultirange4537anynonarray2776anyrange3831bit1560bitArray1561bool16boolArray1000_boolbox603boxArray1020bpchar1042bpcharArray1014bytea17byteaArray1001_byteachar18charArray1002_charcid29cidArray1012cidr650cidrArray651circle718circleArray719cstring2275cstringArray1263date1082dateArray1182datemultirange4535datemultirangeArray6155daterange3912daterangeArray3913eventTrigger3838fdwHandler3115float4700float4Array1021_float4float8701float8Array1022_float8gtsvector3642gtsvectorArray3644indexAMHandler325inet869inetArray1041int221int2Array1005_int2int2vector22int2vectorArray1006int423int4Array1007_int4int4Range3904int4RangeArray3905_int4rangeint4multirange4451int4multirangeArray6150int820int8Array1016_int8int8Range3926int8RangeArray3927_int8rangeint8multirange4536int8multirangeArray6157internal2281interval1186intervalArray1187json114jsonArray199jsonb3802jsonbArray3807_jsonbjsonpath4072jsonpathArray4073languageHandler2280line628lineArray629lseg601lsegArray1018macaddr829macaddr8774macaddr8Aray775macaddr8ArraymacaddrArray1040money790moneyArrayname19nameArray1003_namenull0numeric1700numericArray1231nummultirange4532nummultirangeArray6151numrange3906numrangeArray3907oid26oidArray1028oidvector30oidvectorArray1013path602pathArray1019pgDDLCommand32pgLSN3220pgLSNArray3221pgNodeTree194pg_node_treepoint600pointArray1017_pointpolygon604polygonArray1027record2249recordArray2287refcursor1790refcursorArray2201regclass2205regclassArray2210regcollation4191regcollationArray4192regconfig3734regconfigArray3735regdictionary3769regdictionaryArray3770regnamespace4089regnamespaceArray4090regoper2203regoperArray2208regoperator2204regoperatorArray2209regproc24regprocArray1008regprocedure2202regprocedureArray2207regrole4096regroleArray4097regtype2206regtypeArray2211tableAMHandler269text25textArray1009_texttid27tidArray1010time1083timeArray1183timestamp1114timestampArray1115_timestamptimestamptz1184timestamptzArray1185timetz1266timetzArray1270trigger2279tsmHandler3310tsmultirange4533tsmultirangeArray6152tsquery3615tsqueryArray3645tsrange3908tsrangeArray3909tstzmultirange4534tstzmultirangeArray6153tstzrange3910tstzrangeArray3911tsvector3614tsvectorArray3643unknown705uuid2950uuidArray2951_uuidvarbit1562varbitArray1563varchar1043varcharArray1015_varcharvoid2278xid28xid85069xid8Array271xidArray1011xml142xmlArray143
Default Implementations
Relationships
Conforms To
Swift.CopyableSwift.CustomStringConvertibleSwift.DecodableSwift.EncodableSwift.EquatableSwift.EscapableSwift.ExpressibleByIntegerLiteralSwift.HashableSwift.RawRepresentableSwift.SendableSwift.SendableMetatype
See Also
Essentials
PostgresCodableA type that can be encoded into and decoded from a Postgres binary format.PostgresFormatThe format the postgres types are encoded in on the wire.PostgresNumeric