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
22extern Oid createdb(ParseState *pstate, const CreatedbStmt *stmt);
23extern void dropdb(const char *dbname, bool missing_ok);
24extern ObjectAddress RenameDatabase(const char *oldname, const char *newname);
25extern Oid AlterDatabase(ParseState *pstate, AlterDatabaseStmt *stmt, bool isTopLevel);
26extern Oid AlterDatabaseSet(AlterDatabaseSetStmt *stmt);
27extern ObjectAddress AlterDatabaseOwner(const char *dbname, Oid newOwnerId);
28
29extern Oid get_database_oid(const char *dbname, bool missingok);
30extern char *get_database_name(Oid dbid);
31
32extern void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype);
33
34#endif /* DBCOMMANDS_H */
35