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