Header And Logo

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

pg_database.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * pg_database.h
00004  *    definition of the system "database" relation (pg_database)
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_database.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_DATABASE_H
00020 #define PG_DATABASE_H
00021 
00022 #include "catalog/genbki.h"
00023 
00024 /* ----------------
00025  *      pg_database definition.  cpp turns this into
00026  *      typedef struct FormData_pg_database
00027  * ----------------
00028  */
00029 #define DatabaseRelationId  1262
00030 #define DatabaseRelation_Rowtype_Id  1248
00031 
00032 CATALOG(pg_database,1262) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248) BKI_SCHEMA_MACRO
00033 {
00034     NameData    datname;        /* database name */
00035     Oid         datdba;         /* owner of database */
00036     int32       encoding;       /* character encoding */
00037     NameData    datcollate;     /* LC_COLLATE setting */
00038     NameData    datctype;       /* LC_CTYPE setting */
00039     bool        datistemplate;  /* allowed as CREATE DATABASE template? */
00040     bool        datallowconn;   /* new connections allowed? */
00041     int32       datconnlimit;   /* max connections allowed (-1=no limit) */
00042     Oid         datlastsysoid;  /* highest OID to consider a system OID */
00043     TransactionId datfrozenxid; /* all Xids < this are frozen in this DB */
00044     TransactionId datminmxid;   /* all multixacts in the DB are >= this */
00045     Oid         dattablespace;  /* default table space for this DB */
00046 
00047 #ifdef CATALOG_VARLEN           /* variable-length fields start here */
00048     aclitem     datacl[1];      /* access permissions */
00049 #endif
00050 } FormData_pg_database;
00051 
00052 /* ----------------
00053  *      Form_pg_database corresponds to a pointer to a tuple with
00054  *      the format of pg_database relation.
00055  * ----------------
00056  */
00057 typedef FormData_pg_database *Form_pg_database;
00058 
00059 /* ----------------
00060  *      compiler constants for pg_database
00061  * ----------------
00062  */
00063 #define Natts_pg_database               13
00064 #define Anum_pg_database_datname        1
00065 #define Anum_pg_database_datdba         2
00066 #define Anum_pg_database_encoding       3
00067 #define Anum_pg_database_datcollate     4
00068 #define Anum_pg_database_datctype       5
00069 #define Anum_pg_database_datistemplate  6
00070 #define Anum_pg_database_datallowconn   7
00071 #define Anum_pg_database_datconnlimit   8
00072 #define Anum_pg_database_datlastsysoid  9
00073 #define Anum_pg_database_datfrozenxid   10
00074 #define Anum_pg_database_datminmxid     11
00075 #define Anum_pg_database_dattablespace  12
00076 #define Anum_pg_database_datacl         13
00077 
00078 DATA(insert OID = 1 (  template1 PGUID ENCODING "LC_COLLATE" "LC_CTYPE" t t -1 0 0 1 1663 _null_));
00079 SHDESCR("default template for new databases");
00080 #define TemplateDbOid           1
00081 
00082 #endif   /* PG_DATABASE_H */