UNPKG

pg-types

Version:

Query result type converters for node-postgres

101 lines (96 loc) 2.28 kB
/** PostgreSQL builtin type OIDs (TypeScript definitions) DO NOT EDIT THIS FILE BY HAND! This file is generated automatically by the generator in generator/generate.js To modify the types, edit the generator script and run: npm run generate Generated by querying PostgreSQL 11, 14 to ensure comprehensive type coverage for parsing. Query used: SELECT json_object_agg(UPPER(PT.typname), PT.oid::int4 ORDER BY pt.oid) FROM pg_type PT WHERE typnamespace = (SELECT pgn.oid FROM pg_namespace pgn WHERE nspname = 'pg_catalog') -- Take only builting Postgres types with stable OID (extension types are not guaranted to be stable) AND typtype IN ('b', 'r', 'm') -- Only basic (b), range (r), and multirange (m) types AND typelem = 0 -- Ignore aliases AND typisdefined -- Ignore undefined types */ export enum builtins { BOOL = 16, BYTEA = 17, CHAR = 18, INT8 = 20, INT2 = 21, INT4 = 23, REGPROC = 24, TEXT = 25, OID = 26, TID = 27, XID = 28, CID = 29, JSON = 114, XML = 142, PG_NODE_TREE = 194, SMGR = 210, PATH = 602, POLYGON = 604, CIDR = 650, FLOAT4 = 700, FLOAT8 = 701, ABSTIME = 702, RELTIME = 703, TINTERVAL = 704, CIRCLE = 718, MACADDR8 = 774, MONEY = 790, MACADDR = 829, INET = 869, ACLITEM = 1033, BPCHAR = 1042, VARCHAR = 1043, DATE = 1082, TIME = 1083, TIMESTAMP = 1114, TIMESTAMPTZ = 1184, INTERVAL = 1186, TIMETZ = 1266, BIT = 1560, VARBIT = 1562, NUMERIC = 1700, REFCURSOR = 1790, REGPROCEDURE = 2202, REGOPER = 2203, REGOPERATOR = 2204, REGCLASS = 2205, REGTYPE = 2206, UUID = 2950, TXID_SNAPSHOT = 2970, PG_LSN = 3220, PG_NDISTINCT = 3361, PG_DEPENDENCIES = 3402, TSVECTOR = 3614, TSQUERY = 3615, GTSVECTOR = 3642, REGCONFIG = 3734, REGDICTIONARY = 3769, JSONB = 3802, INT4RANGE = 3904, NUMRANGE = 3906, TSRANGE = 3908, TSTZRANGE = 3910, DATERANGE = 3912, INT8RANGE = 3926, JSONPATH = 4072, REGNAMESPACE = 4089, REGROLE = 4096, REGCOLLATION = 4191, INT4MULTIRANGE = 4451, NUMMULTIRANGE = 4532, TSMULTIRANGE = 4533, TSTZMULTIRANGE = 4534, DATEMULTIRANGE = 4535, INT8MULTIRANGE = 4536, PG_BRIN_BLOOM_SUMMARY = 4600, PG_BRIN_MINMAX_MULTI_SUMMARY = 4601, PG_MCV_LIST = 5017, PG_SNAPSHOT = 5038, XID8 = 5069 }