mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
Avoid including commands/dbcommands.h in so many places
This has been done historically because of get_database_name (which since commitcb98e6fb8f
belongs in lsyscache.c/h, so let's move it there) and get_database_oid (which is in the right place, but whose declaration should appear in pg_database.h rather than dbcommands.h). Clean this up. Also, xlogreader.h and stringinfo.h are no longer needed by dbcommands.h since commitf1fd515b39
, so remove them. Author: Álvaro Herrera <alvherre@kurilemu.de> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/202508191031.5ipojyuaswzt@alvherre.pgsql
This commit is contained in:
@@ -14,9 +14,7 @@
|
||||
#ifndef DBCOMMANDS_H
|
||||
#define DBCOMMANDS_H
|
||||
|
||||
#include "access/xlogreader.h"
|
||||
#include "catalog/objectaddress.h"
|
||||
#include "lib/stringinfo.h"
|
||||
#include "parser/parse_node.h"
|
||||
|
||||
extern Oid createdb(ParseState *pstate, const CreatedbStmt *stmt);
|
||||
@@ -28,8 +26,6 @@ extern ObjectAddress AlterDatabaseRefreshColl(AlterDatabaseRefreshCollStmt *stmt
|
||||
extern Oid AlterDatabaseSet(AlterDatabaseSetStmt *stmt);
|
||||
extern ObjectAddress AlterDatabaseOwner(const char *dbname, Oid newOwnerId);
|
||||
|
||||
extern Oid get_database_oid(const char *dbname, bool missing_ok);
|
||||
extern char *get_database_name(Oid dbid);
|
||||
extern bool have_createdb_privilege(void);
|
||||
|
||||
extern void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype);
|
||||
|
Reference in New Issue
Block a user