PostgreSQL Source Code  git master
pg_description.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_description.h
4  * definition of the system "description" relation (pg_description)
5  *
6  * NOTE: an object is identified by the OID of the row that primarily
7  * defines the object, plus the OID of the table that that row appears in.
8  * For example, a function is identified by the OID of its pg_proc row
9  * plus the pg_class OID of table pg_proc. This allows unique identification
10  * of objects without assuming that OIDs are unique across tables.
11  *
12  * Since attributes don't have OIDs of their own, we identify an attribute
13  * comment by the objoid+classoid of its parent table, plus an "objsubid"
14  * giving the attribute column number. "objsubid" must be zero in a comment
15  * for a table itself, so that it is distinct from any column comment.
16  * Currently, objsubid is unused and zero for all other kinds of objects,
17  * but perhaps it might be useful someday to associate comments with
18  * constituent elements of other kinds of objects (arguments of a function,
19  * for example).
20  *
21  *
22  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
23  * Portions Copyright (c) 1994, Regents of the University of California
24  *
25  * src/include/catalog/pg_description.h
26  *
27  * NOTES
28  * the genbki.pl script reads this file and generates .bki
29  * information from the DATA() statements.
30  *
31  * XXX do NOT break up DATA() statements into multiple lines!
32  * the scripts are not as smart as you might think...
33  *
34  *-------------------------------------------------------------------------
35  */
36 #ifndef PG_DESCRIPTION_H
37 #define PG_DESCRIPTION_H
38 
39 #include "catalog/genbki.h"
40 
41 /* ----------------
42  * pg_description definition. cpp turns this into
43  * typedef struct FormData_pg_description
44  * ----------------
45  */
46 #define DescriptionRelationId 2609
47 
48 CATALOG(pg_description,2609) BKI_WITHOUT_OIDS
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
58 
59 /* ----------------
60  * Form_pg_description corresponds to a pointer to a tuple with
61  * the format of pg_description relation.
62  * ----------------
63  */
65 
66 /* ----------------
67  * compiler constants for pg_description
68  * ----------------
69  */
70 #define Natts_pg_description 4
71 #define Anum_pg_description_objoid 1
72 #define Anum_pg_description_classoid 2
73 #define Anum_pg_description_objsubid 3
74 #define Anum_pg_description_description 4
75 
76 /* ----------------
77  * initial contents of pg_description
78  * ----------------
79  */
80 
81 /*
82  * Because the contents of this table are taken from the other *.h files,
83  * there is no initialization here. The initial contents are extracted
84  * by genbki.pl and loaded during initdb.
85  */
86 
87 #endif /* PG_DESCRIPTION_H */
FormData_pg_description
unsigned int Oid
Definition: postgres_ext.h:31
signed int int32
Definition: c.h:294
#define BKI_WITHOUT_OIDS
Definition: genbki.h:28
#define BKI_FORCE_NOT_NULL
Definition: genbki.h:32
FormData_pg_description * Form_pg_description
CATALOG(pg_description, 2609) BKI_WITHOUT_OIDS
Definition: c.h:497