1 /*------------------------------------------------------------------------- 2 * 3 * pg_description.h 4 * definition of the "description" system catalog (pg_description) 5 * 6 * Because the contents of this table are taken from the *.dat files 7 * of other catalogs, there is no pg_description.dat file. The initial 8 * contents are assembled by genbki.pl and loaded during initdb. 9 * 10 * NOTE: an object is identified by the OID of the row that primarily 11 * defines the object, plus the OID of the table that that row appears in. 12 * For example, a function is identified by the OID of its pg_proc row 13 * plus the pg_class OID of table pg_proc. This allows unique identification 14 * of objects without assuming that OIDs are unique across tables. 15 * 16 * Since attributes don't have OIDs of their own, we identify an attribute 17 * comment by the objoid+classoid of its parent table, plus an "objsubid" 18 * giving the attribute column number. "objsubid" must be zero in a comment 19 * for a table itself, so that it is distinct from any column comment. 20 * Currently, objsubid is unused and zero for all other kinds of objects, 21 * but perhaps it might be useful someday to associate comments with 22 * constituent elements of other kinds of objects (arguments of a function, 23 * for example). 24 * 25 * 26 * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group 27 * Portions Copyright (c) 1994, Regents of the University of California 28 * 29 * src/include/catalog/pg_description.h 30 * 31 * NOTES 32 * The Catalog.pm module reads this file and derives schema 33 * information. 34 * 35 *------------------------------------------------------------------------- 36 */ 37 #ifndef PG_DESCRIPTION_H 38 #define PG_DESCRIPTION_H 39 40 #include "catalog/genbki.h" 41 #include "catalog/pg_description_d.h" 42 43 /* ---------------- 44 * pg_description definition. cpp turns this into 45 * typedef struct FormData_pg_description 46 * ---------------- 47 */ 48 CATALOG(pg_description,2609,DescriptionRelationId) 49 { 50 Oid objoid; /* OID of object itself */ 51 Oid classoid; /* OID of table containing object */ 52 int32 objsubid; /* column number, or 0 if not used */ 53 54 #ifdef CATALOG_VARLEN /* variable-length fields start here */ 55 text description BKI_FORCE_NOT_NULL; /* description of object */ 56 #endif 57 } FormData_pg_description; 58 59 /* ---------------- 60 * Form_pg_description corresponds to a pointer to a tuple with 61 * the format of pg_description relation. 62 * ---------------- 63 */ 64 typedef FormData_pg_description * Form_pg_description; 65 66 #endif /* PG_DESCRIPTION_H */ 67