doc: Add anchors in create_table.sgml
doc: Add anchors in create_table.sgml
От:
PG Doc comments form <noreply@postgresql.org>
Дата:
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/12/sql-createtable.html
Description:
From 73ad66d721a3f87500857cdc6b1f4d810f2875df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ivan=20Mas=C3=A1r?=
Date: Thu, 2 Jan 2020 09:15:34 +0100
Subject: [PATCH] doc: Add anchors in create_table.sgml
---
doc/src/sgml/ref/create_table.sgml | 84
+++++++++++++++++++-------------------
1 file changed, 42 insertions(+), 42 deletions(-)
diff --git a/doc/src/sgml/ref/create_table.sgml
b/doc/src/sgml/ref/create_table.sgml
index 4a2b6f0dae..4b3b1ebceb 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -214,7 +214,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
IF NOT EXISTS
@@ -226,7 +226,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
table_name
@@ -235,7 +235,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
OF type_name
@@ -256,7 +256,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
column_name
@@ -265,7 +265,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
data_type
@@ -277,7 +277,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
COLLATE
collation
@@ -288,7 +288,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
INHERITS ( parent_table [,
... ] )
@@ -345,7 +345,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
PARTITION BY { RANGE | LIST | HASH } ( { column_name | ( expression ) } [ opclass ] [, ...] )
@@ -559,7 +559,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
LIKE source_table [
like_option ... ]
@@ -591,7 +591,7 @@ WITH ( MODULUS numeric_literal, REM
available options are:
-
+
INCLUDING COMMENTS
@@ -603,7 +603,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
INCLUDING CONSTRAINTS
@@ -614,7 +614,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
INCLUDING DEFAULTS
@@ -628,7 +628,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
INCLUDING GENERATED
@@ -638,7 +638,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
INCLUDING IDENTITY
@@ -650,7 +650,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
INCLUDING INDEXES
@@ -664,7 +664,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
INCLUDING STATISTICS
@@ -673,7 +673,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
INCLUDING STORAGE
@@ -687,7 +687,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
INCLUDING ALL
@@ -711,7 +711,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
CONSTRAINT constraint_name
@@ -725,7 +725,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
NOT NULL
@@ -734,7 +734,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
NULL
@@ -749,7 +749,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
CHECK ( expression ) [ NO INHERIT ]
@@ -787,7 +787,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
DEFAULT
default_expr
@@ -808,7 +808,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
GENERATED ALWAYS AS (
generation_expr )
STOREDgenerated
column
@@ -830,7 +830,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ (
sequence_options ) ]
@@ -861,7 +861,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
UNIQUE (column constraint)
UNIQUE ( column_name [, ... ] )
INCLUDE ( column_name [, ...]) (table
constraint)
@@ -907,7 +907,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
PRIMARY KEY (column constraint)
PRIMARY KEY ( column_name [, ... ] )
INCLUDE ( column_name [, ...]) (table
constraint)
@@ -1003,7 +1003,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
REFERENCES reftable [ ( refcolumn ) ] [ MATCH matchtype ] [ ON DELETE referential_action ] [ ON UPDATE
referential_action ]
(column constraint)
FOREIGN KEY ( column_name [, ... ] )
@@ -1063,7 +1063,7 @@ WITH ( MODULUS numeric_literal, REM
actions for each clause:
-
+
NO ACTION
@@ -1076,7 +1076,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
RESTRICT
@@ -1088,7 +1088,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
CASCADE
@@ -1099,7 +1099,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
SET NULL
@@ -1108,7 +1108,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
SET DEFAULT
@@ -1130,7 +1130,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
DEFERRABLE
NOT DEFERRABLE
@@ -1152,7 +1152,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
INITIALLY IMMEDIATE
INITIALLY DEFERRED
@@ -1182,7 +1182,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
WITH ( storage_parameter [= value] [, ... ] )
@@ -1197,7 +1197,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
WITHOUT OIDS
@@ -1208,7 +1208,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
ON COMMIT
@@ -1217,7 +1217,7 @@ WITH ( MODULUS numeric_literal, REM
The three options are:
-
+
PRESERVE ROWS
@@ -1227,7 +1227,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
DELETE ROWS
@@ -1240,7 +1240,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
DROP
@@ -1272,7 +1272,7 @@ WITH ( MODULUS numeric_literal, REM
-
+
USING INDEX TABLESPACE tablespace_name
--
2.11.0
Re: doc: Add anchors in create_table.sgml
От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
On 2020-Jan-02, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/12/sql-createtable.html > Description: > > From 73ad66d721a3f87500857cdc6b1f4d810f2875df Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Ivan=20Mas=C3=A1r?= > Date: Thu, 2 Jan 2020 09:15:34 +0100 > Subject: [PATCH] doc: Add anchors in create_table.sgml Can you comment a little on the reason for adding these? I'm not opposed to doing so, but we don't have them in every possible place (we have in 607 of ~4300 varlistentries by my count), so it needs some rationale. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: doc: Add anchors in create_table.sgml
От:
helix84 <helix84@centrum.sk>
Дата:
Hi, I prefer to bookmark docs pointing to the exact term I need and with pg docs it's often been the case that the exact term doesn't have an anchor or only has unstable, generated anchors. So I would very much like to add stable anchors in many more places. I haven't contributed to pg before, so this patch is me testing the waters. If there is interest, I'd like to add stable anchors to wherever we'll agree it makes sense - preferably in an automated or semi-automated way. I read an older thread on this topic [1] which links to a custom SGML parser in Python for this specific task [2]. I have experience with XSLT, but not so much with SGML processing, so I would appreciate if you could point me whether a custom parser is the way to go for this task or I should look into a more generic SGML processing tool. Thanks in advance and let me take this opportunity to thank you all for this wonderful piece of software. [1] https://www.postgresql-archive.org/Please-provide-stable-target-anchors-td2167039.html [2] https://bitbucket.org/dvarrazzo/pg-doc-anchors/src/default/ Regards, ~~helix84 On Thu, Jan 2, 2020 at 4:56 PM Alvaro Herrera wrote: > > On 2020-Jan-02, PG Doc comments form wrote: > > > The following documentation comment has been logged on the website: > > > > Page: https://www.postgresql.org/docs/12/sql-createtable.html > > Description: > > > > From 73ad66d721a3f87500857cdc6b1f4d810f2875df Mon Sep 17 00:00:00 2001 > > From: =?UTF-8?q?Ivan=20Mas=C3=A1r?= > > Date: Thu, 2 Jan 2020 09:15:34 +0100 > > Subject: [PATCH] doc: Add anchors in create_table.sgml > > Can you comment a little on the reason for adding these? I'm not > opposed to doing so, but we don't have them in every possible place (we > have in 607 of ~4300 varlistentries by my count), so it needs some > rationale. > > > -- > Álvaro Herrera https://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: doc: Add anchors in create_table.sgml
От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Hi, On 2020-Jan-02, helix84 wrote: > Hi, I prefer to bookmark docs pointing to the exact term I need and > with pg docs it's often been the case that the exact term doesn't have > an anchor or only has unstable, generated anchors. So I would very > much like to add stable anchors in many more places. I haven't > contributed to pg before, so this patch is me testing the waters. If > there is interest, I'd like to add stable anchors to wherever we'll > agree it makes sense - preferably in an automated or semi-automated > way. > > I read an older thread on this topic [1] which links to a custom SGML > parser in Python for this specific task [2]. I have experience with > XSLT, but not so much with SGML processing, so I would appreciate if > you could point me whether a custom parser is the way to go for this > task or I should look into a more generic SGML processing tool. Ah, https://www.postgresql.org/message-id/AANLkTikAgIyYfwy_2Zj8GafoC7ZFlGv5iCdab1l7VuDp@mail.gmail.com (We prefer our own archive to GMane's.) That thread is so old that Peter feels the need to point out that the Git mirror was out of date with CVS ... I can no longer even remember the commit process for CVS anymore. We also converted from SGML to XML in the meantime, so you can probably make do with a standard XML parser without having to write a custom SGML one. (Daniele Varrazzo's patch ended up as 477319829c2e.) TBH I've felt the need for anchors for tags in the past also (IIRC the runtime-config page would be improved by them), but I'm not sure about adding them to every single keyword of every single reference page. Is that really useful? > Thanks in advance and let me take this opportunity to thank you all > for this wonderful piece of software. You're welcome. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: doc: Add anchors in create_table.sgml
От:
Jürgen Purtz <juergen@purtz.de>
Дата:
> We also converted from SGML to XML in the meantime, so you can > probably make do with a standard XML parser without having to write a > custom SGML one. Use XML tools with care! Some of our XML files are not well formed because they contain more than one root element. Kind regards, Jürgen Purtz.
Re: doc: Add anchors in create_table.sgml
От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Fri, Jan 3, 2020 at 10:35:20AM -0300, Alvaro Herrera wrote: > Hi, > > On 2020-Jan-02, helix84 wrote: > > > Hi, I prefer to bookmark docs pointing to the exact term I need and > > with pg docs it's often been the case that the exact term doesn't have > > an anchor or only has unstable, generated anchors. So I would very > > much like to add stable anchors in many more places. I haven't > > contributed to pg before, so this patch is me testing the waters. If > > there is interest, I'd like to add stable anchors to wherever we'll > > agree it makes sense - preferably in an automated or semi-automated > > way. > > > > I read an older thread on this topic [1] which links to a custom SGML > > parser in Python for this specific task [2]. I have experience with > > XSLT, but not so much with SGML processing, so I would appreciate if > > you could point me whether a custom parser is the way to go for this > > task or I should look into a more generic SGML processing tool. > > Ah, > https://www.postgresql.org/message-id/AANLkTikAgIyYfwy_2Zj8GafoC7ZFlGv5iCdab1l7VuDp@mail.gmail.com > (We prefer our own archive to GMane's.) That thread is so old that > Peter feels the need to point out that the Git mirror was out of date > with CVS ... I can no longer even remember the commit process for CVS > anymore. We also converted from SGML to XML in the meantime, so you can > probably make do with a standard XML parser without having to write a > custom SGML one. (Daniele Varrazzo's patch ended up as 477319829c2e.) > > TBH I've felt the need for anchors for tags in the > past also (IIRC the runtime-config page would be improved by them), > but I'm not sure about adding them to every single keyword of every > single reference page. Is that really useful? It would be helpful if the release notes could point to specific tables in the docs, rather than just sections. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +