1 /*-------------------------------------------------------------------------
4 * definition of the "shared description" system catalog
7 * Because the contents of this table are taken from the *.dat files
8 * of other catalogs, there is no pg_shdescription.dat file. The initial
9 * contents are assembled by genbki.pl and loaded during initdb.
11 * NOTE: an object is identified by the OID of the row that primarily
12 * 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 row
14 * plus the pg_class OID of table pg_database. This allows unique
15 * identification of objects without assuming that OIDs are unique
19 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
20 * Portions Copyright (c) 1994, Regents of the University of California
22 * src/include/catalog/pg_shdescription.h
25 * The Catalog.pm module reads this file and derives schema
28 *-------------------------------------------------------------------------
30 #ifndef PG_SHDESCRIPTION_H
31 #define PG_SHDESCRIPTION_H
33 #include "catalog/genbki.h"
34 #include "catalog/pg_shdescription_d.h" /* IWYU pragma: export */
37 * pg_shdescription definition. cpp turns this into
38 * typedef struct FormData_pg_shdescription
41 CATALOG(pg_shdescription
,2396,SharedDescriptionRelationId
) BKI_SHARED_RELATION
43 Oid objoid
; /* OID of object itself */
44 Oid classoid
; /* OID of table containing object */
46 #ifdef CATALOG_VARLEN /* variable-length fields start here */
47 text description BKI_FORCE_NOT_NULL
; /* description of object */
49 } FormData_pg_shdescription
;
52 * Form_pg_shdescription corresponds to a pointer to a tuple with
53 * the format of pg_shdescription relation.
56 typedef FormData_pg_shdescription
* Form_pg_shdescription
;
58 DECLARE_TOAST_WITH_MACRO(pg_shdescription
, 2846, 2847, PgShdescriptionToastTable
, PgShdescriptionToastIndex
);
60 DECLARE_UNIQUE_INDEX_PKEY(pg_shdescription_o_c_index
, 2397, SharedDescriptionObjIndexId
, pg_shdescription
, btree(objoid oid_ops
, classoid oid_ops
));
62 /* We do not use BKI_LOOKUP here because it causes problems for genbki.pl */
63 DECLARE_FOREIGN_KEY((classoid
), pg_class
, (oid
));
65 #endif /* PG_SHDESCRIPTION_H */