PostgreSQL Source Code  git master
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-2024, 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
17 #include "access/xlogreader.h"
18 #include "catalog/objectaddress.h"
19 #include "lib/stringinfo.h"
20 #include "parser/parse_node.h"
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);
31 extern Oid get_database_oid(const char *dbname, bool missing_ok);
32 extern char *get_database_name(Oid dbid);
33 extern bool have_createdb_privilege(void);
35 extern void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype);
37 #endif /* DBCOMMANDS_H */
ObjectAddress AlterDatabaseRefreshColl(AlterDatabaseRefreshCollStmt *stmt)
Definition: dbcommands.c:2487
bool have_createdb_privilege(void)
Definition: dbcommands.c:2919
ObjectAddress RenameDatabase(const char *oldname, const char *newname)
Definition: dbcommands.c:1856
char * get_database_name(Oid dbid)
Definition: dbcommands.c:3154
Oid get_database_oid(const char *dbname, bool missing_ok)
Definition: dbcommands.c:3107
ObjectAddress AlterDatabaseOwner(const char *dbname, Oid newOwnerId)
Definition: dbcommands.c:2607
void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype)
Definition: dbcommands.c:1557
Oid createdb(ParseState *pstate, const CreatedbStmt *stmt)
Definition: dbcommands.c:670
Oid AlterDatabase(ParseState *pstate, AlterDatabaseStmt *stmt, bool isTopLevel)
Definition: dbcommands.c:2316
void DropDatabase(ParseState *pstate, DropdbStmt *stmt)
Definition: dbcommands.c:2291
void dropdb(const char *dbname, bool missing_ok, bool force)
Definition: dbcommands.c:1634
Oid AlterDatabaseSet(AlterDatabaseSetStmt *stmt)
Definition: dbcommands.c:2581
#define stmt
Definition: indent_codes.h:59
int32 encoding
Definition: pg_database.h:41
unsigned int Oid
Definition: postgres_ext.h:31
char * dbname
Definition: streamutil.c:52