pg_amcheck: Fix test failure on Windows with non-existing role
[pgsql.git] / src / include / catalog / pg_description.h
blob4cd2bf904306ab8d5defa1ce2e3704f4272d7f2b
1 /*-------------------------------------------------------------------------
3 * pg_description.h
4 * definition of the "description" system catalog (pg_description)
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.
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.
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).
26 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
27 * Portions Copyright (c) 1994, Regents of the University of California
29 * src/include/catalog/pg_description.h
31 * NOTES
32 * The Catalog.pm module reads this file and derives schema
33 * information.
35 *-------------------------------------------------------------------------
37 #ifndef PG_DESCRIPTION_H
38 #define PG_DESCRIPTION_H
40 #include "catalog/genbki.h"
41 #include "catalog/pg_description_d.h" /* IWYU pragma: export */
43 /* ----------------
44 * pg_description definition. cpp turns this into
45 * typedef struct FormData_pg_description
46 * ----------------
48 CATALOG(pg_description,2609,DescriptionRelationId)
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 */
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;
59 /* ----------------
60 * Form_pg_description corresponds to a pointer to a tuple with
61 * the format of pg_description relation.
62 * ----------------
64 typedef FormData_pg_description * Form_pg_description;
66 DECLARE_TOAST(pg_description, 2834, 2835);
68 DECLARE_UNIQUE_INDEX_PKEY(pg_description_o_c_o_index, 2675, DescriptionObjIndexId, pg_description, btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops));
70 /* We do not use BKI_LOOKUP here because it causes problems for genbki.pl */
71 DECLARE_FOREIGN_KEY((classoid), pg_class, (oid));
73 #endif /* PG_DESCRIPTION_H */