PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
dbcommands.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * dbcommands.h
4  * Database management commands (create/drop database).
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/commands/dbcommands.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef DBCOMMANDS_H
15 #define DBCOMMANDS_H
16 
17 #include "access/xlogreader.h"
18 #include "catalog/objectaddress.h"
19 #include "lib/stringinfo.h"
20 #include "nodes/parsenodes.h"
21 
22 extern Oid createdb(ParseState *pstate, const CreatedbStmt *stmt);
23 extern void dropdb(const char *dbname, bool missing_ok);
24 extern ObjectAddress RenameDatabase(const char *oldname, const char *newname);
25 extern Oid AlterDatabase(ParseState *pstate, AlterDatabaseStmt *stmt, bool isTopLevel);
27 extern ObjectAddress AlterDatabaseOwner(const char *dbname, Oid newOwnerId);
28 
29 extern Oid get_database_oid(const char *dbname, bool missingok);
30 extern char *get_database_name(Oid dbid);
31 
32 extern void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype);
33 
34 #endif /* DBCOMMANDS_H */
Oid get_database_oid(const char *dbname, bool missingok)
Definition: dbcommands.c:2001
ObjectAddress RenameDatabase(const char *oldname, const char *newname)
Definition: dbcommands.c:969
ObjectAddress AlterDatabaseOwner(const char *dbname, Oid newOwnerId)
Definition: dbcommands.c:1593
char * get_database_name(Oid dbid)
Definition: dbcommands.c:2048
void dropdb(const char *dbname, bool missing_ok)
Definition: dbcommands.c:780
unsigned int Oid
Definition: postgres_ext.h:31
Oid createdb(ParseState *pstate, const CreatedbStmt *stmt)
Definition: dbcommands.c:99
void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype)
Definition: dbcommands.c:722
Oid AlterDatabaseSet(AlterDatabaseSetStmt *stmt)
Definition: dbcommands.c:1567
static char * encoding
Definition: initdb.c:120
char * dbname
Definition: streamutil.c:38
Oid AlterDatabase(ParseState *pstate, AlterDatabaseStmt *stmt, bool isTopLevel)
Definition: dbcommands.c:1389