Header And Logo

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

pg_namespace.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * pg_namespace.h
00004  *    definition of the system "namespace" relation (pg_namespace)
00005  *    along with the relation's initial contents.
00006  *
00007  *
00008  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00009  * Portions Copyright (c) 1994, Regents of the University of California
00010  *
00011  * src/include/catalog/pg_namespace.h
00012  *
00013  * NOTES
00014  *    the genbki.pl script reads this file and generates .bki
00015  *    information from the DATA() statements.
00016  *
00017  *-------------------------------------------------------------------------
00018  */
00019 #ifndef PG_NAMESPACE_H
00020 #define PG_NAMESPACE_H
00021 
00022 #include "catalog/genbki.h"
00023 
00024 /* ----------------------------------------------------------------
00025  *      pg_namespace definition.
00026  *
00027  *      cpp turns this into typedef struct FormData_pg_namespace
00028  *
00029  *  nspname             name of the namespace
00030  *  nspowner            owner (creator) of the namespace
00031  *  nspacl              access privilege list
00032  * ----------------------------------------------------------------
00033  */
00034 #define NamespaceRelationId  2615
00035 
00036 CATALOG(pg_namespace,2615)
00037 {
00038     NameData    nspname;
00039     Oid         nspowner;
00040 
00041 #ifdef CATALOG_VARLEN           /* variable-length fields start here */
00042     aclitem     nspacl[1];
00043 #endif
00044 } FormData_pg_namespace;
00045 
00046 /* ----------------
00047  *      Form_pg_namespace corresponds to a pointer to a tuple with
00048  *      the format of pg_namespace relation.
00049  * ----------------
00050  */
00051 typedef FormData_pg_namespace *Form_pg_namespace;
00052 
00053 /* ----------------
00054  *      compiler constants for pg_namespace
00055  * ----------------
00056  */
00057 
00058 #define Natts_pg_namespace              3
00059 #define Anum_pg_namespace_nspname       1
00060 #define Anum_pg_namespace_nspowner      2
00061 #define Anum_pg_namespace_nspacl        3
00062 
00063 
00064 /* ----------------
00065  * initial contents of pg_namespace
00066  * ---------------
00067  */
00068 
00069 DATA(insert OID = 11 ( "pg_catalog" PGUID _null_ ));
00070 DESCR("system catalog schema");
00071 #define PG_CATALOG_NAMESPACE 11
00072 DATA(insert OID = 99 ( "pg_toast" PGUID _null_ ));
00073 DESCR("reserved schema for TOAST tables");
00074 #define PG_TOAST_NAMESPACE 99
00075 DATA(insert OID = 2200 ( "public" PGUID _null_ ));
00076 DESCR("standard public schema");
00077 #define PG_PUBLIC_NAMESPACE 2200
00078 
00079 
00080 /*
00081  * prototypes for functions in pg_namespace.c
00082  */
00083 extern Oid  NamespaceCreate(const char *nspName, Oid ownerId, bool isTemp);
00084 
00085 #endif   /* PG_NAMESPACE_H */