Header And Logo

PostgreSQL
| The world's most advanced open source database.

pg_description.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * pg_description.h
00004  *    definition of the system "description" relation (pg_description)
00005  *
00006  * NOTE: an object is identified by the OID of the row that primarily
00007  * defines the object, plus the OID of the table that that row appears in.
00008  * For example, a function is identified by the OID of its pg_proc row
00009  * plus the pg_class OID of table pg_proc.  This allows unique identification
00010  * of objects without assuming that OIDs are unique across tables.
00011  *
00012  * Since attributes don't have OIDs of their own, we identify an attribute
00013  * comment by the objoid+classoid of its parent table, plus an "objsubid"
00014  * giving the attribute column number.  "objsubid" must be zero in a comment
00015  * for a table itself, so that it is distinct from any column comment.
00016  * Currently, objsubid is unused and zero for all other kinds of objects,
00017  * but perhaps it might be useful someday to associate comments with
00018  * constituent elements of other kinds of objects (arguments of a function,
00019  * for example).
00020  *
00021  *
00022  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00023  * Portions Copyright (c) 1994, Regents of the University of California
00024  *
00025  * src/include/catalog/pg_description.h
00026  *
00027  * NOTES
00028  *      the genbki.pl script reads this file and generates .bki
00029  *      information from the DATA() statements.
00030  *
00031  *      XXX do NOT break up DATA() statements into multiple lines!
00032  *          the scripts are not as smart as you might think...
00033  *
00034  *-------------------------------------------------------------------------
00035  */
00036 #ifndef PG_DESCRIPTION_H
00037 #define PG_DESCRIPTION_H
00038 
00039 #include "catalog/genbki.h"
00040 
00041 /* ----------------
00042  *      pg_description definition.  cpp turns this into
00043  *      typedef struct FormData_pg_description
00044  * ----------------
00045  */
00046 #define DescriptionRelationId  2609
00047 
00048 CATALOG(pg_description,2609) BKI_WITHOUT_OIDS
00049 {
00050     Oid         objoid;         /* OID of object itself */
00051     Oid         classoid;       /* OID of table containing object */
00052     int32       objsubid;       /* column number, or 0 if not used */
00053 
00054 #ifdef CATALOG_VARLEN           /* variable-length fields start here */
00055     text        description;    /* description of object */
00056 #endif
00057 } FormData_pg_description;
00058 
00059 /* ----------------
00060  *      Form_pg_description corresponds to a pointer to a tuple with
00061  *      the format of pg_description relation.
00062  * ----------------
00063  */
00064 typedef FormData_pg_description *Form_pg_description;
00065 
00066 /* ----------------
00067  *      compiler constants for pg_description
00068  * ----------------
00069  */
00070 #define Natts_pg_description            4
00071 #define Anum_pg_description_objoid      1
00072 #define Anum_pg_description_classoid    2
00073 #define Anum_pg_description_objsubid    3
00074 #define Anum_pg_description_description 4
00075 
00076 /* ----------------
00077  *      initial contents of pg_description
00078  * ----------------
00079  */
00080 
00081 /*
00082  *  Because the contents of this table are taken from the other *.h files,
00083  *  there is no initialization here.  The initial contents are extracted
00084  *  by genbki.pl and loaded during initdb.
00085  */
00086 
00087 #endif   /* PG_DESCRIPTION_H */