Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
pg_opclass.h89 linesDownload Raw Back to catalog
1/*-------------------------------------------------------------------------2 *3 * pg_opclass.h4 *	  definition of the "operator class" system catalog (pg_opclass)5 *6 * The primary key for this table is <opcmethod, opcname, opcnamespace> ---7 * that is, there is a row for each valid combination of opclass name and8 * index access method type.  This row specifies the expected input data type9 * for the opclass (the type of the heap column, or the expression output type10 * in the case of an index expression).  Note that types binary-coercible to11 * the specified type will be accepted too.12 *13 * For a given <opcmethod, opcintype> pair, there can be at most one row that14 * has opcdefault = true; this row is the default opclass for such data in15 * such an index.  (This is not currently enforced by an index, because we16 * don't support partial indexes on system catalogs.)17 *18 * Normally opckeytype = InvalidOid (zero), indicating that the data stored19 * in the index is the same as the data in the indexed column.  If opckeytype20 * is nonzero then it indicates that a conversion step is needed to produce21 * the stored index data, which will be of type opckeytype (which might be22 * the same or different from the input datatype).  Performing such a23 * conversion is the responsibility of the index access method --- not all24 * AMs support this.25 *26 *27 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group28 * Portions Copyright (c) 1994, Regents of the University of California29 *30 * src/include/catalog/pg_opclass.h31 *32 * NOTES33 *	  The Catalog.pm module reads this file and derives schema34 *	  information.35 *36 *-------------------------------------------------------------------------37 */38#ifndef PG_OPCLASS_H39#define PG_OPCLASS_H40 41#include "catalog/genbki.h"42#include "catalog/pg_opclass_d.h"43 44/* ----------------45 *		pg_opclass definition.  cpp turns this into46 *		typedef struct FormData_pg_opclass47 * ----------------48 */49CATALOG(pg_opclass,2616,OperatorClassRelationId)50{51	Oid			oid;			/* oid */52 53	/* index access method opclass is for */54	Oid			opcmethod BKI_LOOKUP(pg_am);55 56	/* name of this opclass */57	NameData	opcname;58 59	/* namespace of this opclass */60	Oid			opcnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);61 62	/* opclass owner */63	Oid			opcowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);64 65	/* containing operator family */66	Oid			opcfamily BKI_LOOKUP(pg_opfamily);67 68	/* type of data indexed by opclass */69	Oid			opcintype BKI_LOOKUP(pg_type);70 71	/* T if opclass is default for opcintype */72	bool		opcdefault BKI_DEFAULT(t);73 74	/* type of data in index, or InvalidOid if same as input column type */75	Oid			opckeytype BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_type);76} FormData_pg_opclass;77 78/* ----------------79 *		Form_pg_opclass corresponds to a pointer to a tuple with80 *		the format of pg_opclass relation.81 * ----------------82 */83typedef FormData_pg_opclass *Form_pg_opclass;84 85DECLARE_UNIQUE_INDEX(pg_opclass_am_name_nsp_index, 2686, OpclassAmNameNspIndexId, on pg_opclass using btree(opcmethod oid_ops, opcname name_ops, opcnamespace oid_ops));86DECLARE_UNIQUE_INDEX_PKEY(pg_opclass_oid_index, 2687, OpclassOidIndexId, on pg_opclass using btree(oid oid_ops));87 88#endif							/* PG_OPCLASS_H */89 
codekingpro/portable-devtools · Team Ai