From 325fc0ab14d11fc87da594857ffbb6636affe7c0 Mon Sep 17 00:00:00 2001 From: Álvaro Herrera Date: Thu, 28 Aug 2025 12:39:04 +0200 Subject: Avoid including commands/dbcommands.h in so many places MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This has been done historically because of get_database_name (which since commit cb98e6fb8fd4 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 commit f1fd515b393a, so remove them. Author: Álvaro Herrera Reviewed-by: Bertrand Drouvot Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/202508191031.5ipojyuaswzt@alvherre.pgsql --- src/include/commands/dbcommands.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/include/commands/dbcommands.h') diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h index 524ac6d97e8..d48ab6d7d7d 100644 --- a/src/include/commands/dbcommands.h +++ b/src/include/commands/dbcommands.h @@ -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); -- cgit v1.2.3