codekingpro/portable-devtools
115k
1/*-------------------------------------------------------------------------2 *3 * pg_shdescription.h4 * definition of the "shared description" system catalog5 * (pg_shdescription)6 *7 * Because the contents of this table are taken from the *.dat files8 * of other catalogs, there is no pg_shdescription.dat file. The initial9 * contents are assembled by genbki.pl and loaded during initdb.10 *11 * NOTE: an object is identified by the OID of the row that primarily12 * defines the object, plus the OID of the table that that row appears in.13 * For example, a database is identified by the OID of its pg_database row14 * plus the pg_class OID of table pg_database. This allows unique15 * identification of objects without assuming that OIDs are unique16 * across tables.17 *18 *19 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group20 * Portions Copyright (c) 1994, Regents of the University of California21 *22 * src/include/catalog/pg_shdescription.h23 *24 * NOTES25 * The Catalog.pm module reads this file and derives schema26 * information.27 *28 *-------------------------------------------------------------------------29 */30#ifndef PG_SHDESCRIPTION_H31#define PG_SHDESCRIPTION_H32 33#include "catalog/genbki.h"34#include "catalog/pg_shdescription_d.h"35 36/* ----------------37 * pg_shdescription definition. cpp turns this into38 * typedef struct FormData_pg_shdescription39 * ----------------40 */41CATALOG(pg_shdescription,2396,SharedDescriptionRelationId) BKI_SHARED_RELATION42{43 Oid objoid; /* OID of object itself */44 Oid classoid; /* OID of table containing object */45 46#ifdef CATALOG_VARLEN /* variable-length fields start here */47 text description BKI_FORCE_NOT_NULL; /* description of object */48#endif49} FormData_pg_shdescription;50 51/* ----------------52 * Form_pg_shdescription corresponds to a pointer to a tuple with53 * the format of pg_shdescription relation.54 * ----------------55 */56typedef FormData_pg_shdescription * Form_pg_shdescription;57 58DECLARE_TOAST_WITH_MACRO(pg_shdescription, 2846, 2847, PgShdescriptionToastTable, PgShdescriptionToastIndex);59 60DECLARE_UNIQUE_INDEX_PKEY(pg_shdescription_o_c_index, 2397, SharedDescriptionObjIndexId, on pg_shdescription using btree(objoid oid_ops, classoid oid_ops));61 62/* We do not use BKI_LOOKUP here because it causes problems for genbki.pl */63DECLARE_FOREIGN_KEY((classoid), pg_class, (oid));64 65#endif /* PG_SHDESCRIPTION_H */66 