Re: Doc anchors for COPY formats

Поиск
Список
Период
Сортировка
От Dagfinn Ilmari Mannsåker
Тема Re: Doc anchors for COPY formats
Дата
Msg-id 87bk5xijlb.fsf@wibble.ilmari.org
обсуждение исходный текст
Ответ на Re: Doc anchors for COPY formats  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes:

>> On 25 Apr 2024, at 13:23, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> wrote:
>
>> An IRC conversation just now made me notice that it would be handy to
>> have stable links for the descrpitions of the various COPY formats, per
>> the attached patch.
>
> No objections, that seems perfectly a reasonable idea.  Maybe we should set an
> xreflabel while at it for completeness sake?

xreflabel only affects the link text when using <xref>, but there are no
links to these sections in the docs, so I don't see much point.  One
thing that could make sense would be to link to the File Formats section
from the FORMAT keyword docs, like the attached.

- ilmari

From 8921e4b6d86d29210b9d59511def16ba34865f62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Thu, 25 Apr 2024 12:09:14 +0100
Subject: [PATCH v2] Add anchors for COPY format descriptions

And link the section from the FORMAT keyword description.
---
 doc/src/sgml/ref/copy.sgml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml
index 1ce19668d8..f52ad1e34f 100644
--- a/doc/src/sgml/ref/copy.sgml
+++ b/doc/src/sgml/ref/copy.sgml
@@ -220,6 +220,7 @@
       <literal>csv</literal> (Comma Separated Values),
       or <literal>binary</literal>.
       The default is <literal>text</literal>.
+      See <xref linkend="sql-copy-file-formats"/> below for details.
      </para>
     </listitem>
    </varlistentry>
@@ -627,10 +628,10 @@
 
  </refsect1>
 
- <refsect1>
+ <refsect1 id="sql-copy-file-formats" xreflabel="File Formats">
   <title>File Formats</title>
 
-  <refsect2>
+  <refsect2 id="sql-copy-text-format">
    <title>Text Format</title>
 
    <para>
@@ -770,7 +771,7 @@
    </para>
   </refsect2>
 
-  <refsect2>
+  <refsect2 id="sql-copy-csv-format">
    <title>CSV Format</title>
 
    <para>
@@ -855,7 +856,7 @@
 
   </refsect2>
 
-  <refsect2>
+  <refsect2 id="sql-copy-binary-format">
    <title>Binary Format</title>
 
    <para>
-- 
2.39.2


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Maxim Orlov
Дата:
Сообщение: Re: POC: make mxidoff 64 bits
Следующее
От: jian he
Дата:
Сообщение: Re: minor error message inconsistency in make_pathkey_from_sortinfo