1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* pg_database.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* definition of the system "database" relation (pg_database)
|
|
|
|
* along with the relation's initial contents.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2000-11-14 19:37:49 +01:00
|
|
|
* $Id: pg_database.h,v 1.15 2000/11/14 18:37:46 tgl Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
* NOTES
|
1997-09-07 07:04:48 +02:00
|
|
|
* the genbki.sh script reads this file and generates .bki
|
|
|
|
* information from the DATA() statements.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PG_DATABASE_H
|
|
|
|
#define PG_DATABASE_H
|
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* postgres.h contains the system type definintions and the
|
|
|
|
* CATALOG(), BOOTSTRAP and DATA() sugar words so this file
|
|
|
|
* can be read by both genbki.sh and the C compiler.
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* pg_database definition. cpp turns this into
|
|
|
|
* typedef struct FormData_pg_database
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
*/
|
|
|
|
CATALOG(pg_database) BOOTSTRAP
|
|
|
|
{
|
1997-09-08 04:41:22 +02:00
|
|
|
NameData datname;
|
|
|
|
int4 datdba;
|
1998-08-24 03:14:24 +02:00
|
|
|
int4 encoding;
|
2000-11-14 19:37:49 +01:00
|
|
|
bool datistemplate; /* allowed as template for CREATE DATABASE? */
|
|
|
|
bool datallowconn; /* new connections allowed? */
|
2000-10-22 20:29:58 +02:00
|
|
|
Oid datlastsysoid;
|
1997-09-08 04:41:22 +02:00
|
|
|
text datpath; /* VARIABLE LENGTH FIELD */
|
1996-08-28 03:59:28 +02:00
|
|
|
} FormData_pg_database;
|
1998-09-01 06:40:42 +02:00
|
|
|
|
1996-08-28 03:59:28 +02:00
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* Form_pg_database corresponds to a pointer to a tuple with
|
|
|
|
* the format of pg_database relation.
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
typedef FormData_pg_database *Form_pg_database;
|
1996-08-28 03:59:28 +02:00
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* compiler constants for pg_database
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
2000-11-14 19:37:49 +01:00
|
|
|
#define Natts_pg_database 7
|
1997-09-07 07:04:48 +02:00
|
|
|
#define Anum_pg_database_datname 1
|
|
|
|
#define Anum_pg_database_datdba 2
|
1998-08-24 03:14:24 +02:00
|
|
|
#define Anum_pg_database_encoding 3
|
2000-11-14 19:37:49 +01:00
|
|
|
#define Anum_pg_database_datistemplate 4
|
|
|
|
#define Anum_pg_database_datallowconn 5
|
|
|
|
#define Anum_pg_database_datlastsysoid 6
|
|
|
|
#define Anum_pg_database_datpath 7
|
2000-10-16 16:52:28 +02:00
|
|
|
|
2000-11-14 19:37:49 +01:00
|
|
|
DATA(insert OID = 1 ( template1 PGUID ENCODING t t 0 "" ));
|
|
|
|
DESCR("Default template database");
|
2000-10-16 16:52:28 +02:00
|
|
|
|
|
|
|
#define TemplateDbOid 1
|
|
|
|
|
2000-10-20 13:01:21 +02:00
|
|
|
/* Just to mark OID as used for unused_oid script -:) */
|
|
|
|
#define DATAMARKOID(x)
|
|
|
|
|
|
|
|
DATAMARKOID( = 2)
|
|
|
|
#define RecoveryDb 2
|
|
|
|
|
|
|
|
#undef DATAMARKOID
|
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* PG_DATABASE_H */
|