/*
 * This file is autogenerated by ./scripts/extract_pg_types.rb
 *
 * It provides inline pg_type data for the SearchSysCache1 / GetSysCacheOid
 * mocks used when running the Postgres parser outside of a backend.
 */

#ifndef PG_QUERY_PG_TYPE_C
#define PG_QUERY_PG_TYPE_C

typedef struct PgQueryBuiltinType
{
	Oid		oid;
	const char *typname;
	int16		typlen;
	bool		typbyval;
	char		typtype;
	char		typcategory;
	char		typalign;
	Oid		typarray;
	Oid		typcollation;
} PgQueryBuiltinType;

static const PgQueryBuiltinType pg_query_builtin_types[] = {
	{ BOOLOID, "bool", 1, true, TYPTYPE_BASE, TYPCATEGORY_BOOLEAN, TYPALIGN_CHAR, BOOLARRAYOID, InvalidOid },
	{ BYTEAOID, "bytea", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, BYTEAARRAYOID, InvalidOid },
	{ CHAROID, "char", 1, true, TYPTYPE_BASE, TYPCATEGORY_INTERNAL, TYPALIGN_CHAR, CHARARRAYOID, InvalidOid },
	{ NAMEOID, "name", NAMEDATALEN, false, TYPTYPE_BASE, TYPCATEGORY_STRING, TYPALIGN_CHAR, NAMEARRAYOID, C_COLLATION_OID },
	{ INT8OID, "int8", 8, FLOAT8PASSBYVAL, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_DOUBLE, INT8ARRAYOID, InvalidOid },
	{ INT2OID, "int2", 2, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_SHORT, INT2ARRAYOID, InvalidOid },
	{ INT2VECTOROID, "int2vector", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, INT2VECTORARRAYOID, InvalidOid },
	{ INT4OID, "int4", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, INT4ARRAYOID, InvalidOid },
	{ REGPROCOID, "regproc", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGPROCARRAYOID, InvalidOid },
	{ TEXTOID, "text", -1, false, TYPTYPE_BASE, TYPCATEGORY_STRING, TYPALIGN_INT, TEXTARRAYOID, DEFAULT_COLLATION_OID },
	{ OIDOID, "oid", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, OIDARRAYOID, InvalidOid },
	{ TIDOID, "tid", 6, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_SHORT, TIDARRAYOID, InvalidOid },
	{ XIDOID, "xid", 4, true, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, XIDARRAYOID, InvalidOid },
	{ CIDOID, "cid", 4, true, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, CIDARRAYOID, InvalidOid },
	{ OIDVECTOROID, "oidvector", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, OIDVECTORARRAYOID, InvalidOid },
	{ 71, "pg_type", -1, false, TYPTYPE_COMPOSITE, TYPCATEGORY_COMPOSITE, TYPALIGN_DOUBLE, PG_TYPEARRAYOID, InvalidOid },
	{ 75, "pg_attribute", -1, false, TYPTYPE_COMPOSITE, TYPCATEGORY_COMPOSITE, TYPALIGN_DOUBLE, PG_ATTRIBUTEARRAYOID, InvalidOid },
	{ 81, "pg_proc", -1, false, TYPTYPE_COMPOSITE, TYPCATEGORY_COMPOSITE, TYPALIGN_DOUBLE, PG_PROCARRAYOID, InvalidOid },
	{ 83, "pg_class", -1, false, TYPTYPE_COMPOSITE, TYPCATEGORY_COMPOSITE, TYPALIGN_DOUBLE, PG_CLASSARRAYOID, InvalidOid },
	{ JSONOID, "json", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, JSONARRAYOID, InvalidOid },
	{ XMLOID, "xml", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, XMLARRAYOID, InvalidOid },
	{ PG_NODE_TREEOID, "pg_node_tree", -1, false, TYPTYPE_BASE, TYPCATEGORY_INTERNAL, TYPALIGN_INT, InvalidOid, DEFAULT_COLLATION_OID },
	{ PG_NDISTINCTOID, "pg_ndistinct", -1, false, TYPTYPE_BASE, TYPCATEGORY_INTERNAL, TYPALIGN_INT, InvalidOid, DEFAULT_COLLATION_OID },
	{ PG_DEPENDENCIESOID, "pg_dependencies", -1, false, TYPTYPE_BASE, TYPCATEGORY_INTERNAL, TYPALIGN_INT, InvalidOid, DEFAULT_COLLATION_OID },
	{ PG_MCV_LISTOID, "pg_mcv_list", -1, false, TYPTYPE_BASE, TYPCATEGORY_INTERNAL, TYPALIGN_INT, InvalidOid, DEFAULT_COLLATION_OID },
	{ PG_DDL_COMMANDOID, "pg_ddl_command", sizeof(void *), true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, (SIZEOF_VOID_P == 8 ? TYPALIGN_DOUBLE : TYPALIGN_INT), InvalidOid, InvalidOid },
	{ XID8OID, "xid8", 8, FLOAT8PASSBYVAL, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_DOUBLE, XID8ARRAYOID, InvalidOid },
	{ POINTOID, "point", 16, false, TYPTYPE_BASE, TYPCATEGORY_GEOMETRIC, TYPALIGN_DOUBLE, POINTARRAYOID, InvalidOid },
	{ LSEGOID, "lseg", 32, false, TYPTYPE_BASE, TYPCATEGORY_GEOMETRIC, TYPALIGN_DOUBLE, LSEGARRAYOID, InvalidOid },
	{ PATHOID, "path", -1, false, TYPTYPE_BASE, TYPCATEGORY_GEOMETRIC, TYPALIGN_DOUBLE, PATHARRAYOID, InvalidOid },
	{ BOXOID, "box", 32, false, TYPTYPE_BASE, TYPCATEGORY_GEOMETRIC, TYPALIGN_DOUBLE, BOXARRAYOID, InvalidOid },
	{ POLYGONOID, "polygon", -1, false, TYPTYPE_BASE, TYPCATEGORY_GEOMETRIC, TYPALIGN_DOUBLE, POLYGONARRAYOID, InvalidOid },
	{ LINEOID, "line", 24, false, TYPTYPE_BASE, TYPCATEGORY_GEOMETRIC, TYPALIGN_DOUBLE, LINEARRAYOID, InvalidOid },
	{ FLOAT4OID, "float4", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, FLOAT4ARRAYOID, InvalidOid },
	{ FLOAT8OID, "float8", 8, FLOAT8PASSBYVAL, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_DOUBLE, FLOAT8ARRAYOID, InvalidOid },
	{ UNKNOWNOID, "unknown", -2, false, TYPTYPE_PSEUDO, TYPCATEGORY_UNKNOWN, TYPALIGN_CHAR, InvalidOid, InvalidOid },
	{ CIRCLEOID, "circle", 24, false, TYPTYPE_BASE, TYPCATEGORY_GEOMETRIC, TYPALIGN_DOUBLE, CIRCLEARRAYOID, InvalidOid },
	{ MONEYOID, "money", 8, FLOAT8PASSBYVAL, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_DOUBLE, MONEYARRAYOID, InvalidOid },
	{ MACADDROID, "macaddr", 6, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, MACADDRARRAYOID, InvalidOid },
	{ INETOID, "inet", -1, false, TYPTYPE_BASE, TYPCATEGORY_NETWORK, TYPALIGN_INT, INETARRAYOID, InvalidOid },
	{ CIDROID, "cidr", -1, false, TYPTYPE_BASE, TYPCATEGORY_NETWORK, TYPALIGN_INT, CIDRARRAYOID, InvalidOid },
	{ MACADDR8OID, "macaddr8", 8, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, MACADDR8ARRAYOID, InvalidOid },
	{ ACLITEMOID, "aclitem", 16, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_DOUBLE, ACLITEMARRAYOID, InvalidOid },
	{ BPCHAROID, "bpchar", -1, false, TYPTYPE_BASE, TYPCATEGORY_STRING, TYPALIGN_INT, BPCHARARRAYOID, DEFAULT_COLLATION_OID },
	{ VARCHAROID, "varchar", -1, false, TYPTYPE_BASE, TYPCATEGORY_STRING, TYPALIGN_INT, VARCHARARRAYOID, DEFAULT_COLLATION_OID },
	{ DATEOID, "date", 4, true, TYPTYPE_BASE, TYPCATEGORY_DATETIME, TYPALIGN_INT, DATEARRAYOID, InvalidOid },
	{ TIMEOID, "time", 8, FLOAT8PASSBYVAL, TYPTYPE_BASE, TYPCATEGORY_DATETIME, TYPALIGN_DOUBLE, TIMEARRAYOID, InvalidOid },
	{ TIMESTAMPOID, "timestamp", 8, FLOAT8PASSBYVAL, TYPTYPE_BASE, TYPCATEGORY_DATETIME, TYPALIGN_DOUBLE, TIMESTAMPARRAYOID, InvalidOid },
	{ TIMESTAMPTZOID, "timestamptz", 8, FLOAT8PASSBYVAL, TYPTYPE_BASE, TYPCATEGORY_DATETIME, TYPALIGN_DOUBLE, TIMESTAMPTZARRAYOID, InvalidOid },
	{ INTERVALOID, "interval", 16, false, TYPTYPE_BASE, TYPCATEGORY_TIMESPAN, TYPALIGN_DOUBLE, INTERVALARRAYOID, InvalidOid },
	{ TIMETZOID, "timetz", 12, false, TYPTYPE_BASE, TYPCATEGORY_DATETIME, TYPALIGN_DOUBLE, TIMETZARRAYOID, InvalidOid },
	{ BITOID, "bit", -1, false, TYPTYPE_BASE, TYPCATEGORY_BITSTRING, TYPALIGN_INT, BITARRAYOID, InvalidOid },
	{ VARBITOID, "varbit", -1, false, TYPTYPE_BASE, TYPCATEGORY_BITSTRING, TYPALIGN_INT, VARBITARRAYOID, InvalidOid },
	{ NUMERICOID, "numeric", -1, false, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, NUMERICARRAYOID, InvalidOid },
	{ REFCURSOROID, "refcursor", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, REFCURSORARRAYOID, InvalidOid },
	{ REGPROCEDUREOID, "regprocedure", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGPROCEDUREARRAYOID, InvalidOid },
	{ REGOPEROID, "regoper", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGOPERARRAYOID, InvalidOid },
	{ REGOPERATOROID, "regoperator", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGOPERATORARRAYOID, InvalidOid },
	{ REGCLASSOID, "regclass", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGCLASSARRAYOID, InvalidOid },
	{ REGCOLLATIONOID, "regcollation", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGCOLLATIONARRAYOID, InvalidOid },
	{ REGTYPEOID, "regtype", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGTYPEARRAYOID, InvalidOid },
	{ REGROLEOID, "regrole", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGROLEARRAYOID, InvalidOid },
	{ REGNAMESPACEOID, "regnamespace", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGNAMESPACEARRAYOID, InvalidOid },
	{ UUIDOID, "uuid", 16, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_CHAR, UUIDARRAYOID, InvalidOid },
	{ PG_LSNOID, "pg_lsn", 8, FLOAT8PASSBYVAL, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_DOUBLE, PG_LSNARRAYOID, InvalidOid },
	{ TSVECTOROID, "tsvector", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, TSVECTORARRAYOID, InvalidOid },
	{ GTSVECTOROID, "gtsvector", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, GTSVECTORARRAYOID, InvalidOid },
	{ TSQUERYOID, "tsquery", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, TSQUERYARRAYOID, InvalidOid },
	{ REGCONFIGOID, "regconfig", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGCONFIGARRAYOID, InvalidOid },
	{ REGDICTIONARYOID, "regdictionary", 4, true, TYPTYPE_BASE, TYPCATEGORY_NUMERIC, TYPALIGN_INT, REGDICTIONARYARRAYOID, InvalidOid },
	{ JSONBOID, "jsonb", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, JSONBARRAYOID, InvalidOid },
	{ JSONPATHOID, "jsonpath", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_INT, JSONPATHARRAYOID, InvalidOid },
	{ TXID_SNAPSHOTOID, "txid_snapshot", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_DOUBLE, TXID_SNAPSHOTARRAYOID, InvalidOid },
	{ PG_SNAPSHOTOID, "pg_snapshot", -1, false, TYPTYPE_BASE, TYPCATEGORY_USER, TYPALIGN_DOUBLE, PG_SNAPSHOTARRAYOID, InvalidOid },
	{ INT4RANGEOID, "int4range", -1, false, TYPTYPE_RANGE, TYPCATEGORY_RANGE, TYPALIGN_INT, INT4RANGEARRAYOID, InvalidOid },
	{ NUMRANGEOID, "numrange", -1, false, TYPTYPE_RANGE, TYPCATEGORY_RANGE, TYPALIGN_INT, NUMRANGEARRAYOID, InvalidOid },
	{ TSRANGEOID, "tsrange", -1, false, TYPTYPE_RANGE, TYPCATEGORY_RANGE, TYPALIGN_DOUBLE, TSRANGEARRAYOID, InvalidOid },
	{ TSTZRANGEOID, "tstzrange", -1, false, TYPTYPE_RANGE, TYPCATEGORY_RANGE, TYPALIGN_DOUBLE, TSTZRANGEARRAYOID, InvalidOid },
	{ DATERANGEOID, "daterange", -1, false, TYPTYPE_RANGE, TYPCATEGORY_RANGE, TYPALIGN_INT, DATERANGEARRAYOID, InvalidOid },
	{ INT8RANGEOID, "int8range", -1, false, TYPTYPE_RANGE, TYPCATEGORY_RANGE, TYPALIGN_DOUBLE, INT8RANGEARRAYOID, InvalidOid },
	{ INT4MULTIRANGEOID, "int4multirange", -1, false, TYPTYPE_MULTIRANGE, TYPCATEGORY_RANGE, TYPALIGN_INT, INT4MULTIRANGEARRAYOID, InvalidOid },
	{ NUMMULTIRANGEOID, "nummultirange", -1, false, TYPTYPE_MULTIRANGE, TYPCATEGORY_RANGE, TYPALIGN_INT, NUMMULTIRANGEARRAYOID, InvalidOid },
	{ TSMULTIRANGEOID, "tsmultirange", -1, false, TYPTYPE_MULTIRANGE, TYPCATEGORY_RANGE, TYPALIGN_DOUBLE, TSMULTIRANGEARRAYOID, InvalidOid },
	{ TSTZMULTIRANGEOID, "tstzmultirange", -1, false, TYPTYPE_MULTIRANGE, TYPCATEGORY_RANGE, TYPALIGN_DOUBLE, TSTZMULTIRANGEARRAYOID, InvalidOid },
	{ DATEMULTIRANGEOID, "datemultirange", -1, false, TYPTYPE_MULTIRANGE, TYPCATEGORY_RANGE, TYPALIGN_INT, DATEMULTIRANGEARRAYOID, InvalidOid },
	{ INT8MULTIRANGEOID, "int8multirange", -1, false, TYPTYPE_MULTIRANGE, TYPCATEGORY_RANGE, TYPALIGN_DOUBLE, INT8MULTIRANGEARRAYOID, InvalidOid },
	{ RECORDOID, "record", -1, false, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_DOUBLE, RECORDARRAYOID, InvalidOid },
	{ RECORDARRAYOID, "_record", -1, false, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ CSTRINGOID, "cstring", -2, false, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_CHAR, CSTRINGARRAYOID, InvalidOid },
	{ ANYOID, "any", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ ANYARRAYOID, "anyarray", -1, false, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ VOIDOID, "void", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ TRIGGEROID, "trigger", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ EVENT_TRIGGEROID, "event_trigger", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ LANGUAGE_HANDLEROID, "language_handler", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ INTERNALOID, "internal", sizeof(void *), true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, (SIZEOF_VOID_P == 8 ? TYPALIGN_DOUBLE : TYPALIGN_INT), InvalidOid, InvalidOid },
	{ ANYELEMENTOID, "anyelement", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ ANYNONARRAYOID, "anynonarray", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ ANYENUMOID, "anyenum", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ FDW_HANDLEROID, "fdw_handler", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ INDEX_AM_HANDLEROID, "index_am_handler", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ TSM_HANDLEROID, "tsm_handler", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ TABLE_AM_HANDLEROID, "table_am_handler", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ ANYRANGEOID, "anyrange", -1, false, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ ANYCOMPATIBLEOID, "anycompatible", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ ANYCOMPATIBLEARRAYOID, "anycompatiblearray", -1, false, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ ANYCOMPATIBLENONARRAYOID, "anycompatiblenonarray", 4, true, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ ANYCOMPATIBLERANGEOID, "anycompatiblerange", -1, false, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ ANYMULTIRANGEOID, "anymultirange", -1, false, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ ANYCOMPATIBLEMULTIRANGEOID, "anycompatiblemultirange", -1, false, TYPTYPE_PSEUDO, TYPCATEGORY_PSEUDOTYPE, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ PG_BRIN_BLOOM_SUMMARYOID, "pg_brin_bloom_summary", -1, false, TYPTYPE_BASE, TYPCATEGORY_INTERNAL, TYPALIGN_INT, InvalidOid, DEFAULT_COLLATION_OID },
	{ PG_BRIN_MINMAX_MULTI_SUMMARYOID, "pg_brin_minmax_multi_summary", -1, false, TYPTYPE_BASE, TYPCATEGORY_INTERNAL, TYPALIGN_INT, InvalidOid, DEFAULT_COLLATION_OID },
	{ BOOLARRAYOID, "_bool", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ BYTEAARRAYOID, "_bytea", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ CHARARRAYOID, "_char", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ NAMEARRAYOID, "_name", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, C_COLLATION_OID },
	{ INT8ARRAYOID, "_int8", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ INT2ARRAYOID, "_int2", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ INT2VECTORARRAYOID, "_int2vector", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ INT4ARRAYOID, "_int4", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGPROCARRAYOID, "_regproc", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ TEXTARRAYOID, "_text", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, DEFAULT_COLLATION_OID },
	{ OIDARRAYOID, "_oid", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ TIDARRAYOID, "_tid", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ XIDARRAYOID, "_xid", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ CIDARRAYOID, "_cid", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ OIDVECTORARRAYOID, "_oidvector", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ PG_TYPEARRAYOID, "_pg_type", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ PG_ATTRIBUTEARRAYOID, "_pg_attribute", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ PG_PROCARRAYOID, "_pg_proc", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ PG_CLASSARRAYOID, "_pg_class", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ JSONARRAYOID, "_json", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ XMLARRAYOID, "_xml", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ XID8ARRAYOID, "_xid8", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ POINTARRAYOID, "_point", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ LSEGARRAYOID, "_lseg", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ PATHARRAYOID, "_path", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ BOXARRAYOID, "_box", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ POLYGONARRAYOID, "_polygon", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ LINEARRAYOID, "_line", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ FLOAT4ARRAYOID, "_float4", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ FLOAT8ARRAYOID, "_float8", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ CIRCLEARRAYOID, "_circle", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ MONEYARRAYOID, "_money", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ MACADDRARRAYOID, "_macaddr", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ INETARRAYOID, "_inet", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ CIDRARRAYOID, "_cidr", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ MACADDR8ARRAYOID, "_macaddr8", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ ACLITEMARRAYOID, "_aclitem", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ BPCHARARRAYOID, "_bpchar", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, DEFAULT_COLLATION_OID },
	{ VARCHARARRAYOID, "_varchar", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, DEFAULT_COLLATION_OID },
	{ DATEARRAYOID, "_date", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ TIMEARRAYOID, "_time", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ TIMESTAMPARRAYOID, "_timestamp", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ TIMESTAMPTZARRAYOID, "_timestamptz", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ INTERVALARRAYOID, "_interval", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ TIMETZARRAYOID, "_timetz", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ BITARRAYOID, "_bit", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ VARBITARRAYOID, "_varbit", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ NUMERICARRAYOID, "_numeric", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REFCURSORARRAYOID, "_refcursor", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGPROCEDUREARRAYOID, "_regprocedure", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGOPERARRAYOID, "_regoper", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGOPERATORARRAYOID, "_regoperator", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGCLASSARRAYOID, "_regclass", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGCOLLATIONARRAYOID, "_regcollation", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGTYPEARRAYOID, "_regtype", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGROLEARRAYOID, "_regrole", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGNAMESPACEARRAYOID, "_regnamespace", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ UUIDARRAYOID, "_uuid", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ PG_LSNARRAYOID, "_pg_lsn", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ TSVECTORARRAYOID, "_tsvector", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ GTSVECTORARRAYOID, "_gtsvector", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ TSQUERYARRAYOID, "_tsquery", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGCONFIGARRAYOID, "_regconfig", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ REGDICTIONARYARRAYOID, "_regdictionary", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ JSONBARRAYOID, "_jsonb", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ JSONPATHARRAYOID, "_jsonpath", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ TXID_SNAPSHOTARRAYOID, "_txid_snapshot", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ PG_SNAPSHOTARRAYOID, "_pg_snapshot", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ INT4RANGEARRAYOID, "_int4range", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ NUMRANGEARRAYOID, "_numrange", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ TSRANGEARRAYOID, "_tsrange", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ TSTZRANGEARRAYOID, "_tstzrange", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ DATERANGEARRAYOID, "_daterange", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ INT8RANGEARRAYOID, "_int8range", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ INT4MULTIRANGEARRAYOID, "_int4multirange", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ NUMMULTIRANGEARRAYOID, "_nummultirange", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ TSMULTIRANGEARRAYOID, "_tsmultirange", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ TSTZMULTIRANGEARRAYOID, "_tstzmultirange", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ DATEMULTIRANGEARRAYOID, "_datemultirange", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
	{ INT8MULTIRANGEARRAYOID, "_int8multirange", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_DOUBLE, InvalidOid, InvalidOid },
	{ CSTRINGARRAYOID, "_cstring", -1, false, TYPTYPE_BASE, TYPCATEGORY_ARRAY, TYPALIGN_INT, InvalidOid, InvalidOid },
};

static const PgQueryBuiltinType *
pg_query_builtin_type_by_oid(Oid oid)
{
	for (size_t i = 0; i < lengthof(pg_query_builtin_types); i++)
	{
		if (pg_query_builtin_types[i].oid == oid)
			return &pg_query_builtin_types[i];
	}
	return NULL;
}

static Oid
pg_query_builtin_type_oid_by_name(const char *typname)
{
	for (size_t i = 0; i < lengthof(pg_query_builtin_types); i++)
	{
		if (strcmp(pg_query_builtin_types[i].typname, typname) == 0)
			return pg_query_builtin_types[i].oid;
	}
	return InvalidOid;
}

#endif /* PG_QUERY_PG_TYPE_C */
