~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to src/include/catalog/pg_description.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-2009, PostgreSQL Global Development Group
 
23
 * Portions Copyright (c) 1994, Regents of the University of California
 
24
 *
 
25
 * $PostgreSQL$
 
26
 *
 
27
 * NOTES
 
28
 *              the genbki.sh 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
        int4            objsubid;               /* column number, or 0 if not used */
 
53
        text            description;    /* description of object */
 
54
} FormData_pg_description;
 
55
 
 
56
/* ----------------
 
57
 *              Form_pg_description corresponds to a pointer to a tuple with
 
58
 *              the format of pg_description relation.
 
59
 * ----------------
 
60
 */
 
61
typedef FormData_pg_description *Form_pg_description;
 
62
 
 
63
/* ----------------
 
64
 *              compiler constants for pg_description
 
65
 * ----------------
 
66
 */
 
67
#define Natts_pg_description                    4
 
68
#define Anum_pg_description_objoid              1
 
69
#define Anum_pg_description_classoid    2
 
70
#define Anum_pg_description_objsubid    3
 
71
#define Anum_pg_description_description 4
 
72
 
 
73
/* ----------------
 
74
 *              initial contents of pg_description
 
75
 * ----------------
 
76
 */
 
77
 
 
78
/*
 
79
 *      Because the contents of this table are taken from the other *.h files,
 
80
 *      there is no initialization here.  The initial contents are extracted
 
81
 *      by genbki.sh and loaded during initdb.
 
82
 */
 
83
 
 
84
#endif   /* PG_DESCRIPTION_H */