PostgreSQL Source Code  git master
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-2022, 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 "parser/parse_node.h"
21 
22 extern Oid createdb(ParseState *pstate, const CreatedbStmt *stmt);
23 extern void dropdb(const char *dbname, bool missing_ok, bool force);
24 extern void DropDatabase(ParseState *pstate, DropdbStmt *stmt);
25 extern ObjectAddress RenameDatabase(const char *oldname, const char *newname);
26 extern Oid AlterDatabase(ParseState *pstate, AlterDatabaseStmt *stmt, bool isTopLevel);
29 extern ObjectAddress AlterDatabaseOwner(const char *dbname, Oid newOwnerId);
30 
31 extern Oid get_database_oid(const char *dbname, bool missing_ok);
32 extern char *get_database_name(Oid dbid);
33 
34 extern void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype);
35 
36 #endif /* DBCOMMANDS_H */
ObjectAddress AlterDatabaseRefreshColl(AlterDatabaseRefreshCollStmt *stmt)
Definition: dbcommands.c:2347
ObjectAddress RenameDatabase(const char *oldname, const char *newname)
Definition: dbcommands.c:1717
char * get_database_name(Oid dbid)
Definition: dbcommands.c:2994
Oid get_database_oid(const char *dbname, bool missing_ok)
Definition: dbcommands.c:2947
ObjectAddress AlterDatabaseOwner(const char *dbname, Oid newOwnerId)
Definition: dbcommands.c:2456
void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype)
Definition: dbcommands.c:1434
Oid createdb(ParseState *pstate, const CreatedbStmt *stmt)
Definition: dbcommands.c:674
Oid AlterDatabase(ParseState *pstate, AlterDatabaseStmt *stmt, bool isTopLevel)
Definition: dbcommands.c:2180
void DropDatabase(ParseState *pstate, DropdbStmt *stmt)
Definition: dbcommands.c:2155
void dropdb(const char *dbname, bool missing_ok, bool force)
Definition: dbcommands.c:1511
Oid AlterDatabaseSet(AlterDatabaseSetStmt *stmt)
Definition: dbcommands.c:2430
int32 encoding
Definition: pg_database.h:41
unsigned int Oid
Definition: postgres_ext.h:31
char * dbname
Definition: streamutil.c:51