Re: make create_table.sgml Synopsis section less wide

2025-09-25 Thread David G. Johnston
On Thursday, September 25, 2025, jian he 
wrote:

> hi.
>
> https://www.postgresql.org/docs/devel/sql-createtable.html
> Synopsis section,
> The second line is currently too long, and the explanation for
> exclude_element
> (the third line from the bottom) is also quite wide (lengthy),  the
> like_option also too long.
>
> I mentioned this earlier, and while working on CREATE TABLE LIKE related
> features, I came across this minor issue again.
>
> If we make it less wide, then we don't need to scroll horizontally.
> please check the attached screenshot to see the effect of the change
>
> what do you think?
>

I’m not able to give this much attention myself at the moment, hence it
being in drafts, but here is where this topic presently stands.

https://www.postgresql.org/message-id/flat/CAKFQuwYfMV-2SdrP-umr5SVNSqTn378BUvHsebetp5%3DDhT494w%40mail.gmail.com

https://commitfest.postgresql.org/patch/5547/

David J.


Confusion in section 8.7.3. Type Safety

2025-09-25 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/datatype-enum.html
Description:

In section 8.7.3. Type Safety one can observe a the following statement in
the examples.

INSERT INTO holidays(num_weeks,happiness) VALUES (2, 'sad');

This is somewhat confusing since type happiness doesn't contain 'sad'. I
would suggest to remove the statement or to add an enum 'sad' in type
happiness.


make create_table.sgml Synopsis section less wide

2025-09-25 Thread jian he
hi.

https://www.postgresql.org/docs/devel/sql-createtable.html
Synopsis section,
The second line is currently too long, and the explanation for exclude_element
(the third line from the bottom) is also quite wide (lengthy),  the
like_option also too long.

I mentioned this earlier, and while working on CREATE TABLE LIKE related
features, I came across this minor issue again.

If we make it less wide, then we don't need to scroll horizontally.
please check the attached screenshot to see the effect of the change

what do you think?
From 627a3b926aa617a9b598672afb013ffd91e33b67 Mon Sep 17 00:00:00 2001
From: jian he 
Date: Thu, 25 Sep 2025 20:52:37 +0800
Subject: [PATCH v1 1/1] doc make create_table.sgml synopsis section less wide

---
 doc/src/sgml/ref/create_table.sgml | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml
index dc000e913c1..a7dd60a6ff6 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -22,7 +22,10 @@ PostgreSQL documentation
  
 
 CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] table_name ( [
-  { column_name data_type [ STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN | DEFAULT } ] [ COMPRESSION compression_method ] [ COLLATE collation ] [ column_constraint [ ... ] ]
+  { column_name data_type
+| [ STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN | DEFAULT } ]
+| [ COMPRESSION compression_method ]
+| [ COLLATE collation ] [ column_constraint [ ... ] ]
 | table_constraint
 | LIKE source_table [ like_option ... ] }
 [, ... ]
@@ -88,7 +91,8 @@ class="parameter">referential_action ] [ ON UPDATE and like_option is:
 
-{ INCLUDING | EXCLUDING } { COMMENTS | COMPRESSION | CONSTRAINTS | DEFAULTS | GENERATED | IDENTITY | INDEXES | STATISTICS | STORAGE | ALL }
+{ INCLUDING | EXCLUDING }
+{ COMMENTS | COMPRESSION | CONSTRAINTS | DEFAULTS | GENERATED | IDENTITY | INDEXES | STATISTICS | STORAGE | ALL }
 
 and partition_bound_spec is:
 
@@ -105,7 +109,9 @@ WITH ( MODULUS numeric_literal, REM
 
 exclude_element in an EXCLUDE constraint is:
 
-{ column_name | ( expression ) } [ COLLATE collation ] [ opclass [ ( opclass_parameter = value [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
+{ column_name | ( expression ) }
+   | [ COLLATE collation ]
+   | [ opclass [ ( opclass_parameter = value [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
 
 referential_action in a FOREIGN KEY/REFERENCES constraint is:
 
-- 
2.34.1