public inbox for [email protected]  
help / color / mirror / Atom feed
make create_table.sgml Synopsis section less wide
2+ messages / 2 participants
[nested] [flat]

* make create_table.sgml Synopsis section less wide
@ 2025-09-26 00:00  jian he <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: jian he @ 2025-09-26 00:00 UTC (permalink / raw)
  To: [email protected]

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?


Attachments:

  [text/x-patch] v1-0001-doc-make-create_table.sgml-synopsis-section-less-wide.patch (3.4K, 2-v1-0001-doc-make-create_table.sgml-synopsis-section-less-wide.patch)
  download | inline diff:
From 627a3b926aa617a9b598672afb013ffd91e33b67 Mon Sep 17 00:00:00 2001
From: jian he <[email protected]>
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
  <refsynopsisdiv>
 <synopsis>
 CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] <replaceable class="parameter">table_name</replaceable> ( [
-  { <replaceable class="parameter">column_name</replaceable> <replaceable class="parameter">data_type</replaceable> [ STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN | DEFAULT } ] [ COMPRESSION <replaceable>compression_method</replaceable> ] [ COLLATE <replaceable>collation</replaceable> ] [ <replaceable class="parameter">column_constraint</replaceable> [ ... ] ]
+  { <replaceable class="parameter">column_name</replaceable> <replaceable class="parameter">data_type</replaceable>
+    | [ STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN | DEFAULT } ]
+    | [ COMPRESSION <replaceable>compression_method</replaceable> ]
+    | [ COLLATE <replaceable>collation</replaceable> ] [ <replaceable class="parameter">column_constraint</replaceable> [ ... ] ]
     | <replaceable>table_constraint</replaceable>
     | LIKE <replaceable>source_table</replaceable> [ <replaceable>like_option</replaceable> ... ] }
     [, ... ]
@@ -88,7 +91,8 @@ class="parameter">referential_action</replaceable> ] [ ON UPDATE <replaceable cl
 
 <phrase>and <replaceable class="parameter">like_option</replaceable> is:</phrase>
 
-{ INCLUDING | EXCLUDING } { COMMENTS | COMPRESSION | CONSTRAINTS | DEFAULTS | GENERATED | IDENTITY | INDEXES | STATISTICS | STORAGE | ALL }
+{ INCLUDING | EXCLUDING }
+{ COMMENTS | COMPRESSION | CONSTRAINTS | DEFAULTS | GENERATED | IDENTITY | INDEXES | STATISTICS | STORAGE | ALL }
 
 <phrase>and <replaceable class="parameter">partition_bound_spec</replaceable> is:</phrase>
 
@@ -105,7 +109,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
 
 <phrase><replaceable class="parameter">exclude_element</replaceable> in an <literal>EXCLUDE</literal> constraint is:</phrase>
 
-{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ COLLATE <replaceable class="parameter">collation</replaceable> ] [ <replaceable class="parameter">opclass</replaceable> [ ( <replaceable class="parameter">opclass_parameter</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
+{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) }
+   | [ COLLATE <replaceable class="parameter">collation</replaceable> ]
+   | [ <replaceable class="parameter">opclass</replaceable> [ ( <replaceable class="parameter">opclass_parameter</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
 
 <phrase><replaceable class="parameter">referential_action</replaceable> in a <literal>FOREIGN KEY</literal>/<literal>REFERENCES</literal> constraint is:</phrase>
 
-- 
2.34.1



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

* Re: make create_table.sgml Synopsis section less wide
@ 2025-09-26 00:11  David G. Johnston <[email protected]>
  parent: jian he <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2025-09-26 00:11 UTC (permalink / raw)
  To: jian he <[email protected]>; +Cc: [email protected] <[email protected]>

On Thursday, September 25, 2025, jian he <[email protected]>
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%40m...

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

David J.


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


end of thread, other threads:[~2025-09-26 00:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-09-26 00:00 make create_table.sgml Synopsis section less wide jian he <[email protected]>
2025-09-26 00:11 ` David G. Johnston <[email protected]>

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