~ubuntu-branches/ubuntu/lucid/postgresql-8.4/lucid-proposed

« back to all changes in this revision

Viewing changes to src/include/catalog/pg_database.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_database.h
 
4
 *        definition of the system "database" relation (pg_database)
 
5
 *        along with the relation's initial contents.
 
6
 *
 
7
 *
 
8
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
 
9
 * Portions Copyright (c) 1994, Regents of the University of California
 
10
 *
 
11
 * $PostgreSQL$
 
12
 *
 
13
 * NOTES
 
14
 *        the genbki.sh script reads this file and generates .bki
 
15
 *        information from the DATA() statements.
 
16
 *
 
17
 *-------------------------------------------------------------------------
 
18
 */
 
19
#ifndef PG_DATABASE_H
 
20
#define PG_DATABASE_H
 
21
 
 
22
#include "catalog/genbki.h"
 
23
 
 
24
/* ----------------
 
25
 *              pg_database definition.  cpp turns this into
 
26
 *              typedef struct FormData_pg_database
 
27
 * ----------------
 
28
 */
 
29
#define DatabaseRelationId      1262
 
30
 
 
31
CATALOG(pg_database,1262) BKI_SHARED_RELATION
 
32
{
 
33
        NameData        datname;                /* database name */
 
34
        Oid                     datdba;                 /* owner of database */
 
35
        int4            encoding;               /* character encoding */
 
36
        NameData        datcollate;             /* LC_COLLATE setting */
 
37
        NameData        datctype;               /* LC_CTYPE setting */
 
38
        bool            datistemplate;  /* allowed as CREATE DATABASE template? */
 
39
        bool            datallowconn;   /* new connections allowed? */
 
40
        int4            datconnlimit;   /* max connections allowed (-1=no limit) */
 
41
        Oid                     datlastsysoid;  /* highest OID to consider a system OID */
 
42
        TransactionId datfrozenxid; /* all Xids < this are frozen in this DB */
 
43
        Oid                     dattablespace;  /* default table space for this DB */
 
44
        text            datconfig[1];   /* database-specific GUC (VAR LENGTH) */
 
45
        aclitem         datacl[1];              /* access permissions (VAR LENGTH) */
 
46
} FormData_pg_database;
 
47
 
 
48
/* ----------------
 
49
 *              Form_pg_database corresponds to a pointer to a tuple with
 
50
 *              the format of pg_database relation.
 
51
 * ----------------
 
52
 */
 
53
typedef FormData_pg_database *Form_pg_database;
 
54
 
 
55
/* ----------------
 
56
 *              compiler constants for pg_database
 
57
 * ----------------
 
58
 */
 
59
#define Natts_pg_database                               13
 
60
#define Anum_pg_database_datname                1
 
61
#define Anum_pg_database_datdba                 2
 
62
#define Anum_pg_database_encoding               3
 
63
#define Anum_pg_database_datcollate             4
 
64
#define Anum_pg_database_datctype               5
 
65
#define Anum_pg_database_datistemplate  6
 
66
#define Anum_pg_database_datallowconn   7
 
67
#define Anum_pg_database_datconnlimit   8
 
68
#define Anum_pg_database_datlastsysoid  9
 
69
#define Anum_pg_database_datfrozenxid   10
 
70
#define Anum_pg_database_dattablespace  11
 
71
#define Anum_pg_database_datconfig              12
 
72
#define Anum_pg_database_datacl                 13
 
73
 
 
74
DATA(insert OID = 1 (  template1 PGUID ENCODING "LC_COLLATE" "LC_CTYPE" t t -1 0 0 1663 _null_ _null_));
 
75
SHDESCR("default template database");
 
76
#define TemplateDbOid                   1
 
77
 
 
78
#endif   /* PG_DATABASE_H */