1 | /*------------------------------------------------------------------------- |
2 | * |
3 | * dbcommands.h |
4 | * Database management commands (create/drop database). |
5 | * |
6 | * |
7 | * Portions Copyright (c) 1996-2019, 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); |
26 | extern Oid AlterDatabaseSet(AlterDatabaseSetStmt *stmt); |
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 */ |
35 | |