From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Avoid including commands/dbcommands.h in so many places |
Date: | 2025-08-28 13:21:24 |
Message-ID: | E1urcZ9-0024ib-2H@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Avoid including commands/dbcommands.h in so many places
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 <alvherre(at)kurilemu(dot)de>
Reviewed-by: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://postgr.es/m/202508191031.5ipojyuaswzt@alvherre.pgsql
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/325fc0ab14d11fc87da594857ffbb6636affe7c0
Modified Files
--------------
contrib/sepgsql/database.c | 1 -
contrib/sepgsql/label.c | 1 -
src/backend/access/heap/vacuumlazy.c | 1 -
src/backend/access/transam/multixact.c | 2 +-
src/backend/access/transam/varsup.c | 2 +-
src/backend/catalog/aclchk.c | 1 -
src/backend/catalog/namespace.c | 1 -
src/backend/catalog/objectaddress.c | 1 -
src/backend/catalog/pg_shdepend.c | 2 +-
src/backend/commands/analyze.c | 1 -
src/backend/commands/comment.c | 2 +-
src/backend/commands/dbcommands.c | 25 +------------------------
src/backend/commands/indexcmds.c | 1 -
src/backend/commands/publicationcmds.c | 1 -
src/backend/commands/schemacmds.c | 2 +-
src/backend/commands/subscriptioncmds.c | 1 -
src/backend/commands/trigger.c | 1 -
src/backend/parser/parse_expr.c | 1 -
src/backend/parser/parse_target.c | 1 -
src/backend/postmaster/autovacuum.c | 1 -
src/backend/replication/logical/slotsync.c | 1 -
src/backend/replication/walsender.c | 2 +-
src/backend/storage/ipc/procarray.c | 2 +-
src/backend/utils/adt/acl.c | 1 -
src/backend/utils/adt/dbsize.c | 2 +-
src/backend/utils/adt/misc.c | 1 -
src/backend/utils/adt/regproc.c | 2 +-
src/backend/utils/adt/xml.c | 1 -
src/backend/utils/cache/lsyscache.c | 27 +++++++++++++++++++++++++++
src/include/catalog/pg_database.h | 1 +
src/include/commands/dbcommands.h | 4 ----
src/include/utils/lsyscache.h | 2 +-
src/test/modules/worker_spi/worker_spi.c | 2 +-
33 files changed, 40 insertions(+), 57 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Álvaro Herrera | 2025-08-28 13:23:07 | Re: pgsql: Move SQL-callable code related to multixacts into its own file |
Previous Message | Peter Eisentraut | 2025-08-28 07:17:05 | pgsql: Message style improvements |