v1-0001-Docs-make-documentation-source-file-references-co.patch
application/octet-stream
Filename: v1-0001-Docs-make-documentation-source-file-references-co.patch
Type: application/octet-stream
Part: 0
From bba7535c7a5c0db92bc8d4409a3ce13eab0f4d1c Mon Sep 17 00:00:00 2001
From: "Chao Li (Evan)" <lic@highgo.com>
Date: Thu, 25 Dec 2025 09:50:20 +0800
Subject: [PATCH v1] Docs: make documentation source file references consistent
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The documentation currently mixes bare filenames and full source-tree
paths when referring to PostgreSQL source files and headers. Update
these references to consistently use full paths within the source tree
(e.g., src/include/…, src/backend/…).
Author: Chao Li <lic@highgo.com>
---
doc/src/sgml/config.sgml | 6 +++---
doc/src/sgml/cube.sgml | 2 +-
doc/src/sgml/ecpg.sgml | 6 +++---
doc/src/sgml/fdwhandler.sgml | 12 ++++++------
doc/src/sgml/generic-wal.sgml | 4 ++--
doc/src/sgml/gin.sgml | 2 +-
doc/src/sgml/indexam.sgml | 2 +-
doc/src/sgml/indices.sgml | 2 +-
doc/src/sgml/libpq.sgml | 2 +-
doc/src/sgml/pgbuffercache.sgml | 2 +-
doc/src/sgml/pgoverexplain.sgml | 6 +++---
doc/src/sgml/pgwalinspect.sgml | 2 +-
doc/src/sgml/spi.sgml | 4 ++--
doc/src/sgml/storage.sgml | 2 +-
doc/src/sgml/trigger.sgml | 6 +++---
doc/src/sgml/wal.sgml | 2 +-
doc/src/sgml/xaggr.sgml | 2 +-
doc/src/sgml/xfunc.sgml | 2 +-
18 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index cdfe8e376f0..fd6b3b49674 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -12310,8 +12310,8 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
This parameter can be very helpful when trying to trigger
hard-to-reproduce bugs involving concurrent catalog changes, but it
is otherwise rarely needed. See the source code files
- <filename>inval.c</filename> and
- <filename>pg_config_manual.h</filename> for details.
+ <filename>src/backend/utils/cache/inval.c</filename> and
+ <filename>src/include/pg_config_manual.h</filename> for details.
</para>
<para>
@@ -12437,7 +12437,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
<listitem>
<para>
Enabling this forces all parse and plan trees to be passed through
- <filename>outfuncs.c</filename>/<filename>readfuncs.c</filename>, to
+ <filename>src/backend/nodes/outfuncs.c</filename> and <filename>src/backend/nodes/readfuncs.c</filename>, to
facilitate catching errors and omissions in those modules. The
default is off.
</para>
diff --git a/doc/src/sgml/cube.sgml b/doc/src/sgml/cube.sgml
index a11c0cbd767..67d320c1500 100644
--- a/doc/src/sgml/cube.sgml
+++ b/doc/src/sgml/cube.sgml
@@ -597,7 +597,7 @@ t
<para>
To make it harder for people to break things, there
is a limit of 100 on the number of dimensions of cubes. This is set
- in <filename>cubedata.h</filename> if you need something bigger.
+ in <filename>contrib/cube/cubedata.h</filename> if you need something bigger.
</para>
</sect2>
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index 734a2df69e8..23d9f7f3c33 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -4198,7 +4198,7 @@ typedef struct sqlvar_struct sqlvar_t;
<listitem>
<para>
Contains the type identifier of the field. For values,
- see <literal>enum ECPGttype</literal> in <literal>ecpgtype.h</literal>.
+ see <literal>enum ECPGttype</literal> in <literal>src/interfaces/ecpg/include/ecpgtype.h</literal>.
</para>
</listitem>
</varlistentry>
@@ -8599,8 +8599,8 @@ EXEC SQL INCLUDE sqlda.h;
free(sqlda); /* The main structure is all to be free(),
* sqlda and sqlda->sqlvar is in one allocated area */
</programlisting>
- For more information, see the <literal>sqlda.h</literal> header and the
- <literal>src/interfaces/ecpg/test/compat_informix/sqlda.pgc</literal> regression test.
+ For more information, see the <filename>src/interfaces/ecpg/include/sqlda.h</filename> header and the
+ <filename>src/interfaces/ecpg/test/compat_informix/sqlda.pgc</filename> regression test.
</para>
</sect2>
diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml
index c6d66414b8e..0f8bd9c395a 100644
--- a/doc/src/sgml/fdwhandler.sgml
+++ b/doc/src/sgml/fdwhandler.sgml
@@ -1708,7 +1708,7 @@ GetForeignDataWrapperExtended(Oid fdwid, bits16 flags);
This function returns a <structname>ForeignDataWrapper</structname>
object for the foreign-data wrapper with the given OID. A
<structname>ForeignDataWrapper</structname> object contains properties
- of the FDW (see <filename>foreign/foreign.h</filename> for details).
+ of the FDW (see <filename>src/include/foreign/foreign.h</filename> for details).
<structfield>flags</structfield> is a bitwise-or'd bit mask indicating
an extra set of options. It can take the value
<literal>FDW_MISSING_OK</literal>, in which case a <literal>NULL</literal>
@@ -1725,7 +1725,7 @@ GetForeignDataWrapper(Oid fdwid);
This function returns a <structname>ForeignDataWrapper</structname>
object for the foreign-data wrapper with the given OID. A
<structname>ForeignDataWrapper</structname> object contains properties
- of the FDW (see <filename>foreign/foreign.h</filename> for details).
+ of the FDW (see <filename>src/include/foreign/foreign.h</filename> for details).
</para>
<para>
@@ -1737,7 +1737,7 @@ GetForeignServerExtended(Oid serverid, bits16 flags);
This function returns a <structname>ForeignServer</structname> object
for the foreign server with the given OID. A
<structname>ForeignServer</structname> object contains properties
- of the server (see <filename>foreign/foreign.h</filename> for details).
+ of the server (see <filename>src/include/foreign/foreign.h</filename> for details).
<structfield>flags</structfield> is a bitwise-or'd bit mask indicating
an extra set of options. It can take the value
<literal>FSV_MISSING_OK</literal>, in which case a <literal>NULL</literal>
@@ -1754,7 +1754,7 @@ GetForeignServer(Oid serverid);
This function returns a <structname>ForeignServer</structname> object
for the foreign server with the given OID. A
<structname>ForeignServer</structname> object contains properties
- of the server (see <filename>foreign/foreign.h</filename> for details).
+ of the server (see <filename>src/include/foreign/foreign.h</filename> for details).
</para>
<para>
@@ -1768,7 +1768,7 @@ GetUserMapping(Oid userid, Oid serverid);
mapping for the specific user, it will return the mapping for
<literal>PUBLIC</literal>, or throw error if there is none.) A
<structname>UserMapping</structname> object contains properties of the
- user mapping (see <filename>foreign/foreign.h</filename> for details).
+ user mapping (see <filename>src/include/foreign/foreign.h</filename> for details).
</para>
<para>
@@ -1780,7 +1780,7 @@ GetForeignTable(Oid relid);
This function returns a <structname>ForeignTable</structname> object for
the foreign table with the given OID. A
<structname>ForeignTable</structname> object contains properties of the
- foreign table (see <filename>foreign/foreign.h</filename> for details).
+ foreign table (see <filename>src/include/foreign/foreign.h</filename> for details).
</para>
<para>
diff --git a/doc/src/sgml/generic-wal.sgml b/doc/src/sgml/generic-wal.sgml
index 41f97ad7dc8..115aa77ff7e 100644
--- a/doc/src/sgml/generic-wal.sgml
+++ b/doc/src/sgml/generic-wal.sgml
@@ -19,8 +19,8 @@
<para>
The API for constructing generic WAL records is defined in
- <filename>access/generic_xlog.h</filename> and implemented
- in <filename>access/transam/generic_xlog.c</filename>.
+ <filename>src/include/access/generic_xlog.h</filename> and implemented
+ in <filename>src/backend/access/transam/generic_xlog.c</filename>.
</para>
<para>
diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml
index 82410b1fbdf..c2fd5ae1a70 100644
--- a/doc/src/sgml/gin.sgml
+++ b/doc/src/sgml/gin.sgml
@@ -227,7 +227,7 @@
in most cases is probably not a good candidate for a GIN operator
class.)
The symbols to use for setting this mode are defined in
- <filename>access/gin.h</filename>.
+ <filename>src/include/access/gin.h</filename>.
</para>
<para>
diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml
index 63d7e376f19..30c103f67f2 100644
--- a/doc/src/sgml/indexam.sgml
+++ b/doc/src/sgml/indexam.sgml
@@ -619,7 +619,7 @@ amadjustmembers (Oid opfamilyoid,
case <parameter>opclassoid</parameter> is <literal>InvalidOid</literal>.
The <type>List</type> arguments are lists
of <structname>OpFamilyMember</structname> structs, as defined
- in <filename>amapi.h</filename>.
+ in <filename>src/include/access/amapi.h</filename>.
Tests done by this function will typically be a subset of those
performed by <function>amvalidate</function>,
diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml
index 55f39b0df2f..173298dc21b 100644
--- a/doc/src/sgml/indices.sgml
+++ b/doc/src/sgml/indices.sgml
@@ -451,7 +451,7 @@ CREATE INDEX test2_mm_idx ON test2 (major, minor);
can be added to the index. Indexes can have up to 32 columns,
including <literal>INCLUDE</literal> columns. (This limit can be
altered when building <productname>PostgreSQL</productname>; see the
- file <filename>pg_config_manual.h</filename>.)
+ file <filename>src/include/pg_config_manual.h</filename>.)
</para>
<para>
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 7d05938feda..c87e170d575 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -4581,7 +4581,7 @@ Oid PQftype(const PGresult *res,
You can query the system table <structname>pg_type</structname> to
obtain the names and properties of the various data types. The
<acronym>OID</acronym>s of the built-in data types are defined
- in the file <filename>catalog/pg_type_d.h</filename>
+ in the file <filename>src/include/catalog/pg_type_d.h</filename>
in the <productname>PostgreSQL</productname>
installation's <filename>include</filename> directory.
</para>
diff --git a/doc/src/sgml/pgbuffercache.sgml b/doc/src/sgml/pgbuffercache.sgml
index 1e9aee10275..3d680a7059b 100644
--- a/doc/src/sgml/pgbuffercache.sgml
+++ b/doc/src/sgml/pgbuffercache.sgml
@@ -213,7 +213,7 @@
</para>
<para>
Fork number within the relation; see
- <filename>common/relpath.h</filename>
+ <filename>src/include/common/relpath.h</filename>
</para></entry>
</row>
diff --git a/doc/src/sgml/pgoverexplain.sgml b/doc/src/sgml/pgoverexplain.sgml
index e399c1cbad5..07be5cb3843 100644
--- a/doc/src/sgml/pgoverexplain.sgml
+++ b/doc/src/sgml/pgoverexplain.sgml
@@ -40,7 +40,7 @@ LOAD 'pg_overexplain';
the plan tree that is not normally shown because it is not expected to be
of general interest. For each individual plan node, it will display the
following fields. See <structname>Plan</structname> in
- <filename>nodes/plannodes.h</filename> for additional documentation of these
+ <filename>src/include/nodes/plannodes.h</filename> for additional documentation of these
fields.
</para>
@@ -83,7 +83,7 @@ LOAD 'pg_overexplain';
<para>
Once per query, the <literal>DEBUG</literal> option will display the
following fields. See <structname>PlannedStmt</structname> in
- <filename>nodes/plannodes.h</filename> for additional detail.
+ <filename>src/include/nodes/plannodes.h</filename> for additional detail.
</para>
<itemizedlist>
@@ -186,7 +186,7 @@ LOAD 'pg_overexplain';
<para>
For more information about range table entries, see the definition of
- <structname>RangeTblEntry</structname> in <filename>nodes/parsenodes.h</filename>.
+ <structname>RangeTblEntry</structname> in <filename>src/include/nodes/parsenodes.h</filename>.
</para>
</sect2>
diff --git a/doc/src/sgml/pgwalinspect.sgml b/doc/src/sgml/pgwalinspect.sgml
index 79c3ead40bc..3ed84bdd771 100644
--- a/doc/src/sgml/pgwalinspect.sgml
+++ b/doc/src/sgml/pgwalinspect.sgml
@@ -202,7 +202,7 @@ block_fpi_data |
<link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>relfilenode</structfield>
respectively. The <structfield>relforknumber</structfield>
field is the fork number within the relation for the block
- reference; see <filename>common/relpath.h</filename> for
+ reference; see <filename>src/include/common/relpath.h</filename> for
details.
</para>
<tip>
diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml
index e30d0962ae7..f76d769ead8 100644
--- a/doc/src/sgml/spi.sgml
+++ b/doc/src/sgml/spi.sgml
@@ -1130,7 +1130,7 @@ SPIPlanPtr SPI_prepare(const char * <parameter>command</parameter>, int <paramet
<para>
<type>SPIPlanPtr</type> is declared as a pointer to an opaque struct type in
- <filename>spi.h</filename>. It is unwise to try to access its contents
+ <filename>src/include/executor/spi.h</filename>. It is unwise to try to access its contents
directly, as that makes your code much more likely to break in
future revisions of <productname>PostgreSQL</productname>.
</para>
@@ -1171,7 +1171,7 @@ SPIPlanPtr SPI_prepare_cursor(const char * <parameter>command</parameter>, int <
<function>SPI_prepare_cursor</function> is identical to
<function>SPI_prepare</function>, except that it also allows specification
of the planner's <quote>cursor options</quote> parameter. This is a bit mask
- having the values shown in <filename>nodes/parsenodes.h</filename>
+ having the values shown in <filename>src/include/nodes/parsenodes.h</filename>
for the <structfield>options</structfield> field of <structname>DeclareCursorStmt</structname>.
<function>SPI_prepare</function> always takes the cursor options as zero.
</para>
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 02ddfda834a..b85a3f72b5d 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -394,7 +394,7 @@ The oldest and most common type is a pointer to out-of-line data stored in
a <firstterm><acronym>TOAST</acronym> table</firstterm> that is separate from, but
associated with, the table containing the <acronym>TOAST</acronym> pointer datum
itself. These <firstterm>on-disk</firstterm> pointer datums are created by the
-<acronym>TOAST</acronym> management code (in <filename>access/common/toast_internals.c</filename>)
+<acronym>TOAST</acronym> management code (in <filename>src/backend/access/common/toast_internals.c</filename>)
when a tuple to be stored on disk is too large to be stored as-is.
Further details appear in <xref linkend="storage-toast-ondisk"/>.
Alternatively, a <acronym>TOAST</acronym> pointer datum can contain a pointer to
diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml
index 0062f1a3fd1..f90ede3304a 100644
--- a/doc/src/sgml/trigger.sgml
+++ b/doc/src/sgml/trigger.sgml
@@ -549,7 +549,7 @@ CALLED_AS_TRIGGER(fcinfo)
<para>
<structname>struct TriggerData</structname> is defined in
- <filename>commands/trigger.h</filename>:
+ <filename>src/include/commands/trigger.h</filename>:
<programlisting>
typedef struct TriggerData
@@ -678,7 +678,7 @@ typedef struct TriggerData
<listitem>
<para>
A pointer to a structure describing the relation that the trigger fired for.
- Look at <filename>utils/rel.h</filename> for details about
+ Look at <filename>src/include/utils/rel.h</filename> for details about
this structure. The most interesting things are
<literal>tg_relation->rd_att</literal> (descriptor of the relation
tuples) and <literal>tg_relation->rd_rel->relname</literal>
@@ -727,7 +727,7 @@ typedef struct TriggerData
<listitem>
<para>
A pointer to a structure of type <structname>Trigger</structname>,
- defined in <filename>utils/reltrigger.h</filename>:
+ defined in <filename>src/include/utils/reltrigger.h</filename>:
<programlisting>
typedef struct Trigger
diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml
index f3b86b26be9..fb5d12501ef 100644
--- a/doc/src/sgml/wal.sgml
+++ b/doc/src/sgml/wal.sgml
@@ -883,7 +883,7 @@
by altering the <option>--wal-segsize</option> <application>initdb</application> option). Each segment is
divided into pages, normally 8 kB each (this size can be changed via the
<option>--with-wal-blocksize</option> configure option). The WAL record headers
- are described in <filename>access/xlogrecord.h</filename>; the record
+ are described in <filename>src/include/access/xlogrecord.h</filename>; the record
content is dependent on the type of event that is being logged. Segment
files are given ever-increasing numbers as names, starting at
<filename>000000010000000000000001</filename>. The numbers do not wrap,
diff --git a/doc/src/sgml/xaggr.sgml b/doc/src/sgml/xaggr.sgml
index bdad8d3dc2b..fa733134adc 100644
--- a/doc/src/sgml/xaggr.sgml
+++ b/doc/src/sgml/xaggr.sgml
@@ -661,7 +661,7 @@ if (AggCheckCallContext(fcinfo, NULL))
for ordered-set aggregates, which can inspect the substructure of
the <literal>Aggref</literal> node to find out what sort ordering they are
supposed to implement. Examples can be found
- in <filename>orderedsetaggs.c</filename> in the <productname>PostgreSQL</productname>
+ in <filename>src/backend/utils/adt/orderedsetaggs.c</filename> in the <productname>PostgreSQL</productname>
source code.
</para>
diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml
index e9288bd6b5e..5164d678638 100644
--- a/doc/src/sgml/xfunc.sgml
+++ b/doc/src/sgml/xfunc.sgml
@@ -2405,7 +2405,7 @@ PG_FUNCTION_INFO_V1(funcname);
<para>
These convenience functions and similar ones can be found
- in <filename>fmgr.h</filename>.
+ in <filename>src/include/fmgr.h</filename>.
The <function>DirectFunctionCall<replaceable>n</replaceable></function>
family expect a C function name as their first argument. There are also
<function>OidFunctionCall<replaceable>n</replaceable></function> which
--
2.39.5 (Apple Git-154)