Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / include / commands / dbcommands.h
blobad9e2d4c4b426811f9263f84236b9ebd85718f6a
1 /*-------------------------------------------------------------------------
3 * dbcommands.h
4 * Database management commands (create/drop database).
7 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $PostgreSQL$
12 *-------------------------------------------------------------------------
14 #ifndef DBCOMMANDS_H
15 #define DBCOMMANDS_H
17 #include "access/xlog.h"
18 #include "nodes/parsenodes.h"
20 /* XLOG stuff */
21 #define XLOG_DBASE_CREATE 0x00
22 #define XLOG_DBASE_DROP 0x10
24 typedef struct xl_dbase_create_rec_old
26 /* Records copying of a single subdirectory incl. contents */
27 Oid db_id;
28 char src_path[1]; /* VARIABLE LENGTH STRING */
29 /* dst_path follows src_path */
30 } xl_dbase_create_rec_old;
32 typedef struct xl_dbase_drop_rec_old
34 /* Records dropping of a single subdirectory incl. contents */
35 Oid db_id;
36 char dir_path[1]; /* VARIABLE LENGTH STRING */
37 } xl_dbase_drop_rec_old;
39 typedef struct xl_dbase_create_rec
41 /* Records copying of a single subdirectory incl. contents */
42 Oid db_id;
43 Oid tablespace_id;
44 Oid src_db_id;
45 Oid src_tablespace_id;
46 } xl_dbase_create_rec;
48 typedef struct xl_dbase_drop_rec
50 /* Records dropping of a single subdirectory incl. contents */
51 Oid db_id;
52 Oid tablespace_id;
53 } xl_dbase_drop_rec;
55 extern void createdb(const CreatedbStmt *stmt);
56 extern void dropdb(const char *dbname, bool missing_ok);
57 extern void RenameDatabase(const char *oldname, const char *newname);
58 extern void AlterDatabase(AlterDatabaseStmt *stmt, bool isTopLevel);
59 extern void AlterDatabaseSet(AlterDatabaseSetStmt *stmt);
60 extern void AlterDatabaseOwner(const char *dbname, Oid newOwnerId);
62 extern Oid get_database_oid(const char *dbname);
63 extern char *get_database_name(Oid dbid);
65 extern void dbase_redo(XLogRecPtr lsn, XLogRecord *rptr);
66 extern void dbase_desc(StringInfo buf, uint8 xl_info, char *rec);
68 #endif /* DBCOMMANDS_H */