On 12/04/2024 23:44, David G. Johnston wrote:
I'd much prefer to leave "different kind" alone and turn the immediately following, first-on-the-page, instance of CREATE TYPE into a link.

Good, I'm fine with that too.

  2. make first mention of CREATE TABLE a link
[...] > I'm not all that convinced of that particular usefulness but also don't
see it hurting either.

Thanks. I do think it's useful when one reads this page separately (not as a part of sequential read-through).

    3. Simplify CREATE TABLE example to make it self-sufficient
[...]
Agreed.

Thanks. I've updated the patches correspondingly.

--
Anton Voloshin
Postgres Professional, The Russian Postgres Company
https://postgrespro.ru
From dddf7ee4a9a22515c327434b7db2c0293301b257 Mon Sep 17 00:00:00 2001
From: Anton Voloshin <a.volos...@postgrespro.ru>
Date: Fri, 12 Apr 2024 22:49:17 +0300
Subject: [PATCH 1/3] Composite Types: clarify "different kind" by linking to a
 "create type" page

---
 doc/src/sgml/rowtypes.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/rowtypes.sgml b/doc/src/sgml/rowtypes.sgml
index bbeac84d46a..049e90e9c68 100644
--- a/doc/src/sgml/rowtypes.sgml
+++ b/doc/src/sgml/rowtypes.sgml
@@ -40,7 +40,7 @@ CREATE TYPE inventory_item AS (
   field names and types can be specified; no constraints (such as <literal>NOT
   NULL</literal>) can presently be included.  Note that the <literal>AS</literal> keyword
   is essential; without it, the system will think a different kind
-  of <command>CREATE TYPE</command> command is meant, and you will get odd syntax
+  of <xref linkend="sql-createtype"/> command is meant, and you will get odd syntax
   errors.
  </para>
 
-- 
2.43.2

From def3f7ccb55b44e63b2a9fffa88ba4d3c545e553 Mon Sep 17 00:00:00 2001
From: Anton Voloshin <a.volos...@postgrespro.ru>
Date: Fri, 12 Apr 2024 22:56:18 +0300
Subject: [PATCH 2/3] Composite Types: make first mention of CREATE TABLE a
 link

---
 doc/src/sgml/rowtypes.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/rowtypes.sgml b/doc/src/sgml/rowtypes.sgml
index 049e90e9c68..a409b292795 100644
--- a/doc/src/sgml/rowtypes.sgml
+++ b/doc/src/sgml/rowtypes.sgml
@@ -36,7 +36,7 @@ CREATE TYPE inventory_item AS (
     price           numeric
 );
 </programlisting>
-  The syntax is comparable to <command>CREATE TABLE</command>, except that only
+  The syntax is comparable to <xref linkend="sql-createtable"/>, except that only
   field names and types can be specified; no constraints (such as <literal>NOT
   NULL</literal>) can presently be included.  Note that the <literal>AS</literal> keyword
   is essential; without it, the system will think a different kind
-- 
2.43.2

From bbda6a20a387cd6b1379b760de0e215851e638a9 Mon Sep 17 00:00:00 2001
From: Anton Voloshin <a.volos...@postgrespro.ru>
Date: Fri, 12 Apr 2024 22:58:45 +0300
Subject: [PATCH 3/3] Composite Types: simplify CREATE TABLE example to make it
 self-sufficient

---
 doc/src/sgml/rowtypes.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/rowtypes.sgml b/doc/src/sgml/rowtypes.sgml
index a409b292795..b6063b30c31 100644
--- a/doc/src/sgml/rowtypes.sgml
+++ b/doc/src/sgml/rowtypes.sgml
@@ -74,7 +74,7 @@ SELECT price_extension(item, 10) FROM on_hand;
 <programlisting>
 CREATE TABLE inventory_item (
     name            text,
-    supplier_id     integer REFERENCES suppliers,
+    supplier_id     integer,
     price           numeric CHECK (price &gt; 0)
 );
 </programlisting>
-- 
2.43.2

Reply via email to