PostgreSQL Source Code  git master
pg_database.h File Reference
#include "catalog/genbki.h"
Include dependency graph for pg_database.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DatabaseRelationId   1262
 
#define DatabaseRelation_Rowtype_Id   1248
 
#define Natts_pg_database   13
 
#define Anum_pg_database_datname   1
 
#define Anum_pg_database_datdba   2
 
#define Anum_pg_database_encoding   3
 
#define Anum_pg_database_datcollate   4
 
#define Anum_pg_database_datctype   5
 
#define Anum_pg_database_datistemplate   6
 
#define Anum_pg_database_datallowconn   7
 
#define Anum_pg_database_datconnlimit   8
 
#define Anum_pg_database_datlastsysoid   9
 
#define Anum_pg_database_datfrozenxid   10
 
#define Anum_pg_database_datminmxid   11
 
#define Anum_pg_database_dattablespace   12
 
#define Anum_pg_database_datacl   13
 
#define TemplateDbOid   1
 

Typedefs

typedef FormData_pg_databaseForm_pg_database
 

Functions

 CATALOG (pg_database, 1262) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248) BKI_SCHEMA_MACRO
 
 DATA (insert OID=1(template1 PGUID ENCODING "LC_COLLATE" "LC_CTYPE" t t -1 0 0 1 1663 _null_))
 
 SHDESCR ("default template for new databases")
 

Variables

 FormData_pg_database
 

Macro Definition Documentation

◆ Anum_pg_database_datacl

#define Anum_pg_database_datacl   13

◆ Anum_pg_database_datallowconn

#define Anum_pg_database_datallowconn   7

Definition at line 70 of file pg_database.h.

Referenced by AlterDatabase(), and createdb().

◆ Anum_pg_database_datcollate

#define Anum_pg_database_datcollate   4

Definition at line 67 of file pg_database.h.

Referenced by createdb().

◆ Anum_pg_database_datconnlimit

#define Anum_pg_database_datconnlimit   8

Definition at line 71 of file pg_database.h.

Referenced by AlterDatabase(), and createdb().

◆ Anum_pg_database_datctype

#define Anum_pg_database_datctype   5

Definition at line 68 of file pg_database.h.

Referenced by createdb().

◆ Anum_pg_database_datdba

#define Anum_pg_database_datdba   2

Definition at line 65 of file pg_database.h.

Referenced by AlterDatabaseOwner(), and createdb().

◆ Anum_pg_database_datfrozenxid

#define Anum_pg_database_datfrozenxid   10

Definition at line 73 of file pg_database.h.

Referenced by createdb().

◆ Anum_pg_database_datistemplate

#define Anum_pg_database_datistemplate   6

Definition at line 69 of file pg_database.h.

Referenced by AlterDatabase(), and createdb().

◆ Anum_pg_database_datlastsysoid

#define Anum_pg_database_datlastsysoid   9

Definition at line 72 of file pg_database.h.

Referenced by createdb().

◆ Anum_pg_database_datminmxid

#define Anum_pg_database_datminmxid   11

Definition at line 74 of file pg_database.h.

Referenced by createdb().

◆ Anum_pg_database_datname

#define Anum_pg_database_datname   1

◆ Anum_pg_database_dattablespace

#define Anum_pg_database_dattablespace   12

Definition at line 75 of file pg_database.h.

Referenced by createdb(), and movedb().

◆ Anum_pg_database_encoding

#define Anum_pg_database_encoding   3

Definition at line 66 of file pg_database.h.

Referenced by createdb().

◆ DatabaseRelation_Rowtype_Id

#define DatabaseRelation_Rowtype_Id   1248

Definition at line 30 of file pg_database.h.

Referenced by RelationCacheInitializePhase2().

◆ DatabaseRelationId

◆ Natts_pg_database

#define Natts_pg_database   13

◆ TemplateDbOid

#define TemplateDbOid   1

Definition at line 80 of file pg_database.h.

Referenced by BootStrapXLOG(), and InitPostgres().

Typedef Documentation

◆ Form_pg_database

Function Documentation

◆ CATALOG()

CATALOG ( pg_database  ,
1262   
)

Definition at line 32 of file pg_database.h.

References encoding.

33 {
34  NameData datname; /* database name */
35  Oid datdba; /* owner of database */
36  int32 encoding; /* character encoding */
37  NameData datcollate; /* LC_COLLATE setting */
38  NameData datctype; /* LC_CTYPE setting */
39  bool datistemplate; /* allowed as CREATE DATABASE template? */
40  bool datallowconn; /* new connections allowed? */
41  int32 datconnlimit; /* max connections allowed (-1=no limit) */
42  Oid datlastsysoid; /* highest OID to consider a system OID */
43  TransactionId datfrozenxid; /* all Xids < this are frozen in this DB */
44  TransactionId datminmxid; /* all multixacts in the DB are >= this */
45  Oid dattablespace; /* default table space for this DB */
46 
47 #ifdef CATALOG_VARLEN /* variable-length fields start here */
48  aclitem datacl[1]; /* access permissions */
49 #endif
uint32 TransactionId
Definition: c.h:445
unsigned int Oid
Definition: postgres_ext.h:31
signed int int32
Definition: c.h:284
Definition: c.h:541
static char * encoding
Definition: initdb.c:123
FormData_pg_database
Definition: pg_database.h:50

◆ DATA()

DATA ( insert  OID = 1(template1 PGUID ENCODING "LC_COLLATE" "LC_CTYPE" t t -1 0 0 1 1663 _null_))

◆ SHDESCR()

SHDESCR ( "default template for new databases"  )

Variable Documentation

◆ FormData_pg_database

FormData_pg_database

Definition at line 50 of file pg_database.h.

Referenced by vac_truncate_clog().