agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
[PATCH] doc: Use uppercase keywords in foreign key tutorial
8+ messages / 4 participants
[nested] [flat]

* [PATCH] doc: Use uppercase keywords in foreign key tutorial
@ 2025-10-16 08:30  Erik Wienhold <ewie@ewie.name>
  0 siblings, 0 replies; 8+ messages in thread

From: Erik Wienhold @ 2025-10-16 08:30 UTC (permalink / raw)

Make it consistent with the rest of the docs.
---
 doc/src/sgml/advanced.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/advanced.sgml b/doc/src/sgml/advanced.sgml
index e15a3323dfb..1f37dc73be8 100644
--- a/doc/src/sgml/advanced.sgml
+++ b/doc/src/sgml/advanced.sgml
@@ -101,12 +101,12 @@ SELECT * FROM myview;
 
 <programlisting>
 CREATE TABLE cities (
-        name     varchar(80) primary key,
+        name     varchar(80) PRIMARY KEY,
         location point
 );
 
 CREATE TABLE weather (
-        city      varchar(80) references cities(name),
+        city      varchar(80) REFERENCES cities(name),
         temp_lo   int,
         temp_hi   int,
         prcp      real,
-- 
2.51.0


--ndbxger6sdjxhx3v--





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* [PATCH] doc: Use uppercase keywords in foreign key tutorial
@ 2025-10-16 08:30  Erik Wienhold <ewie@ewie.name>
  0 siblings, 0 replies; 8+ messages in thread

From: Erik Wienhold @ 2025-10-16 08:30 UTC (permalink / raw)

Make it consistent with the rest of the docs.
---
 doc/src/sgml/advanced.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/advanced.sgml b/doc/src/sgml/advanced.sgml
index e15a3323dfb..1f37dc73be8 100644
--- a/doc/src/sgml/advanced.sgml
+++ b/doc/src/sgml/advanced.sgml
@@ -101,12 +101,12 @@ SELECT * FROM myview;
 
 <programlisting>
 CREATE TABLE cities (
-        name     varchar(80) primary key,
+        name     varchar(80) PRIMARY KEY,
         location point
 );
 
 CREATE TABLE weather (
-        city      varchar(80) references cities(name),
+        city      varchar(80) REFERENCES cities(name),
         temp_lo   int,
         temp_hi   int,
         prcp      real,
-- 
2.51.0


--ndbxger6sdjxhx3v--





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* 66.6. Database Page Layout
@ 2026-07-08 10:43  PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 8+ messages in thread

From: PG Doc comments form @ 2026-07-08 10:43 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: y.saburov@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/18/storage-page-layout.html
Description:

> The second field contains the page checksum if -k are enabled.

-k -- This is enabled by default; use --no-data-checksums to disable
checksums.

Why does this need to be clarified?






^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 66.6. Database Page Layout
@ 2026-07-09 21:58  Daniel Gustafsson <daniel@yesql.se>
  parent: PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 8+ messages in thread

From: Daniel Gustafsson @ 2026-07-09 21:58 UTC (permalink / raw)
  To: y.saburov@gmail.com, PostgreSQL-documentation <pgsql-docs@lists.postgresql.org>

> On 8 Jul 2026, at 12:43, PG Doc comments form <noreply@postgresql.org> wrote:
> 
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/18/storage-page-layout.html
> Description:
> 
>> The second field contains the page checksum if -k are enabled.
> 
> -k -- This is enabled by default; use --no-data-checksums to disable
> checksums.
> 
> Why does this need to be clarified?

I'm not entirely sure which part you are referring to, but I agree that the
current wording isn't very good.

	"The second field contains the page checksum if -k are enabled."

I propose the attached patch which changes the sentence to "The second field
contains the page checksum if data checksums are enabled." with a link to the
Checksums chapter in the documentation instead.

--
Daniel Gustafsson

Attachments:

  [application/octet-stream] page_layout_checksums.diff (782B, ../../24B34848-3557-48E0-B601-A5BA4FC4E057@yesql.se/2-page_layout_checksums.diff)
  download | inline diff:
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 6b6377503bf..19924b98d71 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -797,7 +797,7 @@ data. Empty in ordinary tables.</entry>
   (<structname>PageHeaderData</structname>). Its format is detailed in <xref
   linkend="pageheaderdata-table"/>. The first field tracks the most
   recent WAL entry related to this page. The second field contains
-  the page checksum if <xref linkend="app-initdb-data-checksums"/> are
+  the page checksum if <link linkend="checksums">data checksums</link> are
   enabled.  Next is a 2-byte field containing flag bits. This is followed
   by three 2-byte integer fields (<structfield>pd_lower</structfield>,
   <structfield>pd_upper</structfield>, and

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 66.6. Database Page Layout
@ 2026-07-10 06:33  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 1 reply; 8+ messages in thread

From: Laurenz Albe @ 2026-07-10 06:33 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; y.saburov@gmail.com, PostgreSQL-documentation <pgsql-docs@lists.postgresql.org>

On Thu, 2026-07-09 at 23:58 +0200, Daniel Gustafsson wrote:
> 
> I propose the attached patch which changes the sentence to "The second field
> contains the page checksum if data checksums are enabled." with a link to the
> Checksums chapter in the documentation instead.

That patch looks good to me.

Yours,
Laurenz Albe






^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 66.6. Database Page Layout
@ 2026-07-15 13:17  Daniel Gustafsson <daniel@yesql.se>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 8+ messages in thread

From: Daniel Gustafsson @ 2026-07-15 13:17 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: y.saburov@gmail.com, PostgreSQL-documentation <pgsql-docs@lists.postgresql.org>

> On 10 Jul 2026, at 08:33, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> 
> On Thu, 2026-07-09 at 23:58 +0200, Daniel Gustafsson wrote:
>> 
>> I propose the attached patch which changes the sentence to "The second field
>> contains the page checksum if data checksums are enabled." with a link to the
>> Checksums chapter in the documentation instead.
> 
> That patch looks good to me.

I took another look at this today to close the thread and found that there were
one more occurrence of this pattern stemming from 67846550dc6d which removed
the initdb xreflabels.  The attached patches fix the other one as well as
changes the link in the amcheck docs to point to the main checksums page which
is more relevant than the (now default) initdb option.  Patches for master down
to v18 attached.

--
Daniel Gustafsson

Attachments:

  [application/octet-stream] vmaster-0001-doc-Fix-link-text-for-data-checksums.patch (3.4K, ../../210B5177-F2C0-464B-A0E0-D977E042F10B@yesql.se/2-vmaster-0001-doc-Fix-link-text-for-data-checksums.patch)
  download | inline diff:
From 08bf966f47a85cc9ec291bea84d90ca53c090345 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: Wed, 15 Jul 2026 15:02:51 +0200
Subject: [PATCH vmaster] doc: Fix link text for data checksums

Commit 67846550dc6d removed the xreflabels for initdb options, which
turned the sentence "The second field contains the page checksum if
data checksums are enabled" into "The second field contains the page
checksum if -k are enabled", as well "Only has effect if data checksums
are enabled" into "Only has effect if -k are enabled".

Fix by setting an explicit link text, and while there also change the
link to point to the data checksum page which has more information
than just the initdb option.

The original report was for one instance, further inspection turned
up quite a few more cases.  Also redirect the link in the amcheck
docs which albeit was reading right, but will be more helpful if
linking to the main page on data checksums.  Backpatch to v18 where
the xreflabels were removed.

Author: Daniel Gustafsson <daniel@yesql.se>
Reported-by: y.saburov@gmail.com
Reviewed-by: Laurenz Albe <laurenz.albe@cybertec.at>
Discussion: https://postgr.es/m/178350739237.73862.4549076173872335741@wrigleys.postgresql.org
Backpatch-through: 18
---
 doc/src/sgml/amcheck.sgml | 5 ++---
 doc/src/sgml/config.sgml  | 2 +-
 doc/src/sgml/storage.sgml | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/amcheck.sgml b/doc/src/sgml/amcheck.sgml
index 08006856579..13a6bb18897 100644
--- a/doc/src/sgml/amcheck.sgml
+++ b/doc/src/sgml/amcheck.sgml
@@ -421,9 +421,8 @@ SET client_min_messages = DEBUG1;
 
  <para>
   <filename>amcheck</filename> can be effective at detecting various types of
-  failure modes that <link
-  linkend="app-initdb-data-checksums"><application>data
-  checksums</application></link> will fail to catch.  These include:
+  failure modes that <link linkend="checksums">data checksums</link> will fail
+  to catch.  These include:
 
   <itemizedlist>
    <listitem>
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 0848c18d329..1bc82182cd3 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -13229,7 +13229,7 @@ LOG:  CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
       </term>
       <listitem>
        <para>
-        Only has effect if <xref linkend="app-initdb-data-checksums"/> are enabled.
+        Only has effect if <link linkend="checksums">data checksums</link> are enabled.
        </para>
        <para>
         Detection of a checksum failure during a read normally causes
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 6b6377503bf..19924b98d71 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -797,7 +797,7 @@ data. Empty in ordinary tables.</entry>
   (<structname>PageHeaderData</structname>). Its format is detailed in <xref
   linkend="pageheaderdata-table"/>. The first field tracks the most
   recent WAL entry related to this page. The second field contains
-  the page checksum if <xref linkend="app-initdb-data-checksums"/> are
+  the page checksum if <link linkend="checksums">data checksums</link> are
   enabled.  Next is a 2-byte field containing flag bits. This is followed
   by three 2-byte integer fields (<structfield>pd_lower</structfield>,
   <structfield>pd_upper</structfield>, and
-- 
2.39.3 (Apple Git-146)

=

  [application/octet-stream] v18-0001-doc-Fix-link-text-for-data-checksums.patch (3.4K, ../../210B5177-F2C0-464B-A0E0-D977E042F10B@yesql.se/3-v18-0001-doc-Fix-link-text-for-data-checksums.patch)
  download | inline diff:
From f03ad3630831265bd5e1daf335cbbb7bf51f5461 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: Wed, 15 Jul 2026 15:02:51 +0200
Subject: [PATCH v18] doc: Fix link text for data checksums

Commit 67846550dc6d removed the xreflabels for initdb options, which
turned the sentence "The second field contains the page checksum if
data checksums are enabled" into "The second field contains the page
checksum if -k are enabled", as well "Only has effect if data checksums
are enabled" into "Only has effect if -k are enabled".

Fix by setting an explicit link text, and while there also change the
link to point to the data checksum page which has more information
than just the initdb option.

The original report was for one instance, further inspection turned
up quite a few more cases.  Also redirect the link in the amcheck
docs which albeit was reading right, but will be more helpful if
linking to the main page on data checksums.  Backpatch to v18 where
the xreflabels were removed.

Author: Daniel Gustafsson <daniel@yesql.se>
Reported-by: y.saburov@gmail.com
Reviewed-by: Laurenz Albe <laurenz.albe@cybertec.at>
Discussion: https://postgr.es/m/178350739237.73862.4549076173872335741@wrigleys.postgresql.org
Backpatch-through: 18
---
 doc/src/sgml/amcheck.sgml | 5 ++---
 doc/src/sgml/config.sgml  | 2 +-
 doc/src/sgml/storage.sgml | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/amcheck.sgml b/doc/src/sgml/amcheck.sgml
index 0402172a5ff..747dc115f48 100644
--- a/doc/src/sgml/amcheck.sgml
+++ b/doc/src/sgml/amcheck.sgml
@@ -421,9 +421,8 @@ SET client_min_messages = DEBUG1;
 
  <para>
   <filename>amcheck</filename> can be effective at detecting various types of
-  failure modes that <link
-  linkend="app-initdb-data-checksums"><application>data
-  checksums</application></link> will fail to catch.  These include:
+  failure modes that <link linkend="checksums">data checksums</link> will fail
+  to catch.  These include:
 
   <itemizedlist>
    <listitem>
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index c688ed05f72..9ec0d56038d 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -12658,7 +12658,7 @@ LOG:  CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
       </term>
       <listitem>
        <para>
-        Only has effect if <xref linkend="app-initdb-data-checksums"/> are enabled.
+        Only has effect if <link linkend="checksums">data checksums</link> are enabled.
        </para>
        <para>
         Detection of a checksum failure during a read normally causes
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 61250799ec0..245f18c65c9 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -793,7 +793,7 @@ data. Empty in ordinary tables.</entry>
   (<structname>PageHeaderData</structname>). Its format is detailed in <xref
   linkend="pageheaderdata-table"/>. The first field tracks the most
   recent WAL entry related to this page. The second field contains
-  the page checksum if <xref linkend="app-initdb-data-checksums"/> are
+  the page checksum if <link linkend="checksums">data checksums</link> are
   enabled.  Next is a 2-byte field containing flag bits. This is followed
   by three 2-byte integer fields (<structfield>pd_lower</structfield>,
   <structfield>pd_upper</structfield>, and
-- 
2.39.3 (Apple Git-146)

=

  [application/octet-stream] v19-0001-doc-Fix-link-text-for-data-checksums.patch (3.4K, ../../210B5177-F2C0-464B-A0E0-D977E042F10B@yesql.se/4-v19-0001-doc-Fix-link-text-for-data-checksums.patch)
  download | inline diff:
From d8f036876661a67079b62c5415279a88ca19c26f Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: Wed, 15 Jul 2026 15:02:51 +0200
Subject: [PATCH v19] doc: Fix link text for data checksums

Commit 67846550dc6d removed the xreflabels for initdb options, which
turned the sentence "The second field contains the page checksum if
data checksums are enabled" into "The second field contains the page
checksum if -k are enabled", as well "Only has effect if data checksums
are enabled" into "Only has effect if -k are enabled".

Fix by setting an explicit link text, and while there also change the
link to point to the data checksum page which has more information
than just the initdb option.

The original report was for one instance, further inspection turned
up quite a few more cases.  Also redirect the link in the amcheck
docs which albeit was reading right, but will be more helpful if
linking to the main page on data checksums.  Backpatch to v18 where
the xreflabels were removed.

Author: Daniel Gustafsson <daniel@yesql.se>
Reported-by: y.saburov@gmail.com
Reviewed-by: Laurenz Albe <laurenz.albe@cybertec.at>
Discussion: https://postgr.es/m/178350739237.73862.4549076173872335741@wrigleys.postgresql.org
Backpatch-through: 18
---
 doc/src/sgml/amcheck.sgml | 5 ++---
 doc/src/sgml/config.sgml  | 2 +-
 doc/src/sgml/storage.sgml | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/amcheck.sgml b/doc/src/sgml/amcheck.sgml
index 08006856579..13a6bb18897 100644
--- a/doc/src/sgml/amcheck.sgml
+++ b/doc/src/sgml/amcheck.sgml
@@ -421,9 +421,8 @@ SET client_min_messages = DEBUG1;
 
  <para>
   <filename>amcheck</filename> can be effective at detecting various types of
-  failure modes that <link
-  linkend="app-initdb-data-checksums"><application>data
-  checksums</application></link> will fail to catch.  These include:
+  failure modes that <link linkend="checksums">data checksums</link> will fail
+  to catch.  These include:
 
   <itemizedlist>
    <listitem>
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 45827687b9c..f4fb7d0ecfe 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -13182,7 +13182,7 @@ LOG:  CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
       </term>
       <listitem>
        <para>
-        Only has effect if <xref linkend="app-initdb-data-checksums"/> are enabled.
+        Only has effect if <link linkend="checksums">data checksums</link> are enabled.
        </para>
        <para>
         Detection of a checksum failure during a read normally causes
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 6b6377503bf..19924b98d71 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -797,7 +797,7 @@ data. Empty in ordinary tables.</entry>
   (<structname>PageHeaderData</structname>). Its format is detailed in <xref
   linkend="pageheaderdata-table"/>. The first field tracks the most
   recent WAL entry related to this page. The second field contains
-  the page checksum if <xref linkend="app-initdb-data-checksums"/> are
+  the page checksum if <link linkend="checksums">data checksums</link> are
   enabled.  Next is a 2-byte field containing flag bits. This is followed
   by three 2-byte integer fields (<structfield>pd_lower</structfield>,
   <structfield>pd_upper</structfield>, and
-- 
2.39.3 (Apple Git-146)

=

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 66.6. Database Page Layout
@ 2026-07-15 14:50  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 1 reply; 8+ messages in thread

From: Laurenz Albe @ 2026-07-15 14:50 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: y.saburov@gmail.com, PostgreSQL-documentation <pgsql-docs@lists.postgresql.org>

On Wed, 2026-07-15 at 15:17 +0200, Daniel Gustafsson wrote:
> I took another look at this today to close the thread and found that there were
> one more occurrence of this pattern stemming from 67846550dc6d which removed
> the initdb xreflabels.  The attached patches fix the other one as well as
> changes the link in the amcheck docs to point to the main checksums page which
> is more relevant than the (now default) initdb option.  Patches for master down
> to v18 attached.

Referencing "checksums" rather than "app-initdb-data-checksums" is an improvement
in all these places, and the only other reference to "app-initdb-data-checksums"
in the documentation is good the way it is and should stay.

So the patches look good to me.

Yours,
Laurenz Albe





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 66.6. Database Page Layout
@ 2026-07-15 15:13  Daniel Gustafsson <daniel@yesql.se>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 8+ messages in thread

From: Daniel Gustafsson @ 2026-07-15 15:13 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: y.saburov@gmail.com, PostgreSQL-documentation <pgsql-docs@lists.postgresql.org>

> On 15 Jul 2026, at 16:50, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> 
> On Wed, 2026-07-15 at 15:17 +0200, Daniel Gustafsson wrote:
>> I took another look at this today to close the thread and found that there were
>> one more occurrence of this pattern stemming from 67846550dc6d which removed
>> the initdb xreflabels.  The attached patches fix the other one as well as
>> changes the link in the amcheck docs to point to the main checksums page which
>> is more relevant than the (now default) initdb option.  Patches for master down
>> to v18 attached.
> 
> Referencing "checksums" rather than "app-initdb-data-checksums" is an improvement
> in all these places, and the only other reference to "app-initdb-data-checksums"
> in the documentation is good the way it is and should stay.
> 
> So the patches look good to me.

Thanks for review!

--
Daniel Gustafsson







^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2026-07-15 15:13 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-10-16 08:30 [PATCH] doc: Use uppercase keywords in foreign key tutorial Erik Wienhold <ewie@ewie.name>
2025-10-16 08:30 [PATCH] doc: Use uppercase keywords in foreign key tutorial Erik Wienhold <ewie@ewie.name>
2026-07-08 10:43 66.6. Database Page Layout PG Doc comments form <noreply@postgresql.org>
2026-07-09 21:58 ` Re: 66.6. Database Page Layout Daniel Gustafsson <daniel@yesql.se>
2026-07-10 06:33   ` Re: 66.6. Database Page Layout Laurenz Albe <laurenz.albe@cybertec.at>
2026-07-15 13:17     ` Re: 66.6. Database Page Layout Daniel Gustafsson <daniel@yesql.se>
2026-07-15 14:50       ` Re: 66.6. Database Page Layout Laurenz Albe <laurenz.albe@cybertec.at>
2026-07-15 15:13         ` Re: 66.6. Database Page Layout Daniel Gustafsson <daniel@yesql.se>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox