2
0

dbcommands.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  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. #include "access/xlogreader.h"
  17. #include "catalog/objectaddress.h"
  18. #include "lib/stringinfo.h"
  19. #include "parser/parse_node.h"
  20. extern Oid createdb(ParseState *pstate, const CreatedbStmt *stmt);
  21. extern void dropdb(const char *dbname, bool missing_ok, bool force);
  22. extern void DropDatabase(ParseState *pstate, DropdbStmt *stmt);
  23. extern ObjectAddress RenameDatabase(const char *oldname, const char *newname);
  24. extern Oid AlterDatabase(ParseState *pstate, AlterDatabaseStmt *stmt, bool isTopLevel);
  25. extern ObjectAddress AlterDatabaseRefreshColl(AlterDatabaseRefreshCollStmt *stmt);
  26. extern Oid AlterDatabaseSet(AlterDatabaseSetStmt *stmt);
  27. extern ObjectAddress AlterDatabaseOwner(const char *dbname, Oid newOwnerId);
  28. extern Oid get_database_oid(const char *dbname, bool missing_ok);
  29. extern char *get_database_name(Oid dbid);
  30. extern void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype);
  31. #endif /* DBCOMMANDS_H */