Subject: copy.sgml: add XML ID attributes to <varlistentry> tags.

From: jian he <[email-masked]>
Date: Wed, 29 Oct 2025 21:28:07 +0800

hi.

similar to what we did in
https://git.postgresql.org/cgit/postgresql.git/commit/?id=78ee60ed84bb3a1cf0b6bd9a715dcbcf252a90f5

I happened to notice COPY.sgml <refsect1> Parameters section is un-linkable.
The Parameters section in copy.sgml has shorter explanations compared to
create_table.sgml, but it contains a long list of options.

So I think making Each parameter linkable would improve readability.
From 3a2ffea61f42d9790ffdb2a945810739575acefc Mon Sep 17 00:00:00 2001
From: jian he <[email-masked]>
Date: Wed, 29 Oct 2025 21:25:22 +0800
Subject: [PATCH v1 1/1] make COPY.sgml Parameters linkable

doc changes:

Discussion: https://postgr.es/m/
---
 doc/src/sgml/ref/copy.sgml | 50 +++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml
index fdc24b36bb8..27a2c418760 100644
--- a/doc/src/sgml/ref/copy.sgml
+++ b/doc/src/sgml/ref/copy.sgml
@@ -105,7 +105,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
   <title>Parameters</title>
 
   <variablelist>
-   <varlistentry>
+   <varlistentry id="sql-copy-table_name">
     <term><replaceable class="parameter">table_name</replaceable></term>
     <listitem>
      <para>
@@ -114,7 +114,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-column_name">
     <term><replaceable class="parameter">column_name</replaceable></term>
      <listitem>
      <para>
@@ -125,7 +125,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-query">
     <term><replaceable class="parameter">query</replaceable></term>
     <listitem>
      <para>
@@ -149,7 +149,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-filename">
     <term><replaceable class="parameter">filename</replaceable></term>
     <listitem>
      <para>
@@ -161,7 +161,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-PROGRAM">
     <term><literal>PROGRAM</literal></term>
     <listitem>
      <para>
@@ -180,7 +180,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-STDIN">
     <term><literal>STDIN</literal></term>
     <listitem>
      <para>
@@ -189,7 +189,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-STDOUT">
     <term><literal>STDOUT</literal></term>
     <listitem>
      <para>
@@ -198,7 +198,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-boolean">
     <term><replaceable class="parameter">boolean</replaceable></term>
     <listitem>
      <para>
@@ -212,7 +212,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-integer">
     <term><replaceable class="parameter">integer</replaceable></term>
     <listitem>
      <para>
@@ -221,7 +221,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-FORMAT">
     <term><literal>FORMAT</literal></term>
     <listitem>
      <para>
@@ -235,7 +235,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-FREEZE">
     <term><literal>FREEZE</literal></term>
     <listitem>
      <para>
@@ -258,7 +258,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-DELIMITER">
     <term><literal>DELIMITER</literal></term>
     <listitem>
      <para>
@@ -271,7 +271,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-NULL">
     <term><literal>NULL</literal></term>
     <listitem>
      <para>
@@ -295,7 +295,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-DEFAULT">
     <term><literal>DEFAULT</literal></term>
     <listitem>
      <para>
@@ -308,7 +308,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-HEADER">
     <term><literal>HEADER</literal></term>
     <listitem>
      <para>
@@ -335,7 +335,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-QUOTE">
     <term><literal>QUOTE</literal></term>
     <listitem>
      <para>
@@ -347,7 +347,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-ESCAPE">
     <term><literal>ESCAPE</literal></term>
     <listitem>
      <para>
@@ -361,7 +361,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-FORCE_QUOTE">
     <term><literal>FORCE_QUOTE</literal></term>
     <listitem>
      <para>
@@ -375,7 +375,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-FORCE_NOT_NULL">
     <term><literal>FORCE_NOT_NULL</literal></term>
     <listitem>
      <para>
@@ -390,7 +390,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-FORCE_NULL">
     <term><literal>FORCE_NULL</literal></term>
     <listitem>
      <para>
@@ -405,7 +405,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-ON_ERROR">
     <term><literal>ON_ERROR</literal></term>
     <listitem>
      <para>
@@ -433,7 +433,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-REJECT_LIMIT">
     <term><literal>REJECT_LIMIT</literal></term>
     <listitem>
      <para>
@@ -451,7 +451,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-ENCODING">
     <term><literal>ENCODING</literal></term>
     <listitem>
      <para>
@@ -463,7 +463,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-LOG_VERBOSITY">
     <term><literal>LOG_VERBOSITY</literal></term>
     <listitem>
      <para>
@@ -481,7 +481,7 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
     </listitem>
    </varlistentry>
 
-   <varlistentry>
+   <varlistentry id="sql-copy-WHERE">
     <term><literal>WHERE</literal></term>
     <listitem>
    <para>
-- 
2.34.1

---

From: Álvaro Herrera <[email-masked]>
Date: Fri, 14 Nov 2025 12:05:23 +0100

> So I think making Each parameter linkable would improve readability.

Makes sense.  I have pushed this.  Two minor tweaks: a) I added IDs to
refsect1s as well, because we do that in the other ref pages, and it
seemed out of place to have them in parameters but not for the sections,
and b) I renamed the ones in your patch to use all-lowercase (as well as
dash instead of underscore), as well as added the "-params" marker to
create a sort of hierarchy of the IDs, the way we do in other pages.

Thanks!

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Linux transformó mi computadora, de una `máquina para hacer cosas',
en un aparato realmente entretenido, sobre el cual cada día aprendo
algo nuevo" (Jaime Salinas)