pub const BOOL: Type = Type {
oid: 16,
descr: "BOOL - boolean, 'true'/'false'",
name: "bool",
kind: Kind::Boolean,
};
pub const BYTEA: Type = Type {
oid: 17,
descr: "BYTEA - variable-length string, binary values escaped",
name: "bytea",
kind: Kind::UserDefined,
};
pub const CHAR: Type = Type {
oid: 18,
descr: "CHAR - single character",
name: "char",
kind: Kind::String,
};
pub const NAME: Type = Type {
oid: 19,
descr: "NAME - 63-byte type for storing system identifiers",
name: "name",
kind: Kind::String,
};
pub const INT8: Type = Type {
oid: 20,
descr: "INT8 - ~18 digit integer, 8-byte storage",
name: "int8",
kind: Kind::Numeric,
};
pub const INT2: Type = Type {
oid: 21,
descr: "INT2 - -32 thousand to 32 thousand, 2-byte storage",
name: "int2",
kind: Kind::Numeric,
};
pub const INT2_VECTOR: Type = Type {
oid: 22,
descr: "INT2VECTOR - array of int2, used in system tables",
name: "int2vector",
kind: Kind::Array(21),
};
pub const INT4: Type = Type {
oid: 23,
descr: "INT4 - -2 billion to 2 billion integer, 4-byte storage",
name: "int4",
kind: Kind::Numeric,
};
pub const REGPROC: Type = Type {
oid: 24,
descr: "REGPROC - registered procedure",
name: "regproc",
kind: Kind::Numeric,
};
pub const TEXT: Type = Type {
oid: 25,
descr: "TEXT - variable-length string, no limit specified",
name: "text",
kind: Kind::String,
};
pub const OID: Type = Type {
oid: 26,
descr: "OID - object identifier(oid), maximum 4 billion",
name: "oid",
kind: Kind::Numeric,
};
pub const TID: Type = Type {
oid: 27,
descr: "TID - (block, offset), physical location of tuple",
name: "tid",
kind: Kind::UserDefined,
};
pub const XID: Type = Type {
oid: 28,
descr: "XID - transaction id",
name: "xid",
kind: Kind::UserDefined,
};
pub const CID: Type = Type {
oid: 29,
descr: "CID - command identifier type, sequence in transaction id",
name: "cid",
kind: Kind::UserDefined,
};
pub const OID_VECTOR: Type = Type {
oid: 30,
descr: "OIDVECTOR - array of oids, used in system tables",
name: "oidvector",
kind: Kind::Array(26),
};
pub const PG_DDL_COMMAND: Type = Type {
oid: 32,
descr: "PG_DDL_COMMAND - internal type for passing CollectedCommand",
name: "pg_ddl_command",
kind: Kind::Pseudo,
};
pub const JSON: Type = Type {
oid: 114,
descr: "JSON - JSON stored as text",
name: "json",
kind: Kind::UserDefined,
};
pub const XML: Type = Type {
oid: 142,
descr: "XML - XML content",
name: "xml",
kind: Kind::UserDefined,
};
pub const XML_ARRAY: Type = Type {
oid: 143,
descr: "XML[]",
name: "_xml",
kind: Kind::Array(142),
};
pub const PG_NODE_TREE: Type = Type {
oid: 194,
descr: "PG_NODE_TREE - string representing an internal node tree",
name: "pg_node_tree",
kind: Kind::String,
};
pub const JSON_ARRAY: Type = Type {
oid: 199,
descr: "JSON[]",
name: "_json",
kind: Kind::Array(114),
};
pub const TABLE_AM_HANDLER: Type = Type {
oid: 269,
descr: "TABLE_AM_HANDLER",
name: "table_am_handler",
kind: Kind::Pseudo,
};
pub const XID8_ARRAY: Type = Type {
oid: 271,
descr: "XID8[]",
name: "_xid8",
kind: Kind::Array(5069),
};
pub const INDEX_AM_HANDLER: Type = Type {
oid: 325,
descr: "INDEX_AM_HANDLER - pseudo-type for the result of an index AM handler function",
name: "index_am_handler",
kind: Kind::Pseudo,
};
pub const POINT: Type = Type {
oid: 600,
descr: "POINT - geometric point '(x, y)'",
name: "point",
kind: Kind::Geometric,
};
pub const LSEG: Type = Type {
oid: 601,
descr: "LSEG - geometric line segment '(pt1,pt2)'",
name: "lseg",
kind: Kind::Geometric,
};
pub const PATH: Type = Type {
oid: 602,
descr: "PATH - geometric path '(pt1,...)'",
name: "path",
kind: Kind::Geometric,
};
pub const BOX: Type = Type {
oid: 603,
descr: "BOX - geometric box '(lower left,upper right)'",
name: "box",
kind: Kind::Geometric,
};
pub const POLYGON: Type = Type {
oid: 604,
descr: "POLYGON - geometric polygon '(pt1,...)'",
name: "polygon",
kind: Kind::Geometric,
};
pub const LINE: Type = Type {
oid: 628,
descr: "LINE - geometric line",
name: "line",
kind: Kind::Geometric,
};
pub const LINE_ARRAY: Type = Type {
oid: 629,
descr: "LINE[]",
name: "_line",
kind: Kind::Array(628),
};
pub const CIDR: Type = Type {
oid: 650,
descr: "CIDR - network IP address/netmask, network address",
name: "cidr",
kind: Kind::Network,
};
pub const CIDR_ARRAY: Type = Type {
oid: 651,
descr: "CIDR[]",
name: "_cidr",
kind: Kind::Array(650),
};
pub const FLOAT4: Type = Type {
oid: 700,
descr: "FLOAT4 - single-precision floating point number, 4-byte storage",
name: "float4",
kind: Kind::Numeric,
};
pub const FLOAT8: Type = Type {
oid: 701,
descr: "FLOAT8 - double-precision floating point number, 8-byte storage",
name: "float8",
kind: Kind::Numeric,
};
pub const UNKNOWN: Type = Type {
oid: 705,
descr: "UNKNOWN - pseudo-type representing an undetermined type",
name: "unknown",
kind: Kind::Unknow,
};
pub const CIRCLE: Type = Type {
oid: 718,
descr: "CIRCLE - geometric circle '(center,radius)'",
name: "circle",
kind: Kind::Geometric,
};
pub const CIRCLE_ARRAY: Type = Type {
oid: 719,
descr: "CIRCLE[]",
name: "_circle",
kind: Kind::Array(718),
};
pub const MACADDR8: Type = Type {
oid: 774,
descr: "MACADDR8 - XX:XX:XX:XX:XX:XX:XX:XX, MAC address",
name: "macaddr8",
kind: Kind::UserDefined,
};
pub const MACADDR8_ARRAY: Type = Type {
oid: 775,
descr: "MACADDR8[]",
name: "_macaddr8",
kind: Kind::Array(774),
};
pub const MONEY: Type = Type {
oid: 790,
descr: "MONEY - monetary amounts, $d,ddd.cc",
name: "money",
kind: Kind::Numeric,
};
pub const MONEY_ARRAY: Type = Type {
oid: 791,
descr: "MONEY[]",
name: "_money",
kind: Kind::Array(790),
};
pub const MACADDR: Type = Type {
oid: 829,
descr: "MACADDR - XX:XX:XX:XX:XX:XX, MAC address",
name: "macaddr",
kind: Kind::UserDefined,
};
pub const INET: Type = Type {
oid: 869,
descr: "INET - IP address/netmask, host address, netmask optional",
name: "inet",
kind: Kind::Network,
};
pub const BOOL_ARRAY: Type = Type {
oid: 1000,
descr: "BOOL[]",
name: "_bool",
kind: Kind::Array(16),
};
pub const BYTEA_ARRAY: Type = Type {
oid: 1001,
descr: "BYTEA[]",
name: "_bytea",
kind: Kind::Array(17),
};
pub const CHAR_ARRAY: Type = Type {
oid: 1002,
descr: "CHAR[]",
name: "_char",
kind: Kind::Array(18),
};
pub const NAME_ARRAY: Type = Type {
oid: 1003,
descr: "NAME[]",
name: "_name",
kind: Kind::Array(19),
};
pub const INT2_ARRAY: Type = Type {
oid: 1005,
descr: "INT2[]",
name: "_int2",
kind: Kind::Array(21),
};
pub const INT2_VECTOR_ARRAY: Type = Type {
oid: 1006,
descr: "INT2VECTOR[]",
name: "_int2vector",
kind: Kind::Array(22),
};
pub const INT4_ARRAY: Type = Type {
oid: 1007,
descr: "INT4[]",
name: "_int4",
kind: Kind::Array(23),
};
pub const REGPROC_ARRAY: Type = Type {
oid: 1008,
descr: "REGPROC[]",
name: "_regproc",
kind: Kind::Array(24),
};
pub const TEXT_ARRAY: Type = Type {
oid: 1009,
descr: "TEXT[]",
name: "_text",
kind: Kind::Array(25),
};
pub const TID_ARRAY: Type = Type {
oid: 1010,
descr: "TID[]",
name: "_tid",
kind: Kind::Array(27),
};
pub const XID_ARRAY: Type = Type {
oid: 1011,
descr: "XID[]",
name: "_xid",
kind: Kind::Array(28),
};
pub const CID_ARRAY: Type = Type {
oid: 1012,
descr: "CID[]",
name: "_cid",
kind: Kind::Array(29),
};
pub const OID_VECTOR_ARRAY: Type = Type {
oid: 1013,
descr: "OIDVECTOR[]",
name: "_oidvector",
kind: Kind::Array(30),
};
pub const BPCHAR_ARRAY: Type = Type {
oid: 1014,
descr: "BPCHAR[]",
name: "_bpchar",
kind: Kind::Array(1042),
};
pub const VARCHAR_ARRAY: Type = Type {
oid: 1015,
descr: "VARCHAR[]",
name: "_varchar",
kind: Kind::Array(1043),
};
pub const INT8_ARRAY: Type = Type {
oid: 1016,
descr: "INT8[]",
name: "_int8",
kind: Kind::Array(20),
};
pub const POINT_ARRAY: Type = Type {
oid: 1017,
descr: "POINT[]",
name: "_point",
kind: Kind::Array(600),
};
pub const LSEG_ARRAY: Type = Type {
oid: 1018,
descr: "LSEG[]",
name: "_lseg",
kind: Kind::Array(601),
};
pub const PATH_ARRAY: Type = Type {
oid: 1019,
descr: "PATH[]",
name: "_path",
kind: Kind::Array(602),
};
pub const BOX_ARRAY: Type = Type {
oid: 1020,
descr: "BOX[]",
name: "_box",
kind: Kind::Array(603),
};
pub const FLOAT4_ARRAY: Type = Type {
oid: 1021,
descr: "FLOAT4[]",
name: "_float4",
kind: Kind::Array(700),
};
pub const FLOAT8_ARRAY: Type = Type {
oid: 1022,
descr: "FLOAT8[]",
name: "_float8",
kind: Kind::Array(701),
};
pub const POLYGON_ARRAY: Type = Type {
oid: 1027,
descr: "POLYGON[]",
name: "_polygon",
kind: Kind::Array(604),
};
pub const OID_ARRAY: Type = Type {
oid: 1028,
descr: "OID[]",
name: "_oid",
kind: Kind::Array(26),
};
pub const ACLITEM: Type = Type {
oid: 1033,
descr: "ACLITEM - access control list",
name: "aclitem",
kind: Kind::UserDefined,
};
pub const ACLITEM_ARRAY: Type = Type {
oid: 1034,
descr: "ACLITEM[]",
name: "_aclitem",
kind: Kind::Array(1033),
};
pub const MACADDR_ARRAY: Type = Type {
oid: 1040,
descr: "MACADDR[]",
name: "_macaddr",
kind: Kind::Array(829),
};
pub const INET_ARRAY: Type = Type {
oid: 1041,
descr: "INET[]",
name: "_inet",
kind: Kind::Array(869),
};
pub const BPCHAR: Type = Type {
oid: 1042,
descr: "BPCHAR - char(length), blank-padded string, fixed storage length",
name: "bpchar",
kind: Kind::String,
};
pub const VARCHAR: Type = Type {
oid: 1043,
descr: "VARCHAR - varchar(length), non-blank-padded string, variable storage length",
name: "varchar",
kind: Kind::String,
};
pub const DATE: Type = Type {
oid: 1082,
descr: "DATE - date",
name: "date",
kind: Kind::DateTime,
};
pub const TIME: Type = Type {
oid: 1083,
descr: "TIME - time of day",
name: "time",
kind: Kind::DateTime,
};
pub const TIMESTAMP: Type = Type {
oid: 1114,
descr: "TIMESTAMP - date and time",
name: "timestamp",
kind: Kind::DateTime,
};
pub const TIMESTAMP_ARRAY: Type = Type {
oid: 1115,
descr: "TIMESTAMP[]",
name: "_timestamp",
kind: Kind::Array(1114),
};
pub const DATE_ARRAY: Type = Type {
oid: 1182,
descr: "DATE[]",
name: "_date",
kind: Kind::Array(1082),
};
pub const TIME_ARRAY: Type = Type {
oid: 1183,
descr: "TIME[]",
name: "_time",
kind: Kind::Array(1083),
};
pub const TIMESTAMPTZ: Type = Type {
oid: 1184,
descr: "TIMESTAMPTZ - date and time with time zone",
name: "timestamptz",
kind: Kind::DateTime,
};
pub const TIMESTAMPTZ_ARRAY: Type = Type {
oid: 1185,
descr: "TIMESTAMPTZ[]",
name: "_timestamptz",
kind: Kind::Array(1184),
};
pub const INTERVAL: Type = Type {
oid: 1186,
descr: "INTERVAL - @ <number> <units>, time interval",
name: "interval",
kind: Kind::Timestamp,
};
pub const INTERVAL_ARRAY: Type = Type {
oid: 1187,
descr: "INTERVAL[]",
name: "_interval",
kind: Kind::Array(1186),
};
pub const NUMERIC_ARRAY: Type = Type {
oid: 1231,
descr: "NUMERIC[]",
name: "_numeric",
kind: Kind::Array(1700),
};
pub const CSTRING_ARRAY: Type = Type {
oid: 1263,
descr: "CSTRING[]",
name: "_cstring",
kind: Kind::Array(2275),
};
pub const TIMETZ: Type = Type {
oid: 1266,
descr: "TIMETZ - time of day with time zone",
name: "timetz",
kind: Kind::DateTime,
};
pub const TIMETZ_ARRAY: Type = Type {
oid: 1270,
descr: "TIMETZ[]",
name: "_timetz",
kind: Kind::Array(1266),
};
pub const BIT: Type = Type {
oid: 1560,
descr: "BIT - fixed-length bit string",
name: "bit",
kind: Kind::BitString,
};
pub const BIT_ARRAY: Type = Type {
oid: 1561,
descr: "BIT[]",
name: "_bit",
kind: Kind::Array(1560),
};
pub const VARBIT: Type = Type {
oid: 1562,
descr: "VARBIT - variable-length bit string",
name: "varbit",
kind: Kind::BitString,
};
pub const VARBIT_ARRAY: Type = Type {
oid: 1563,
descr: "VARBIT[]",
name: "_varbit",
kind: Kind::Array(1562),
};
pub const NUMERIC: Type = Type {
oid: 1700,
descr: "NUMERIC - numeric(precision, decimal), arbitrary precision number",
name: "numeric",
kind: Kind::Numeric,
};
pub const REFCURSOR: Type = Type {
oid: 1790,
descr: "REFCURSOR - reference to cursor (portal name)",
name: "refcursor",
kind: Kind::UserDefined,
};
pub const REFCURSOR_ARRAY: Type = Type {
oid: 2201,
descr: "REFCURSOR[]",
name: "_refcursor",
kind: Kind::Array(1790),
};
pub const REGPROCEDURE: Type = Type {
oid: 2202,
descr: "REGPROCEDURE - registered procedure (with args)",
name: "regprocedure",
kind: Kind::Numeric,
};
pub const REGOPER: Type = Type {
oid: 2203,
descr: "REGOPER - registered operator",
name: "regoper",
kind: Kind::Numeric,
};
pub const REGOPERATOR: Type = Type {
oid: 2204,
descr: "REGOPERATOR - registered operator (with args)",
name: "regoperator",
kind: Kind::Numeric,
};
pub const REGCLASS: Type = Type {
oid: 2205,
descr: "REGCLASS - registered class",
name: "regclass",
kind: Kind::Numeric,
};
pub const REGTYPE: Type = Type {
oid: 2206,
descr: "REGTYPE - registered type",
name: "regtype",
kind: Kind::Numeric,
};
pub const REGPROCEDURE_ARRAY: Type = Type {
oid: 2207,
descr: "REGPROCEDURE[]",
name: "_regprocedure",
kind: Kind::Array(2202),
};
pub const REGOPER_ARRAY: Type = Type {
oid: 2208,
descr: "REGOPER[]",
name: "_regoper",
kind: Kind::Array(2203),
};
pub const REGOPERATOR_ARRAY: Type = Type {
oid: 2209,
descr: "REGOPERATOR[]",
name: "_regoperator",
kind: Kind::Array(2204),
};
pub const REGCLASS_ARRAY: Type = Type {
oid: 2210,
descr: "REGCLASS[]",
name: "_regclass",
kind: Kind::Array(2205),
};
pub const REGTYPE_ARRAY: Type = Type {
oid: 2211,
descr: "REGTYPE[]",
name: "_regtype",
kind: Kind::Array(2206),
};
pub const RECORD: Type = Type {
oid: 2249,
descr: "RECORD - pseudo-type representing any composite type",
name: "record",
kind: Kind::Pseudo,
};
pub const CSTRING: Type = Type {
oid: 2275,
descr: "CSTRING - C-style string",
name: "cstring",
kind: Kind::Pseudo,
};
pub const ANY: Type = Type {
oid: 2276,
descr: "ANY - pseudo-type representing any type",
name: "any",
kind: Kind::Pseudo,
};
pub const ANYARRAY: Type = Type {
oid: 2277,
descr: "ANYARRAY - pseudo-type representing a polymorphic array type",
name: "anyarray",
kind: Kind::Pseudo,
};
pub const VOID: Type = Type {
oid: 2278,
descr: "VOID - pseudo-type for the result of a function with no real result",
name: "void",
kind: Kind::Pseudo,
};
pub const TRIGGER: Type = Type {
oid: 2279,
descr: "TRIGGER - pseudo-type for the result of a trigger function",
name: "trigger",
kind: Kind::Pseudo,
};
pub const LANGUAGE_HANDLER: Type = Type {
oid: 2280,
descr: "LANGUAGE_HANDLER - pseudo-type for the result of a language handler function",
name: "language_handler",
kind: Kind::Pseudo,
};
pub const INTERNAL: Type = Type {
oid: 2281,
descr: "INTERNAL - pseudo-type representing an internal data structure",
name: "internal",
kind: Kind::Pseudo,
};
#[deprecated = "Remove in postgresql 13"]
pub const OPAQUE: Type = Type {
oid: 2282,
descr: "OPAQUE - obsolete, deprecated pseudo-type",
name: "opaque",
kind: Kind::Pseudo,
};
pub const ANYELEMENT: Type = Type {
oid: 2283,
descr: "ANYELEMENT - pseudo-type representing a polymorphic base type",
name: "anyelement",
kind: Kind::Pseudo,
};
pub const RECORD_ARRAY: Type = Type {
oid: 2287,
descr: "RECORD[]",
name: "_record",
kind: Kind::Pseudo,
};
pub const ANYNONARRAY: Type = Type {
oid: 2776,
descr: "ANYNONARRAY - pseudo-type representing a polymorphic base type that is not an array",
name: "anynonarray",
kind: Kind::Pseudo,
};
pub const TXID_SNAPSHOT_ARRAY: Type = Type {
oid: 2949,
descr: "TXID_SNAPSHOT[]",
name: "_txid_snapshot",
kind: Kind::Array(2970),
};
pub const UUID: Type = Type {
oid: 2950,
descr: "UUID - UUID datatype",
name: "uuid",
kind: Kind::UserDefined,
};
pub const UUID_ARRAY: Type = Type {
oid: 2951,
descr: "UUID[]",
name: "_uuid",
kind: Kind::Array(2950),
};
pub const TXID_SNAPSHOT: Type = Type {
oid: 2970,
descr: "TXID_SNAPSHOT - txid snapshot",
name: "txid_snapshot",
kind: Kind::UserDefined,
};
pub const FDW_HANDLER: Type = Type {
oid: 3115,
descr: "FDW_HANDLER - pseudo-type for the result of an FDW handler function",
name: "fdw_handler",
kind: Kind::Pseudo,
};
pub const PG_LSN: Type = Type {
oid: 3220,
descr: "PG_LSN - PostgreSQL LSN datatype",
name: "pg_lsn",
kind: Kind::UserDefined,
};
pub const PG_LSN_ARRAY: Type = Type {
oid: 3221,
descr: "PG_LSN[]",
name: "_pg_lsn",
kind: Kind::Array(3220),
};
pub const TSM_HANDLER: Type = Type {
oid: 3310,
descr: "TSM_HANDLER - pseudo-type for the result of a tablesample method function",
name: "tsm_handler",
kind: Kind::Pseudo,
};
pub const PG_NDISTINCT: Type = Type {
oid: 3361,
descr: "PG_NDISTINCT - multivariate ndistinct coefficients",
name: "pg_ndistinct",
kind: Kind::String,
};
pub const PG_DEPENDENCIES: Type = Type {
oid: 3402,
descr: "PG_DEPENDENCIES - multivariate dependencies",
name: "pg_dependencies",
kind: Kind::String,
};
pub const ANYENUM: Type = Type {
oid: 3500,
descr: "ANYENUM - pseudo-type representing a polymorphic base type that is an enum",
name: "anyenum",
kind: Kind::Pseudo,
};
pub const TS_VECTOR: Type = Type {
oid: 3614,
descr: "TSVECTOR - text representation for text search",
name: "tsvector",
kind: Kind::UserDefined,
};
pub const TSQUERY: Type = Type {
oid: 3615,
descr: "TSQUERY - query representation for text search",
name: "tsquery",
kind: Kind::UserDefined,
};
pub const GTS_VECTOR: Type = Type {
oid: 3642,
descr: "GTSVECTOR - GiST index internal text representation for text search",
name: "gtsvector",
kind: Kind::UserDefined,
};
pub const TS_VECTOR_ARRAY: Type = Type {
oid: 3643,
descr: "TSVECTOR[]",
name: "_tsvector",
kind: Kind::Array(3614),
};
pub const GTS_VECTOR_ARRAY: Type = Type {
oid: 3644,
descr: "GTSVECTOR[]",
name: "_gtsvector",
kind: Kind::Array(3642),
};
pub const TSQUERY_ARRAY: Type = Type {
oid: 3645,
descr: "TSQUERY[]",
name: "_tsquery",
kind: Kind::Array(3615),
};
pub const REGCONFIG: Type = Type {
oid: 3734,
descr: "REGCONFIG - registered text search configuration",
name: "regconfig",
kind: Kind::Numeric,
};
pub const REGCONFIG_ARRAY: Type = Type {
oid: 3735,
descr: "REGCONFIG[]",
name: "_regconfig",
kind: Kind::Array(3734),
};
pub const REGDICTIONARY: Type = Type {
oid: 3769,
descr: "REGDICTIONARY - registered text search dictionary",
name: "regdictionary",
kind: Kind::Numeric,
};
pub const REGDICTIONARY_ARRAY: Type = Type {
oid: 3770,
descr: "REGDICTIONARY[]",
name: "_regdictionary",
kind: Kind::Array(3769),
};
pub const JSONB: Type = Type {
oid: 3802,
descr: "JSONB - Binary JSON",
name: "jsonb",
kind: Kind::UserDefined,
};
pub const JSONB_ARRAY: Type = Type {
oid: 3807,
descr: "JSONB[]",
name: "_jsonb",
kind: Kind::Array(3802),
};
pub const ANY_RANGE: Type = Type {
oid: 3831,
descr: "ANYRANGE - pseudo-type representing a range over a polymorphic base type",
name: "anyrange",
kind: Kind::Pseudo,
};
pub const EVENT_TRIGGER: Type = Type {
oid: 3838,
descr: "EVENT_TRIGGER - pseudo-type for the result of an event trigger function",
name: "event_trigger",
kind: Kind::Pseudo,
};
pub const INT4_RANGE: Type = Type {
oid: 3904,
descr: "INT4RANGE - range of integers",
name: "int4range",
kind: Kind::Range(23),
};
pub const INT4_RANGE_ARRAY: Type = Type {
oid: 3905,
descr: "INT4RANGE[]",
name: "_int4range",
kind: Kind::Array(3904),
};
pub const NUM_RANGE: Type = Type {
oid: 3906,
descr: "NUMRANGE - range of numerics",
name: "numrange",
kind: Kind::Range(1700),
};
pub const NUM_RANGE_ARRAY: Type = Type {
oid: 3907,
descr: "NUMRANGE[]",
name: "_numrange",
kind: Kind::Array(3906),
};
pub const TS_RANGE: Type = Type {
oid: 3908,
descr: "TSRANGE - range of timestamps without time zone",
name: "tsrange",
kind: Kind::Range(1114),
};
pub const TS_RANGE_ARRAY: Type = Type {
oid: 3909,
descr: "TSRANGE[]",
name: "_tsrange",
kind: Kind::Array(3908),
};
pub const TSTZ_RANGE: Type = Type {
oid: 3910,
descr: "TSTZRANGE - range of timestamps with time zone",
name: "tstzrange",
kind: Kind::Range(1184),
};
pub const TSTZ_RANGE_ARRAY: Type = Type {
oid: 3911,
descr: "TSTZRANGE[]",
name: "_tstzrange",
kind: Kind::Array(3910),
};
pub const DATE_RANGE: Type = Type {
oid: 3912,
descr: "DATERANGE - range of dates",
name: "daterange",
kind: Kind::Range(1082),
};
pub const DATE_RANGE_ARRAY: Type = Type {
oid: 3913,
descr: "DATERANGE[]",
name: "_daterange",
kind: Kind::Array(3912),
};
pub const INT8_RANGE: Type = Type {
oid: 3926,
descr: "INT8RANGE - range of bigints",
name: "int8range",
kind: Kind::Range(20),
};
pub const INT8_RANGE_ARRAY: Type = Type {
oid: 3927,
descr: "INT8RANGE[]",
name: "_int8range",
kind: Kind::Array(3926),
};
pub const JSONPATH: Type = Type {
oid: 4072,
descr: "JSONPATH - JSON path",
name: "jsonpath",
kind: Kind::UserDefined,
};
pub const JSONPATH_ARRAY: Type = Type {
oid: 4073,
descr: "JSONPATH[]",
name: "_jsonpath",
kind: Kind::Array(4072),
};
pub const REGNAMESPACE: Type = Type {
oid: 4089,
descr: "REGNAMESPACE - registered namespace",
name: "regnamespace",
kind: Kind::Numeric,
};
pub const REGNAMESPACE_ARRAY: Type = Type {
oid: 4090,
descr: "REGNAMESPACE[]",
name: "_regnamespace",
kind: Kind::Array(4089),
};
pub const REGROLE: Type = Type {
oid: 4096,
descr: "REGROLE - registered role",
name: "regrole",
kind: Kind::Numeric,
};
pub const REGROLE_ARRAY: Type = Type {
oid: 4097,
descr: "REGROLE[]",
name: "_regrole",
kind: Kind::Array(4096),
};
pub const REGCOLLATION: Type = Type {
oid: 4191,
descr: "REGCOLLATION - registered collation",
name: "regcollation",
kind: Kind::Numeric,
};
pub const REGCOLLATION_ARRAY: Type = Type {
oid: 4192,
descr: "REGCOLLATION[]",
name: "_regcollation",
kind: Kind::Array(4191),
};
pub const PG_MCV_LIST: Type = Type {
oid: 5017,
descr: "PG_MCV_LIST - multivariate MCV list",
name: "pg_mcv_list",
kind: Kind::String,
};
pub const PG_SNAPSHOT: Type = Type {
oid: 5038,
descr: "PG_SNAPSHOT - snapshot",
name: "pg_snapshot",
kind: Kind::UserDefined,
};
pub const PG_SNAPSHOT_ARRAY: Type = Type {
oid: 5039,
descr: "PG_SNAPSHOT[]",
name: "_pg_snapshot",
kind: Kind::Array(5038),
};
pub const XID8: Type = Type {
oid: 5069,
descr: "XID8 - full transaction id",
name: "xid8",
kind: Kind::UserDefined,
};
pub const ANYCOMPATIBLE: Type = Type {
oid: 5077,
descr: "ANYCOMPATIBLE - pseudo-type representing a polymorphic common type",
name: "anycompatible",
kind: Kind::Pseudo,
};
pub const ANYCOMPATIBLEARRAY: Type = Type {
oid: 5078,
descr: "ANYCOMPATIBLEARRAY - pseudo-type representing an array of polymorphic common type elements",
name: "anycompatiblearray",
kind: Kind::Pseudo,
};
pub const ANYCOMPATIBLENONARRAY: Type = Type {
oid: 5079,
descr: "ANYCOMPATIBLENONARRAY - pseudo-type representing a polymorphic common type that is not an array",
name: "anycompatiblenonarray",
kind: Kind::Pseudo,
};
pub const ANYCOMPATIBLE_RANGE: Type = Type {
oid: 5080,
descr: "ANYCOMPATIBLERANGE - pseudo-type representing a range over a polymorphic common type",
name: "anycompatiblerange",
kind: Kind::Pseudo,
};
impl std::convert::TryFrom<u32> for Type {
type Error = String;
fn try_from(oid: u32) -> std::result::Result<Self, Self::Error> {
match oid {
16 => Ok(BOOL),
17 => Ok(BYTEA),
18 => Ok(CHAR),
19 => Ok(NAME),
20 => Ok(INT8),
21 => Ok(INT2),
22 => Ok(INT2_VECTOR),
23 => Ok(INT4),
24 => Ok(REGPROC),
25 => Ok(TEXT),
26 => Ok(OID),
27 => Ok(TID),
28 => Ok(XID),
29 => Ok(CID),
30 => Ok(OID_VECTOR),
32 => Ok(PG_DDL_COMMAND),
114 => Ok(JSON),
142 => Ok(XML),
143 => Ok(XML_ARRAY),
194 => Ok(PG_NODE_TREE),
199 => Ok(JSON_ARRAY),
269 => Ok(TABLE_AM_HANDLER),
271 => Ok(XID8_ARRAY),
325 => Ok(INDEX_AM_HANDLER),
600 => Ok(POINT),
601 => Ok(LSEG),
602 => Ok(PATH),
603 => Ok(BOX),
604 => Ok(POLYGON),
628 => Ok(LINE),
629 => Ok(LINE_ARRAY),
650 => Ok(CIDR),
651 => Ok(CIDR_ARRAY),
700 => Ok(FLOAT4),
701 => Ok(FLOAT8),
705 => Ok(UNKNOWN),
718 => Ok(CIRCLE),
719 => Ok(CIRCLE_ARRAY),
774 => Ok(MACADDR8),
775 => Ok(MACADDR8_ARRAY),
790 => Ok(MONEY),
791 => Ok(MONEY_ARRAY),
829 => Ok(MACADDR),
869 => Ok(INET),
1000 => Ok(BOOL_ARRAY),
1001 => Ok(BYTEA_ARRAY),
1002 => Ok(CHAR_ARRAY),
1003 => Ok(NAME_ARRAY),
1005 => Ok(INT2_ARRAY),
1006 => Ok(INT2_VECTOR_ARRAY),
1007 => Ok(INT4_ARRAY),
1008 => Ok(REGPROC_ARRAY),
1009 => Ok(TEXT_ARRAY),
1010 => Ok(TID_ARRAY),
1011 => Ok(XID_ARRAY),
1012 => Ok(CID_ARRAY),
1013 => Ok(OID_VECTOR_ARRAY),
1014 => Ok(BPCHAR_ARRAY),
1015 => Ok(VARCHAR_ARRAY),
1016 => Ok(INT8_ARRAY),
1017 => Ok(POINT_ARRAY),
1018 => Ok(LSEG_ARRAY),
1019 => Ok(PATH_ARRAY),
1020 => Ok(BOX_ARRAY),
1021 => Ok(FLOAT4_ARRAY),
1022 => Ok(FLOAT8_ARRAY),
1027 => Ok(POLYGON_ARRAY),
1028 => Ok(OID_ARRAY),
1033 => Ok(ACLITEM),
1034 => Ok(ACLITEM_ARRAY),
1040 => Ok(MACADDR_ARRAY),
1041 => Ok(INET_ARRAY),
1042 => Ok(BPCHAR),
1043 => Ok(VARCHAR),
1082 => Ok(DATE),
1083 => Ok(TIME),
1114 => Ok(TIMESTAMP),
1115 => Ok(TIMESTAMP_ARRAY),
1182 => Ok(DATE_ARRAY),
1183 => Ok(TIME_ARRAY),
1184 => Ok(TIMESTAMPTZ),
1185 => Ok(TIMESTAMPTZ_ARRAY),
1186 => Ok(INTERVAL),
1187 => Ok(INTERVAL_ARRAY),
1231 => Ok(NUMERIC_ARRAY),
1263 => Ok(CSTRING_ARRAY),
1266 => Ok(TIMETZ),
1270 => Ok(TIMETZ_ARRAY),
1560 => Ok(BIT),
1561 => Ok(BIT_ARRAY),
1562 => Ok(VARBIT),
1563 => Ok(VARBIT_ARRAY),
1700 => Ok(NUMERIC),
1790 => Ok(REFCURSOR),
2201 => Ok(REFCURSOR_ARRAY),
2202 => Ok(REGPROCEDURE),
2203 => Ok(REGOPER),
2204 => Ok(REGOPERATOR),
2205 => Ok(REGCLASS),
2206 => Ok(REGTYPE),
2207 => Ok(REGPROCEDURE_ARRAY),
2208 => Ok(REGOPER_ARRAY),
2209 => Ok(REGOPERATOR_ARRAY),
2210 => Ok(REGCLASS_ARRAY),
2211 => Ok(REGTYPE_ARRAY),
2249 => Ok(RECORD),
2275 => Ok(CSTRING),
2276 => Ok(ANY),
2277 => Ok(ANYARRAY),
2278 => Ok(VOID),
2279 => Ok(TRIGGER),
2280 => Ok(LANGUAGE_HANDLER),
2281 => Ok(INTERNAL),
#[allow(deprecated)]
2282 => Ok(OPAQUE),
2283 => Ok(ANYELEMENT),
2287 => Ok(RECORD_ARRAY),
2776 => Ok(ANYNONARRAY),
2949 => Ok(TXID_SNAPSHOT_ARRAY),
2950 => Ok(UUID),
2951 => Ok(UUID_ARRAY),
2970 => Ok(TXID_SNAPSHOT),
3115 => Ok(FDW_HANDLER),
3220 => Ok(PG_LSN),
3221 => Ok(PG_LSN_ARRAY),
3310 => Ok(TSM_HANDLER),
3361 => Ok(PG_NDISTINCT),
3402 => Ok(PG_DEPENDENCIES),
3500 => Ok(ANYENUM),
3614 => Ok(TS_VECTOR),
3615 => Ok(TSQUERY),
3642 => Ok(GTS_VECTOR),
3643 => Ok(TS_VECTOR_ARRAY),
3644 => Ok(GTS_VECTOR_ARRAY),
3645 => Ok(TSQUERY_ARRAY),
3734 => Ok(REGCONFIG),
3735 => Ok(REGCONFIG_ARRAY),
3769 => Ok(REGDICTIONARY),
3770 => Ok(REGDICTIONARY_ARRAY),
3802 => Ok(JSONB),
3807 => Ok(JSONB_ARRAY),
3831 => Ok(ANY_RANGE),
3838 => Ok(EVENT_TRIGGER),
3904 => Ok(INT4_RANGE),
3905 => Ok(INT4_RANGE_ARRAY),
3906 => Ok(NUM_RANGE),
3907 => Ok(NUM_RANGE_ARRAY),
3908 => Ok(TS_RANGE),
3909 => Ok(TS_RANGE_ARRAY),
3910 => Ok(TSTZ_RANGE),
3911 => Ok(TSTZ_RANGE_ARRAY),
3912 => Ok(DATE_RANGE),
3913 => Ok(DATE_RANGE_ARRAY),
3926 => Ok(INT8_RANGE),
3927 => Ok(INT8_RANGE_ARRAY),
4072 => Ok(JSONPATH),
4073 => Ok(JSONPATH_ARRAY),
4089 => Ok(REGNAMESPACE),
4090 => Ok(REGNAMESPACE_ARRAY),
4096 => Ok(REGROLE),
4097 => Ok(REGROLE_ARRAY),
4191 => Ok(REGCOLLATION),
4192 => Ok(REGCOLLATION_ARRAY),
5017 => Ok(PG_MCV_LIST),
5038 => Ok(PG_SNAPSHOT),
5039 => Ok(PG_SNAPSHOT_ARRAY),
5069 => Ok(XID8),
5077 => Ok(ANYCOMPATIBLE),
5078 => Ok(ANYCOMPATIBLEARRAY),
5079 => Ok(ANYCOMPATIBLENONARRAY),
5080 => Ok(ANYCOMPATIBLE_RANGE),
_ => Err("unknow type".to_string()),
}
}
}
impl std::str::FromStr for Type {
type Err = String;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
match s {
"bool" => Ok(BOOL),
"bytea" => Ok(BYTEA),
"char" => Ok(CHAR),
"name" => Ok(NAME),
"int8" => Ok(INT8),
"int2" => Ok(INT2),
"int2vector" => Ok(INT2_VECTOR),
"int4" => Ok(INT4),
"regproc" => Ok(REGPROC),
"text" => Ok(TEXT),
"oid" => Ok(OID),
"tid" => Ok(TID),
"xid" => Ok(XID),
"cid" => Ok(CID),
"oidvector" => Ok(OID_VECTOR),
"pg_ddl_command" => Ok(PG_DDL_COMMAND),
"json" => Ok(JSON),
"xml" => Ok(XML),
"_xml" => Ok(XML_ARRAY),
"pg_node_tree" => Ok(PG_NODE_TREE),
"_json" => Ok(JSON_ARRAY),
"table_am_handler" => Ok(TABLE_AM_HANDLER),
"_xid8" => Ok(XID8_ARRAY),
"index_am_handler" => Ok(INDEX_AM_HANDLER),
"point" => Ok(POINT),
"lseg" => Ok(LSEG),
"path" => Ok(PATH),
"box" => Ok(BOX),
"polygon" => Ok(POLYGON),
"line" => Ok(LINE),
"_line" => Ok(LINE_ARRAY),
"cidr" => Ok(CIDR),
"_cidr" => Ok(CIDR_ARRAY),
"float4" => Ok(FLOAT4),
"float8" => Ok(FLOAT8),
"unknown" => Ok(UNKNOWN),
"circle" => Ok(CIRCLE),
"_circle" => Ok(CIRCLE_ARRAY),
"macaddr8" => Ok(MACADDR8),
"_macaddr8" => Ok(MACADDR8_ARRAY),
"money" => Ok(MONEY),
"_money" => Ok(MONEY_ARRAY),
"macaddr" => Ok(MACADDR),
"inet" => Ok(INET),
"_bool" => Ok(BOOL_ARRAY),
"_bytea" => Ok(BYTEA_ARRAY),
"_char" => Ok(CHAR_ARRAY),
"_name" => Ok(NAME_ARRAY),
"_int2" => Ok(INT2_ARRAY),
"_int2vector" => Ok(INT2_VECTOR_ARRAY),
"_int4" => Ok(INT4_ARRAY),
"_regproc" => Ok(REGPROC_ARRAY),
"_text" => Ok(TEXT_ARRAY),
"_tid" => Ok(TID_ARRAY),
"_xid" => Ok(XID_ARRAY),
"_cid" => Ok(CID_ARRAY),
"_oidvector" => Ok(OID_VECTOR_ARRAY),
"_bpchar" => Ok(BPCHAR_ARRAY),
"_varchar" => Ok(VARCHAR_ARRAY),
"_int8" => Ok(INT8_ARRAY),
"_point" => Ok(POINT_ARRAY),
"_lseg" => Ok(LSEG_ARRAY),
"_path" => Ok(PATH_ARRAY),
"_box" => Ok(BOX_ARRAY),
"_float4" => Ok(FLOAT4_ARRAY),
"_float8" => Ok(FLOAT8_ARRAY),
"_polygon" => Ok(POLYGON_ARRAY),
"_oid" => Ok(OID_ARRAY),
"aclitem" => Ok(ACLITEM),
"_aclitem" => Ok(ACLITEM_ARRAY),
"_macaddr" => Ok(MACADDR_ARRAY),
"_inet" => Ok(INET_ARRAY),
"bpchar" => Ok(BPCHAR),
"varchar" => Ok(VARCHAR),
"date" => Ok(DATE),
"time" => Ok(TIME),
"timestamp" => Ok(TIMESTAMP),
"_timestamp" => Ok(TIMESTAMP_ARRAY),
"_date" => Ok(DATE_ARRAY),
"_time" => Ok(TIME_ARRAY),
"timestamptz" => Ok(TIMESTAMPTZ),
"_timestamptz" => Ok(TIMESTAMPTZ_ARRAY),
"interval" => Ok(INTERVAL),
"_interval" => Ok(INTERVAL_ARRAY),
"_numeric" => Ok(NUMERIC_ARRAY),
"_cstring" => Ok(CSTRING_ARRAY),
"timetz" => Ok(TIMETZ),
"_timetz" => Ok(TIMETZ_ARRAY),
"bit" => Ok(BIT),
"_bit" => Ok(BIT_ARRAY),
"varbit" => Ok(VARBIT),
"_varbit" => Ok(VARBIT_ARRAY),
"numeric" => Ok(NUMERIC),
"refcursor" => Ok(REFCURSOR),
"_refcursor" => Ok(REFCURSOR_ARRAY),
"regprocedure" => Ok(REGPROCEDURE),
"regoper" => Ok(REGOPER),
"regoperator" => Ok(REGOPERATOR),
"regclass" => Ok(REGCLASS),
"regtype" => Ok(REGTYPE),
"_regprocedure" => Ok(REGPROCEDURE_ARRAY),
"_regoper" => Ok(REGOPER_ARRAY),
"_regoperator" => Ok(REGOPERATOR_ARRAY),
"_regclass" => Ok(REGCLASS_ARRAY),
"_regtype" => Ok(REGTYPE_ARRAY),
"record" => Ok(RECORD),
"cstring" => Ok(CSTRING),
"any" => Ok(ANY),
"anyarray" => Ok(ANYARRAY),
"void" => Ok(VOID),
"trigger" => Ok(TRIGGER),
"language_handler" => Ok(LANGUAGE_HANDLER),
"internal" => Ok(INTERNAL),
#[allow(deprecated)]
"opaque" => Ok(OPAQUE),
"anyelement" => Ok(ANYELEMENT),
"_record" => Ok(RECORD_ARRAY),
"anynonarray" => Ok(ANYNONARRAY),
"_txid_snapshot" => Ok(TXID_SNAPSHOT_ARRAY),
"uuid" => Ok(UUID),
"_uuid" => Ok(UUID_ARRAY),
"txid_snapshot" => Ok(TXID_SNAPSHOT),
"fdw_handler" => Ok(FDW_HANDLER),
"pg_lsn" => Ok(PG_LSN),
"_pg_lsn" => Ok(PG_LSN_ARRAY),
"tsm_handler" => Ok(TSM_HANDLER),
"pg_ndistinct" => Ok(PG_NDISTINCT),
"pg_dependencies" => Ok(PG_DEPENDENCIES),
"anyenum" => Ok(ANYENUM),
"tsvector" => Ok(TS_VECTOR),
"tsquery" => Ok(TSQUERY),
"gtsvector" => Ok(GTS_VECTOR),
"_tsvector" => Ok(TS_VECTOR_ARRAY),
"_gtsvector" => Ok(GTS_VECTOR_ARRAY),
"_tsquery" => Ok(TSQUERY_ARRAY),
"regconfig" => Ok(REGCONFIG),
"_regconfig" => Ok(REGCONFIG_ARRAY),
"regdictionary" => Ok(REGDICTIONARY),
"_regdictionary" => Ok(REGDICTIONARY_ARRAY),
"jsonb" => Ok(JSONB),
"_jsonb" => Ok(JSONB_ARRAY),
"anyrange" => Ok(ANY_RANGE),
"event_trigger" => Ok(EVENT_TRIGGER),
"int4range" => Ok(INT4_RANGE),
"_int4range" => Ok(INT4_RANGE_ARRAY),
"numrange" => Ok(NUM_RANGE),
"_numrange" => Ok(NUM_RANGE_ARRAY),
"tsrange" => Ok(TS_RANGE),
"_tsrange" => Ok(TS_RANGE_ARRAY),
"tstzrange" => Ok(TSTZ_RANGE),
"_tstzrange" => Ok(TSTZ_RANGE_ARRAY),
"daterange" => Ok(DATE_RANGE),
"_daterange" => Ok(DATE_RANGE_ARRAY),
"int8range" => Ok(INT8_RANGE),
"_int8range" => Ok(INT8_RANGE_ARRAY),
"jsonpath" => Ok(JSONPATH),
"_jsonpath" => Ok(JSONPATH_ARRAY),
"regnamespace" => Ok(REGNAMESPACE),
"_regnamespace" => Ok(REGNAMESPACE_ARRAY),
"regrole" => Ok(REGROLE),
"_regrole" => Ok(REGROLE_ARRAY),
"regcollation" => Ok(REGCOLLATION),
"_regcollation" => Ok(REGCOLLATION_ARRAY),
"pg_mcv_list" => Ok(PG_MCV_LIST),
"pg_snapshot" => Ok(PG_SNAPSHOT),
"_pg_snapshot" => Ok(PG_SNAPSHOT_ARRAY),
"xid8" => Ok(XID8),
"anycompatible" => Ok(ANYCOMPATIBLE),
"anycompatiblearray" => Ok(ANYCOMPATIBLEARRAY),
"anycompatiblenonarray" => Ok(ANYCOMPATIBLENONARRAY),
"anycompatiblerange" => Ok(ANYCOMPATIBLE_RANGE),
_ => Err("unknow type".to_string()),
}
}
}