Missing links between system catalog documentation pages

Поиск
Список
Период
Сортировка
Искать

Missing links between system catalog documentation pages

От:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Hi hackers,

While browsing the system catalog docs earlier I noticed that a lot of
them mention other catalogs or views in the introductory paragrah
without hyperlinking them.  Now, most of these are linked in the
"references" column in the table, but some, like pg_proc's mention of
pg_aggregate have no direct links at all.

The attached patch makes the first mention of another system catalog or
view (as well as pg_hba.conf in pg_hba_file_lines) a link, for easier
navigation.

- ilmari
-- 
- Twitter seems more influential [than blogs] in the 'gets reported in
  the mainstream press' sense at least.               - Matt McLeod
- That'd be because the content of a tweet is easier to condense down
  to a mainstream media article.                      - Calle Dybedahl

From bd0e807264e664034ae0cee62f77104da1da57a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= 
Date: Sun, 24 May 2020 21:48:29 +0100
Subject: [PATCH] Add missing cross-links in system catalog documentation

This makes the first mention of another system catalog or view in
the introductory paragraph a system catalog or view a hyperlink, for
easier navigation.  Some of them are also linked because of columns
referencing them, but this avoids having to hunt for that.

Also linkify the first mention of pg_hba.conf in pg_hba_file_rules, as
that's more specific and easier to spot than the link to the client
authentication chapter at the bottom.
---
 doc/src/sgml/catalogs.sgml | 69 ++++++++++++++++++++++----------------
 1 file changed, 41 insertions(+), 28 deletions(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 9851ef2713..8df73e3ba4 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -381,9 +381,10 @@
    sum, count, and
    max.  Each entry in
    pg_aggregate is an extension of an entry
-   in pg_proc.  The pg_proc
-   entry carries the aggregate's name, input and output data types, and
-   other information that is similar to ordinary functions.
+   in pg_proc.
+   The pg_proc entry carries the aggregate's name,
+   input and output data types, and other information that is similar to
+   ordinary functions.
   
 
   
@@ -1099,7 +1100,8 @@
    table columns.  There will be exactly one
    pg_attribute row for every column in every
    table in the database.  (There will also be attribute entries for
-   indexes, and indeed all objects that have pg_class
+   indexes, and indeed all objects that have
+   pg_class
    entries.)
   
 
@@ -1835,14 +1837,16 @@
 
   
    The catalog pg_class catalogs tables and most
-   everything else that has columns or is otherwise similar to a
-   table.  This includes indexes (but see also
-   pg_index), sequences (but see also
-   pg_sequence), views, materialized
-   views, composite types, and TOAST tables; see relkind.
-   Below, when we mean all of these
-   kinds of objects we speak of relations.  Not all
-   columns are meaningful for all relation types.
+   everything else that has columns or is otherwise similar to a table.
+   This includes indexes (but see also pg_index),
+   sequences (but see also pg_sequence),
+   views, materialized views, composite types, and TOAST tables;
+   see relkind.
+   Below, when we mean all of these kinds of objects we speak of
+   relations.  Not all columns are meaningful for all relation
+   types.
   
 
   
@@ -2404,7 +2408,8 @@ key, unique, foreign key, and exclusion constraints on tables. (Column constraints are not treated specially. Every column constraint is equivalent to some table constraint.) - Not-null constraints are represented in the pg_attribute + Not-null constraints are represented in the + pg_attribute catalog, not here. @@ -4094,11 +4099,13 @@ The catalog pg_foreign_table contains - auxiliary information about foreign tables. A foreign table is - primarily represented by a pg_class entry, - just like a regular table. Its pg_foreign_table - entry contains the information that is pertinent only to foreign tables - and not any other kind of relation. + auxiliary information about foreign tables. + A foreign table is primarily represented by a + pg_class + entry, just like a regular table. + Its pg_foreign_table entry contains the + information that is pertinent only to foreign tables and not any other kind + of relation.
@@ -4160,7 +4167,7 @@ The catalog pg_index contains part of the information about indexes. The rest is mostly in - pg_class. + pg_class.
@@ -5625,7 +5632,7 @@ If prokind indicates that the entry is for an aggregate function, there should be a matching row in - pg_aggregate. + pg_aggregate.
@@ -6555,7 +6562,8 @@ The catalog pg_sequence contains information about sequences. Some of the information about sequences, such as the name and - the schema, is in pg_class. + the schema, is in + pg_class
@@ -7338,7 +7346,8 @@ The catalog pg_statistic_ext_data - holds data for extended planner statistics defined in pg_statistic_ext. + holds data for extended planner statistics defined in + pg_statistic_ext. Each row in this catalog corresponds to a statistics object created with . @@ -9964,8 +9973,9 @@ The view pg_hba_file_rules provides a summary of - the contents of the client authentication configuration - file, pg_hba.conf. A row appears in this view for each + the contents of the client authentication configuration file, + pg_hba.conf. + A row appears in this view for each non-empty, non-comment line in the file, with annotations indicating whether the rule could be applied successfully. @@ -10206,8 +10216,10 @@ individual tuples of relations, transaction IDs (both virtual and permanent IDs), and general database objects (identified by class OID and object OID, - in the same way as in pg_description or - pg_depend). Also, the right to extend a + in the same way as in + pg_description + or pg_depend). + Also, the right to extend a relation is represented as a separate lockable object. Also, advisory locks can be taken on numbers that have user-defined meanings. @@ -10943,8 +10955,9 @@ The view pg_publication_tables provides information about the mapping between publications and the tables they - contain. Unlike the underlying - catalog pg_publication_rel, this view expands + contain. Unlike the underlying catalog + pg_publication_rel, + this view expands publications defined as FOR ALL TABLES, so for such publications there will be a row for each eligible table. -- 2.26.2

[PATCH] Missing links between system catalog documentation pages

От:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) writes:

> The attached patch makes the first mention of another system catalog or
> view (as well as pg_hba.conf in pg_hba_file_lines) a link, for easier
> navigation.

bump...

- ilmari
-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen


Re: [PATCH] Missing links between system catalog documentation pages

От:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) writes:

> ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) writes:
>
>> The attached patch makes the first mention of another system catalog or
>> view (as well as pg_hba.conf in pg_hba_file_lines) a link, for easier
>> navigation.
>
> bump...

Added to the current commitfest:

https://commitfest.postgresql.org/28/2599/

- ilmari
-- 
- Twitter seems more influential [than blogs] in the 'gets reported in
  the mainstream press' sense at least.               - Matt McLeod
- That'd be because the content of a tweet is easier to condense down
  to a mainstream media article.                      - Calle Dybedahl


Re: [PATCH] Missing links between system catalog documentationpages

От:
Fabien COELHO <coelho@cri.ensmp.fr>
Дата:

Hello Dagfinn,

>> The attached patch makes the first mention of another system catalog or
>> view (as well as pg_hba.conf in pg_hba_file_lines) a link, for easier
>> navigation.

Why only the first mention? It seems unlikely that I would ever read such 
chapter linearly, and even so that I would want to jump especially on the 
first occurrence but not on others, so ISTM that it should be done all 
mentions?

-- 
Fabien.


Re: [PATCH] Missing links between system catalog documentation pages

От:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Fabien COELHO  writes:

> Hello Dagfinn,
>
>>> The attached patch makes the first mention of another system catalog or
>>> view (as well as pg_hba.conf in pg_hba_file_lines) a link, for easier
>>> navigation.
>
> Why only the first mention? It seems unlikely that I would ever read
> such chapter linearly, and even so that I would want to jump especially
> on the first occurrence but not on others, so ISTM that it should be
> done all mentions?

It's the first mention in the introductory paragraph of _each_ catalog
table/view page, not the first mention in the entire catalogs.sgml file.
E.g. https://www.postgresql.org/docs/current/catalog-pg-aggregate.html
has two mentions of pg_proc one word apart:

   Each entry in pg_aggregate is an extension of an entry in pg_proc. The
   pg_proc entry carries the aggregate's name, …

I didn't think there was much point in linkifying both in that case, and
other similar situations.

- ilmari
-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen


Re: [PATCH] Missing links between system catalog documentationpages

От:
Fabien COELHO <coelho@cri.ensmp.fr>
Дата:

Hello Dagfinn,

>>>> The attached patch

applies cleanly, doc generation is ok. I'm ok with adding such links 
systematically.

>>>> makes the first mention of another system catalog or view (as well as 
>>>> pg_hba.conf in pg_hba_file_lines) a link, for easier navigation.
>>
>> Why only the first mention? It seems unlikely that I would ever read
>> such chapter linearly, and even so that I would want to jump especially
>> on the first occurrence but not on others, so ISTM that it should be
>> done all mentions?
>
> It's the first mention in the introductory paragraph of _each_ catalog
> table/view page, not the first mention in the entire catalogs.sgml file.
> E.g. https://www.postgresql.org/docs/current/catalog-pg-aggregate.html
> has two mentions of pg_proc one word apart:
>
>   Each entry in pg_aggregate is an extension of an entry in pg_proc. The
>   pg_proc entry carries the aggregate's name, …
>
> I didn't think there was much point in linkifying both in that case, and
> other similar situations.

The point is that the user reads a sentence, attempts to jump but 
sometimes can't, because the is not the first occurrence. I'd go for all 
mentions of another relation should be link.

Alse, ISTM you missed some, maybe you could consider adding them? eg 
pg_database in the very first paragraph of the file, pg_attrdef in 
pg_attribute description, quite a few in pg_class…

-- 
Fabien.

Re: [PATCH] Missing links between system catalog documentation pages

От:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Hi Fabien,

Fabien COELHO  writes:

>> It's the first mention in the introductory paragraph of _each_ catalog
>> table/view page, not the first mention in the entire catalogs.sgml file.
>> E.g. https://www.postgresql.org/docs/current/catalog-pg-aggregate.html
>> has two mentions of pg_proc one word apart:
>>
>>   Each entry in pg_aggregate is an extension of an entry in pg_proc. The
>>   pg_proc entry carries the aggregate's name, …
>>
>> I didn't think there was much point in linkifying both in that case, and
>> other similar situations.
>
> The point is that the user reads a sentence, attempts to jump but
> sometimes can't, because the is not the first occurrence. I'd go for all
> mentions of another relation should be link.

Okay, I'll make them all links, except the pg_aggregate aggfnoid column,
which I've changed from "pg_proc OID of the aggregate function" to just
"OID of the agregate function", since pg_proc is linked immediately
prior in the "references" section, and we generally don't mention the
catalog table again in similar cases elsehwere.

> Alse, ISTM you missed some, maybe you could consider adding them? eg
> pg_database in the very first paragraph of the file, pg_attrdef in
> pg_attribute description, quite a few in pg_class…

Yes, I only looked at the intro paragraphs of the per-catalog pages, not
the overview section nor the text after the column tables.  I've gone
through them all now and linked them.  Updated patch attached.

- ilmari
-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen


From b2940b93f5ed17c0e739d6ed0c9411a44bd87428 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= 
Date: Sun, 24 May 2020 21:48:29 +0100
Subject: [PATCH v2 1/2] Add missing cross-links in system catalog
 documentation

This makes all mentions of other system catalogs and views in the
system system catalog and view documentation pages hyperlinks, for
easier navigation.

Also linkify the first mention of pg_hba.conf in pg_hba_file_rules, as
that's more specific and easier to spot than the link to the client
authentication chapter at the bottom.
---
 doc/src/sgml/catalogs.sgml | 142 ++++++++++++++++++++-----------------
 1 file changed, 78 insertions(+), 64 deletions(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 700271fd40..051fa7d361 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -16,7 +16,8 @@
    Normally, one should not change the system catalogs by hand, there
    are normally SQL commands to do that.  (For example, CREATE
    DATABASE inserts a row into the
-   pg_database catalog — and actually
+   pg_database
+   catalog — and actually
    creates the database on disk.)  There are some exceptions for
    particularly esoteric operations, but many of those have been made
    available as SQL commands over time, and so the need for direct manipulation
@@ -381,9 +382,10 @@
    sum, count, and
    max.  Each entry in
    pg_aggregate is an extension of an entry
-   in pg_proc.  The pg_proc
-   entry carries the aggregate's name, input and output data types, and
-   other information that is similar to ordinary functions.
+   in pg_proc.
+   The pg_proc entry carries the aggregate's name,
+   input and output data types, and other information that is similar to
+   ordinary functions.
   
 
   
@@ -407,7 +409,7 @@
        (references pg_proc.oid)
       
       
-       pg_proc OID of the aggregate function
+       OID of the aggregate function
       
      
 
@@ -902,7 +904,7 @@
    catalog structure for performance reasons).  Also,
    amoplefttype and amoprighttype must match
    the oprleft and oprright fields of the
-   referenced pg_operator entry.
+   referenced pg_operator entry.
   
 
  
@@ -1099,7 +1101,8 @@
    table columns.  There will be exactly one
    pg_attribute row for every column in every
    table in the database.  (There will also be attribute entries for
-   indexes, and indeed all objects that have pg_class
+   indexes, and indeed all objects that have
+   pg_class
    entries.)
   
 
@@ -1270,7 +1273,7 @@
       
        This column has a default expression or generation expression, in which
        case there will be a corresponding entry in the
-       pg_attrdef catalog that actually defines the
+       pg_attrdef catalog that actually defines the
        expression.  (Check attgenerated to
        determine whether this is a default or a generation expression.)
       
@@ -1402,9 +1405,9 @@
    In a dropped column's pg_attribute entry,
    atttypid is reset to zero, but
    attlen and the other fields copied from
-   pg_type are still valid.  This arrangement is needed
+   pg_type are still valid.  This arrangement is needed
    to cope with the situation where the dropped column's data type was
-   later dropped, and so there is no pg_type row anymore.
+   later dropped, and so there is no pg_type row anymore.
    attlen and the other fields can be used
    to interpret the contents of a row of the table.
   
@@ -1835,14 +1838,16 @@
 
   
    The catalog pg_class catalogs tables and most
-   everything else that has columns or is otherwise similar to a
-   table.  This includes indexes (but see also
-   pg_index), sequences (but see also
-   pg_sequence), views, materialized
-   views, composite types, and TOAST tables; see relkind.
-   Below, when we mean all of these
-   kinds of objects we speak of relations.  Not all
-   columns are meaningful for all relation types.
+   everything else that has columns or is otherwise similar to a table.
+   This includes indexes (but see also pg_index),
+   sequences (but see also pg_sequence),
+   views, materialized views, composite types, and TOAST tables;
+   see relkind.
+   Below, when we mean all of these kinds of objects we speak of
+   relations.  Not all columns are meaningful for all relation
+   types.
   
 
   
@@ -1895,7 +1900,7 @@ The OID of the data type that corresponds to this table's row type, - if any (zero for indexes, which have no pg_type entry) + if any (zero for indexes, which have no pg_type entry) @@ -2019,7 +2024,7 @@ True if this table is shared across all databases in the cluster. Only - certain system catalogs (such as pg_database) + certain system catalogs (such as pg_database) are shared. @@ -2059,8 +2064,8 @@ Number of user columns in the relation (system columns not counted). There must be this many corresponding entries in - pg_attribute. See also - pg_attribute.attnum. + pg_attribute. See also + pg_attribute.attnum>. @@ -2404,7 +2409,8 @@ key, unique, foreign key, and exclusion constraints on tables. (Column constraints are not treated specially. Every column constraint is equivalent to some table constraint.) - Not-null constraints are represented in the pg_attribute + Not-null constraints are represented in the + pg_attribute catalog, not here. @@ -2707,7 +2713,7 @@ For other cases, a zero appears in conkey and the associated index must be consulted to discover the expression that is constrained. (conkey thus has the - same contents as pg_index.indkey for the + same contents as pg_index.indkey for the index.) @@ -2975,7 +2981,7 @@ track whether the database needs to be vacuumed in order to prevent transaction ID wraparound or to allow pg_xact to be shrunk. It is the minimum of the per-table - pg_class.relfrozenxid values. + pg_class.relfrozenxid values. @@ -2989,7 +2995,7 @@ track whether the database needs to be vacuumed in order to prevent multixact ID wraparound or to allow pg_multixact to be shrunk. It is the minimum of the per-table - pg_class.relminmxid values. + pg_class.relminmxid values. @@ -3001,7 +3007,7 @@ The default tablespace for the database. Within this database, all tables for which - pg_class.reltablespace is zero + pg_class.reltablespace is zero will be stored in this tablespace; in particular, all the non-shared system catalogs will be there. @@ -3600,7 +3606,7 @@ (references pg_type.oid) - The OID of the pg_type entry owning this enum value + The OID of the pg_type entry owning this enum value @@ -4094,11 +4100,13 @@ The catalog pg_foreign_table contains - auxiliary information about foreign tables. A foreign table is - primarily represented by a pg_class entry, - just like a regular table. Its pg_foreign_table - entry contains the information that is pertinent only to foreign tables - and not any other kind of relation. + auxiliary information about foreign tables. + A foreign table is primarily represented by a + pg_class + entry, just like a regular table. + Its pg_foreign_table entry contains the + information that is pertinent only to foreign tables and not any other kind + of relation.
@@ -4122,7 +4130,7 @@ (references pg_class.oid) - OID of the pg_class entry for this foreign table + The OID of the pg_class entry for this foreign table @@ -4160,7 +4168,7 @@ The catalog pg_index contains part of the information about indexes. The rest is mostly in - pg_class. + pg_class.
@@ -4184,7 +4192,7 @@ (references pg_class.oid) - The OID of the pg_class entry for this index + The OID of the pg_class entry for this index @@ -4194,7 +4202,7 @@ (references pg_class.oid) - The OID of the pg_class entry for the table this index is for + The OID of the pg_class entry for the table this index is for @@ -5391,7 +5399,7 @@ (references pg_class.oid) - The OID of the pg_class entry for this partitioned table + The OID of the pg_class entry for this partitioned table @@ -5420,7 +5428,7 @@ (references pg_class.oid) - The OID of the pg_class entry for the default partition + The OID of the pg_class entry for the default partition of this partitioned table, or zero if this partitioned table does not have a default partition. @@ -5600,7 +5608,7 @@ Policies stored in pg_policy are applied only when - pg_class.relrowsecurity is set for + pg_class.relrowsecurity is set for their table. @@ -5625,7 +5633,7 @@ If prokind indicates that the entry is for an aggregate function, there should be a matching row in - pg_aggregate. + pg_aggregate.
@@ -6555,7 +6563,8 @@ The catalog pg_sequence contains information about sequences. Some of the information about sequences, such as the name and - the schema, is in pg_class. + the schema, is in + pg_class
@@ -6579,7 +6588,7 @@ (references pg_class.oid) - The OID of the pg_class entry for this sequence + The OID of the pg_class entry for this sequence @@ -7338,13 +7347,14 @@ The catalog pg_statistic_ext_data - holds data for extended planner statistics defined in pg_statistic_ext. + holds data for extended planner statistics defined in + pg_statistic_ext. Each row in this catalog corresponds to a statistics object created with . - Like pg_statistic, + Like pg_statistic, pg_statistic_ext_data should not be readable by the public, since the contents might be considered sensitive. (Example: most common combinations of values in columns might be quite @@ -7352,7 +7362,7 @@ pg_stats_ext is a publicly readable view on pg_statistic_ext_data (after joining - with pg_statistic_ext) that only exposes + with pg_statistic_ext) that only exposes information about those tables and columns that are readable by the current user. @@ -7938,7 +7948,7 @@ (references pg_constraint.oid) - The pg_constraint entry associated with the trigger, if any + The pg_constraint entry associated with the trigger, if any @@ -8036,7 +8046,7 @@ When tgconstraint is nonzero, tgconstrrelid, tgconstrindid, tgdeferrable, and tginitdeferred are - largely redundant with the referenced pg_constraint entry. + largely redundant with the referenced pg_constraint entry. However, it is possible for a non-deferrable trigger to be associated with a deferrable constraint: foreign key constraints can have some deferrable and some non-deferrable triggers. @@ -8183,7 +8193,7 @@ (references pg_ts_config.oid) - The OID of the pg_ts_config entry owning this map entry + The OID of the pg_ts_config entry owning this map entry @@ -8697,11 +8707,11 @@ If this is a composite type (see typtype), then this column points to - the pg_class entry that defines the + the pg_class entry that defines the corresponding table. (For a free-standing composite type, the - pg_class entry doesn't really represent + pg_class entry doesn't really represent a table, but it is needed anyway for the type's - pg_attribute entries to link to.) + pg_attribute entries to link to.) Zero for non-composite types. @@ -9964,8 +9974,9 @@ The view pg_hba_file_rules provides a summary of - the contents of the client authentication configuration - file, pg_hba.conf. A row appears in this view for each + the contents of the client authentication configuration file, + pg_hba.conf. + A row appears in this view for each non-empty, non-comment line in the file, with annotations indicating whether the rule could be applied successfully. @@ -10206,8 +10217,10 @@ individual tuples of relations, transaction IDs (both virtual and permanent IDs), and general database objects (identified by class OID and object OID, - in the same way as in pg_description or - pg_depend). Also, the right to extend a + in the same way as in + pg_description + or pg_depend). + Also, the right to extend a relation is represented as a separate lockable object. Also, advisory locks can be taken on numbers that have user-defined meanings. @@ -10447,7 +10460,7 @@ pg_locks provides a global view of all locks in the database cluster, not only those relevant to the current database. Although its relation column can be joined - against pg_class.oid to identify locked + against pg_class.oid to identify locked relations, this will only work correctly for relations in the current database (those for which the database column is either the current database's OID or zero). @@ -10944,8 +10957,9 @@ The view pg_publication_tables provides information about the mapping between publications and the tables they - contain. Unlike the underlying - catalog pg_publication_rel, this view expands + contain. Unlike the underlying catalog + pg_publication_rel, + this view expands publications defined as FOR ALL TABLES, so for such publications there will be a row for each eligible table. @@ -11505,7 +11519,7 @@ The pg_rules view excludes the ON SELECT rules of views and materialized views; those can be seen in - pg_views and pg_matviews. + pg_views and pg_matviews. @@ -12334,7 +12348,7 @@ the information stored in the pg_statistic catalog. This view allows access only to rows of - pg_statistic that correspond to tables the + pg_statistic that correspond to tables the user has permission to read, and therefore it is safe to allow public read access to this view. @@ -12343,7 +12357,7 @@ pg_stats is also designed to present the information in a more readable format than the underlying catalog — at the cost that its schema must be extended whenever new slot types - are defined for pg_statistic. + are defined for pg_statistic.
@@ -12545,7 +12559,7 @@ linkend="catalog-pg-statistic-ext">pg_statistic_ext and pg_statistic_ext_data catalogs. This view allows access only to rows of - pg_statistic_ext and pg_statistic_ext_data + pg_statistic_ext and pg_statistic_ext_data that correspond to tables the user has permission to read, and therefore it is safe to allow public read access to this view. @@ -12554,7 +12568,7 @@ pg_stats_ext is also designed to present the information in a more readable format than the underlying catalogs — at the cost that its schema must be extended whenever new types - of extended statistics are added to pg_statistic_ext. + of extended statistics are added to pg_statistic_ext.
-- 2.26.2

Re: [PATCH] Missing links between system catalog documentation pages

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Fabien COELHO  writes:
>> I didn't think there was much point in linkifying both in that case, and
>> other similar situations.

> The point is that the user reads a sentence, attempts to jump but 
> sometimes can't, because the is not the first occurrence. I'd go for all 
> mentions of another relation should be link.

That has not been our practice up to now, eg in comparable cases in
discussions of GUC variables, only the first reference is xref-ified.
I think it could be kind of annoying to make every reference a link,
both for regular readers (the link decoration is too bold in most
browsers) and for users of screen-reader software.

There is a fair question as to how far apart two references should
be before we  both of them.  But I think that distance
does need to be more than zero, and probably more than one para.

			regards, tom lane


Re: [PATCH] Missing links between system catalog documentation pages

От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
On 2020-Jun-21, Tom Lane wrote:

> That has not been our practice up to now, eg in comparable cases in
> discussions of GUC variables, only the first reference is xref-ified.
> I think it could be kind of annoying to make every reference a link,
> both for regular readers (the link decoration is too bold in most
> browsers) and for users of screen-reader software.

In the glossary I also changed things so that only the first reference
of a term in another term's definition is linked; my experience reading
the originals as submitted (which did link them all at some point) is
that the extra links are very distracting, bad for readability.  So +1
for not adding links to every single mention.

> There is a fair question as to how far apart two references should
> be before we  both of them.  But I think that distance
> does need to be more than zero, and probably more than one para.

Nod.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: [PATCH] Missing links between system catalog documentation pages

От:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Alvaro Herrera  writes:

> On 2020-Jun-21, Tom Lane wrote:
>
>> That has not been our practice up to now, eg in comparable cases in
>> discussions of GUC variables, only the first reference is xref-ified.
>> I think it could be kind of annoying to make every reference a link,
>> both for regular readers (the link decoration is too bold in most
>> browsers) and for users of screen-reader software.
>
> In the glossary I also changed things so that only the first reference
> of a term in another term's definition is linked; my experience reading
> the originals as submitted (which did link them all at some point) is
> that the extra links are very distracting, bad for readability.  So +1
> for not adding links to every single mention.

There were only three cases of multiple mentions of the same table in a
single paragraph, I've removed them in the attached patch.

I've also added a second patch that makes the SQL commands links.  There
were some cases of the same commands being mentioned in the descriptions
of multiple columns in the same table, but I've left those in place,
since that feels less disruptive than in prose.

>> There is a fair question as to how far apart two references should
>> be before we  both of them.  But I think that distance
>> does need to be more than zero, and probably more than one para.
>
> Nod.

I tend to agree.

- ilmari
-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen

From 165c4aa4613d572a0547a2f2d01dcf06dfa93a24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= 
Date: Sun, 24 May 2020 21:48:29 +0100
Subject: [PATCH v3 1/2] Add missing cross-links in system catalog
 documentation

This makes the first mention of a system catalog or view in each
paragraph in the system system catalog and view documentation pages
hyperlinks, for easier navigation.

Also linkify the first mention of pg_hba.conf in pg_hba_file_rules, as
that's more specific and easier to spot than the link to the client
authentication chapter at the bottom.
---
 doc/src/sgml/catalogs.sgml | 140 ++++++++++++++++++++-----------------
 1 file changed, 77 insertions(+), 63 deletions(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 700271fd40..47d78d2ff8 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -16,7 +16,8 @@
    Normally, one should not change the system catalogs by hand, there
    are normally SQL commands to do that.  (For example, CREATE
    DATABASE inserts a row into the
-   pg_database catalog — and actually
+   pg_database
+   catalog — and actually
    creates the database on disk.)  There are some exceptions for
    particularly esoteric operations, but many of those have been made
    available as SQL commands over time, and so the need for direct manipulation
@@ -381,9 +382,10 @@
    sum, count, and
    max.  Each entry in
    pg_aggregate is an extension of an entry
-   in pg_proc.  The pg_proc
-   entry carries the aggregate's name, input and output data types, and
-   other information that is similar to ordinary functions.
+   in pg_proc.
+   The pg_proc entry carries the aggregate's name,
+   input and output data types, and other information that is similar to
+   ordinary functions.
   
 
   
@@ -407,7 +409,7 @@
        (references pg_proc.oid)
       
       
-       pg_proc OID of the aggregate function
+       OID of the aggregate function
       
      
 
@@ -902,7 +904,7 @@
    catalog structure for performance reasons).  Also,
    amoplefttype and amoprighttype must match
    the oprleft and oprright fields of the
-   referenced pg_operator entry.
+   referenced pg_operator entry.
   
 
  
@@ -1099,7 +1101,8 @@
    table columns.  There will be exactly one
    pg_attribute row for every column in every
    table in the database.  (There will also be attribute entries for
-   indexes, and indeed all objects that have pg_class
+   indexes, and indeed all objects that have
+   pg_class
    entries.)
   
 
@@ -1270,7 +1273,7 @@
       
        This column has a default expression or generation expression, in which
        case there will be a corresponding entry in the
-       pg_attrdef catalog that actually defines the
+       pg_attrdef catalog that actually defines the
        expression.  (Check attgenerated to
        determine whether this is a default or a generation expression.)
       
@@ -1402,7 +1405,7 @@
    In a dropped column's pg_attribute entry,
    atttypid is reset to zero, but
    attlen and the other fields copied from
-   pg_type are still valid.  This arrangement is needed
+   pg_type are still valid.  This arrangement is needed
    to cope with the situation where the dropped column's data type was
    later dropped, and so there is no pg_type row anymore.
    attlen and the other fields can be used
@@ -1835,14 +1838,16 @@
 
   
    The catalog pg_class catalogs tables and most
-   everything else that has columns or is otherwise similar to a
-   table.  This includes indexes (but see also
-   pg_index), sequences (but see also
-   pg_sequence), views, materialized
-   views, composite types, and TOAST tables; see relkind.
-   Below, when we mean all of these
-   kinds of objects we speak of relations.  Not all
-   columns are meaningful for all relation types.
+   everything else that has columns or is otherwise similar to a table.
+   This includes indexes (but see also pg_index),
+   sequences (but see also pg_sequence),
+   views, materialized views, composite types, and TOAST tables;
+   see relkind.
+   Below, when we mean all of these kinds of objects we speak of
+   relations.  Not all columns are meaningful for all relation
+   types.
   
 
   
@@ -1895,7 +1900,7 @@ The OID of the data type that corresponds to this table's row type, - if any (zero for indexes, which have no pg_type entry) + if any (zero for indexes, which have no pg_type entry) @@ -2019,7 +2024,7 @@ True if this table is shared across all databases in the cluster. Only - certain system catalogs (such as pg_database) + certain system catalogs (such as pg_database) are shared. @@ -2059,8 +2064,8 @@ Number of user columns in the relation (system columns not counted). There must be this many corresponding entries in - pg_attribute. See also - pg_attribute.attnum. + pg_attribute. See also + pg_attribute.attnum. @@ -2404,7 +2409,8 @@ key, unique, foreign key, and exclusion constraints on tables. (Column constraints are not treated specially. Every column constraint is equivalent to some table constraint.) - Not-null constraints are represented in the pg_attribute + Not-null constraints are represented in the + pg_attribute catalog, not here. @@ -2707,7 +2713,7 @@ For other cases, a zero appears in conkey and the associated index must be consulted to discover the expression that is constrained. (conkey thus has the - same contents as pg_index.indkey for the + same contents as pg_index.indkey for the index.) @@ -2975,7 +2981,7 @@ track whether the database needs to be vacuumed in order to prevent transaction ID wraparound or to allow pg_xact to be shrunk. It is the minimum of the per-table - pg_class.relfrozenxid values. + pg_class.relfrozenxid values. @@ -2989,7 +2995,7 @@ track whether the database needs to be vacuumed in order to prevent multixact ID wraparound or to allow pg_multixact to be shrunk. It is the minimum of the per-table - pg_class.relminmxid values. + pg_class.relminmxid values. @@ -3001,7 +3007,7 @@ The default tablespace for the database. Within this database, all tables for which - pg_class.reltablespace is zero + pg_class.reltablespace is zero will be stored in this tablespace; in particular, all the non-shared system catalogs will be there. @@ -3600,7 +3606,7 @@ (references pg_type.oid) - The OID of the pg_type entry owning this enum value + The OID of the pg_type entry owning this enum value @@ -4094,11 +4100,13 @@ The catalog pg_foreign_table contains - auxiliary information about foreign tables. A foreign table is - primarily represented by a pg_class entry, - just like a regular table. Its pg_foreign_table - entry contains the information that is pertinent only to foreign tables - and not any other kind of relation. + auxiliary information about foreign tables. + A foreign table is primarily represented by a + pg_class + entry, just like a regular table. + Its pg_foreign_table entry contains the + information that is pertinent only to foreign tables and not any other kind + of relation.
@@ -4122,7 +4130,7 @@ (references pg_class.oid) - OID of the pg_class entry for this foreign table + The OID of the pg_class entry for this foreign table @@ -4160,7 +4168,7 @@ The catalog pg_index contains part of the information about indexes. The rest is mostly in - pg_class. + pg_class.
@@ -4184,7 +4192,7 @@ (references pg_class.oid) - The OID of the pg_class entry for this index + The OID of the pg_class entry for this index @@ -4194,7 +4202,7 @@ (references pg_class.oid) - The OID of the pg_class entry for the table this index is for + The OID of the pg_class entry for the table this index is for @@ -5391,7 +5399,7 @@ (references pg_class.oid) - The OID of the pg_class entry for this partitioned table + The OID of the pg_class entry for this partitioned table @@ -5420,7 +5428,7 @@ (references pg_class.oid) - The OID of the pg_class entry for the default partition + The OID of the pg_class entry for the default partition of this partitioned table, or zero if this partitioned table does not have a default partition. @@ -5600,7 +5608,7 @@ Policies stored in pg_policy are applied only when - pg_class.relrowsecurity is set for + pg_class.relrowsecurity is set for their table. @@ -5625,7 +5633,7 @@ If prokind indicates that the entry is for an aggregate function, there should be a matching row in - pg_aggregate. + pg_aggregate.
@@ -6555,7 +6563,8 @@ The catalog pg_sequence contains information about sequences. Some of the information about sequences, such as the name and - the schema, is in pg_class. + the schema, is in + pg_class
@@ -6579,7 +6588,7 @@ (references pg_class.oid) - The OID of the pg_class entry for this sequence + The OID of the pg_class entry for this sequence @@ -7338,13 +7347,14 @@ The catalog pg_statistic_ext_data - holds data for extended planner statistics defined in pg_statistic_ext. + holds data for extended planner statistics defined in + pg_statistic_ext. Each row in this catalog corresponds to a statistics object created with . - Like pg_statistic, + Like pg_statistic, pg_statistic_ext_data should not be readable by the public, since the contents might be considered sensitive. (Example: most common combinations of values in columns might be quite @@ -7352,7 +7362,7 @@ pg_stats_ext is a publicly readable view on pg_statistic_ext_data (after joining - with pg_statistic_ext) that only exposes + with pg_statistic_ext) that only exposes information about those tables and columns that are readable by the current user. @@ -7938,7 +7948,7 @@ (references pg_constraint.oid) - The pg_constraint entry associated with the trigger, if any + The pg_constraint entry associated with the trigger, if any @@ -8036,7 +8046,7 @@ When tgconstraint is nonzero, tgconstrrelid, tgconstrindid, tgdeferrable, and tginitdeferred are - largely redundant with the referenced pg_constraint entry. + largely redundant with the referenced pg_constraint entry. However, it is possible for a non-deferrable trigger to be associated with a deferrable constraint: foreign key constraints can have some deferrable and some non-deferrable triggers. @@ -8183,7 +8193,7 @@ (references pg_ts_config.oid) - The OID of the pg_ts_config entry owning this map entry + The OID of the pg_ts_config entry owning this map entry @@ -8697,11 +8707,11 @@ If this is a composite type (see typtype), then this column points to - the pg_class entry that defines the + the pg_class entry that defines the corresponding table. (For a free-standing composite type, the - pg_class entry doesn't really represent + pg_class entry doesn't really represent a table, but it is needed anyway for the type's - pg_attribute entries to link to.) + pg_attribute entries to link to.) Zero for non-composite types. @@ -9964,8 +9974,9 @@ The view pg_hba_file_rules provides a summary of - the contents of the client authentication configuration - file, pg_hba.conf. A row appears in this view for each + the contents of the client authentication configuration file, + pg_hba.conf. + A row appears in this view for each non-empty, non-comment line in the file, with annotations indicating whether the rule could be applied successfully. @@ -10206,8 +10217,10 @@ individual tuples of relations, transaction IDs (both virtual and permanent IDs), and general database objects (identified by class OID and object OID, - in the same way as in pg_description or - pg_depend). Also, the right to extend a + in the same way as in + pg_description + or pg_depend). + Also, the right to extend a relation is represented as a separate lockable object. Also, advisory locks can be taken on numbers that have user-defined meanings. @@ -10447,7 +10460,7 @@ pg_locks provides a global view of all locks in the database cluster, not only those relevant to the current database. Although its relation column can be joined - against pg_class.oid to identify locked + against pg_class.oid to identify locked relations, this will only work correctly for relations in the current database (those for which the database column is either the current database's OID or zero). @@ -10944,8 +10957,9 @@ The view pg_publication_tables provides information about the mapping between publications and the tables they - contain. Unlike the underlying - catalog pg_publication_rel, this view expands + contain. Unlike the underlying catalog + pg_publication_rel, + this view expands publications defined as FOR ALL TABLES, so for such publications there will be a row for each eligible table. @@ -11505,7 +11519,7 @@ The pg_rules view excludes the ON SELECT rules of views and materialized views; those can be seen in - pg_views and pg_matviews. + pg_views and pg_matviews. @@ -12334,7 +12348,7 @@ the information stored in the pg_statistic catalog. This view allows access only to rows of - pg_statistic that correspond to tables the + pg_statistic that correspond to tables the user has permission to read, and therefore it is safe to allow public read access to this view. @@ -12343,7 +12357,7 @@ pg_stats is also designed to present the information in a more readable format than the underlying catalog — at the cost that its schema must be extended whenever new slot types - are defined for pg_statistic. + are defined for pg_statistic.
@@ -12545,7 +12559,7 @@ linkend="catalog-pg-statistic-ext">pg_statistic_ext and pg_statistic_ext_data catalogs. This view allows access only to rows of - pg_statistic_ext and pg_statistic_ext_data + pg_statistic_ext and pg_statistic_ext_data that correspond to tables the user has permission to read, and therefore it is safe to allow public read access to this view. @@ -12554,7 +12568,7 @@ pg_stats_ext is also designed to present the information in a more readable format than the underlying catalogs — at the cost that its schema must be extended whenever new types - of extended statistics are added to pg_statistic_ext. + of extended statistics are added to pg_statistic_ext.
-- 2.26.2 From dfbe82db56eba85eb0e36db4c39c1d584e4b062d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= Date: Sun, 21 Jun 2020 14:56:21 +0100 Subject: [PATCH v3 2/2] Make SQL command names in the catlog documentation links In passing, fix the initdb references to be rather than , which is what we normally use. --- doc/src/sgml/catalogs.sgml | 114 +++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 47d78d2ff8..fe2ffc993f 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -14,8 +14,8 @@ tables. You can drop and recreate the tables, add columns, insert and update values, and severely mess up your system that way. Normally, one should not change the system catalogs by hand, there - are normally SQL commands to do that. (For example, CREATE - DATABASE inserts a row into the + are normally SQL commands to do that. (For example, + inserts a row into the pg_database catalog — and actually creates the database on disk.) There are some exceptions for @@ -1966,9 +1966,9 @@ Size of the on-disk representation of this table in pages (of size BLCKSZ). This is only an estimate used by the - planner. It is updated by VACUUM, - ANALYZE, and a few DDL commands such as - CREATE INDEX. + planner. It is updated by , + , and a few DDL commands such as + . @@ -1978,9 +1978,9 @@ Number of live rows in the table. This is only an estimate used by - the planner. It is updated by VACUUM, - ANALYZE, and a few DDL commands such as - CREATE INDEX. + the planner. It is updated by , + , and a few DDL commands such as + . @@ -1991,9 +1991,9 @@ Number of pages that are marked all-visible in the table's visibility map. This is only an estimate used by the - planner. It is updated by VACUUM, - ANALYZE, and a few DDL commands such as - CREATE INDEX. + planner. It is updated by , + , and a few DDL commands such as + . @@ -2237,8 +2237,8 @@ lazily: they are guaranteed to be true if that's the correct state, but may not be reset to false immediately when the condition is no longer true. For example, relhasindex is set by - CREATE INDEX, but it is never cleared by - DROP INDEX. Instead, VACUUM clears + , but it is never cleared by + . Instead, clears relhasindex if it finds the table has no indexes. This arrangement avoids race conditions and improves concurrency. @@ -2415,8 +2415,8 @@ - User-defined constraint triggers (created with CREATE CONSTRAINT - TRIGGER) also give rise to an entry in this table. + User-defined constraint triggers (created with + CREATE CONSTRAINT TRIGGER) also give rise to an entry in this table. @@ -3421,7 +3421,7 @@ the referenced object (see pg_extension). The dependent object can be dropped only via - DROP EXTENSION on the referenced object. + on the referenced object. Functionally this dependency type acts the same as an INTERNAL dependency, but it's kept separate for clarity and to simplify pg_dump. @@ -3452,7 +3452,7 @@ There is no dependent object; this type of entry is a signal that the system itself depends on the referenced object, and so that object must never be deleted. Entries of this type are - created only by initdb. The columns for the + created only by initdb. The columns for the dependent object contain zeroes. @@ -4282,7 +4282,7 @@ If true, the index is currently valid for queries. False means the index is possibly incomplete: it must still be modified by - INSERT/UPDATE operations, but it cannot safely + / operations, but it cannot safely be used for queries. If it is unique, the uniqueness property is not guaranteed true either. @@ -4306,7 +4306,7 @@ If true, the index is currently ready for inserts. False means the - index must be ignored by INSERT/UPDATE + index must be ignored by / operations. @@ -4327,8 +4327,8 @@ If true this index has been chosen as replica identity - using ALTER TABLE ... REPLICA IDENTITY USING INDEX - ... + using ALTER TABLE ... + REPLICA IDENTITY USING INDEX ... @@ -4497,11 +4497,11 @@ Objects can have initial privileges either by having those privileges set when the system is initialized (by initdb) or when the - object is created during a CREATE EXTENSION and the - extension script sets initial privileges using the GRANT + object is created during a and the + extension script sets initial privileges using the system. Note that the system will automatically handle recording of the privileges during the extension script and that extension authors need - only use the GRANT and REVOKE + only use the and statements in their script to have the privileges recorded. The privtype column indicates if the initial privilege was set by initdb or during a @@ -5557,10 +5557,10 @@ The command type to which the policy is applied: - r for SELECT, - a for INSERT, - w for UPDATE, - d for DELETE, + r for , + a for , + w for , + d for , or * for all @@ -6068,7 +6068,7 @@ pubinsert bool - If true, INSERT operations are replicated for + If true, operations are replicated for tables in the publication. @@ -6078,7 +6078,7 @@ pubupdate bool - If true, UPDATE operations are replicated for + If true, operations are replicated for tables in the publication. @@ -6088,7 +6088,7 @@ pubdelete bool - If true, DELETE operations are replicated for + If true, operations are replicated for tables in the publication. @@ -6098,7 +6098,7 @@ pubtruncate bool - If true, TRUNCATE operations are replicated for + If true, operations are replicated for tables in the publication. @@ -6401,9 +6401,9 @@ ev_type char - Event type that the rule is for: 1 = SELECT, 2 = - UPDATE, 3 = INSERT, 4 = - DELETE + Event type that the rule is for: 1 = , 2 = + , 3 = , 4 = + @@ -6825,7 +6825,7 @@ There is no dependent object; this type of entry is a signal that the system itself depends on the referenced object, and so that object must never be deleted. Entries of this type are - created only by initdb. The columns for the + created only by initdb. The columns for the dependent object contain zeroes. @@ -7329,9 +7329,9 @@ The pg_statistic_ext entry is filled in - completely during CREATE STATISTICS, but the actual + completely during , but the actual statistical values are not computed then. - Subsequent ANALYZE commands compute the desired values + Subsequent commands compute the desired values and populate an entry in the pg_statistic_ext_data catalog. @@ -7572,8 +7572,9 @@ This catalog only contains tables known to the subscription after running - either CREATE SUBSCRIPTION or - ALTER SUBSCRIPTION ... REFRESH PUBLICATION. + either or + ALTER SUBSCRIPTION ... REFRESH + PUBLICATION.
@@ -8817,7 +8818,7 @@ (references pg_proc.oid)
- Custom ANALYZE function, or 0 to use the standard function + Custom function, or 0 to use the standard function @@ -10178,7 +10179,7 @@ indexdef text - Index definition (a reconstructed CREATE INDEX + Index definition (a reconstructed command) @@ -10633,7 +10634,7 @@ definition text - Materialized view definition (a reconstructed SELECT query) + Materialized view definition (a reconstructed query) @@ -10803,7 +10804,7 @@ The query string submitted by the client to create this prepared statement. For prepared statements created via SQL, - this is the PREPARE statement submitted by + this is the statement submitted by the client. For prepared statements created via the frontend/backend protocol, this is the text of the prepared statement itself. @@ -10837,7 +10838,7 @@ true if the prepared statement was created - via the PREPARE SQL command; + via the SQL command; false if the statement was prepared via the frontend/backend protocol @@ -11935,7 +11936,7 @@ reset_val text - Value that RESET would reset the parameter to + Value that would reset the parameter to in the current session @@ -11993,7 +11994,7 @@ These settings cannot be changed directly; they reflect internally determined values. Some of them may be adjustable by rebuilding the server with different configuration options, or by changing options - supplied to initdb. + supplied to initdb. @@ -12068,7 +12069,7 @@ These settings can be set from postgresql.conf, - or within a session via the SET command; but only superusers + or within a session via the command; but only superusers can change them via SET. Changes in postgresql.conf will affect existing sessions only if no session-local value has been established with SET. @@ -12081,7 +12082,7 @@ These settings can be set from postgresql.conf, - or within a session via the SET command. Any user is + or within a session via the command. Any user is allowed to change their session-local value. Changes in postgresql.conf will affect existing sessions only if no session-local value has been established with SET. @@ -12097,7 +12098,7 @@ The pg_settings view cannot be inserted into or - deleted from, but it can be updated. An UPDATE applied + deleted from, but it can be updated. An applied to a row of pg_settings is equivalent to executing the command on that named parameter. The change only affects the value used by the current @@ -12441,7 +12442,7 @@ If greater than zero, the estimated number of distinct values in the column. If less than zero, the negative of the number of distinct values divided by the number of rows. (The negated form is used when - ANALYZE believes that the number of distinct values is + believes that the number of distinct values is likely to increase as the table grows; the positive form is used when the column seems to have a fixed number of possible values.) For example, -1 indicates a unique column in which the number of distinct @@ -12539,7 +12540,8 @@ The maximum number of entries in the array fields can be controlled on a - column-by-column basis using the ALTER TABLE SET STATISTICS + column-by-column basis using the ALTER + TABLE SET STATISTICS command, or globally by setting the run-time parameter. @@ -12664,7 +12666,7 @@ than zero, the estimated number of distinct values in the combination. If less than zero, the negative of the number of distinct values divided by the number of rows. - (The negated form is used when ANALYZE believes that + (The negated form is used when believes that the number of distinct values is likely to increase as the table grows; the positive form is used when the column seems to have a fixed number of possible values.) For example, -1 indicates a unique combination of @@ -12729,8 +12731,8 @@ The maximum number of entries in the array fields can be controlled on a - column-by-column basis using the ALTER TABLE SET STATISTICS - command, or globally by setting the + column-by-column basis using the ALTER + TABLE SET STATISTICS command, or globally by setting the run-time parameter. @@ -13292,7 +13294,7 @@ definition text - View definition (a reconstructed SELECT query) + View definition (a reconstructed query) -- 2.26.2

Re: [PATCH] Missing links between system catalog documentationpages

От:
Fabien COELHO <coelho@cri.ensmp.fr>
Дата:

Hello Tom,

>>> I didn't think there was much point in linkifying both in that case, 
>>> and other similar situations.
>
>> The point is that the user reads a sentence, attempts to jump but 
>> sometimes can't, because the is not the first occurrence. I'd go for 
>> all mentions of another relation should be link.
>
> That has not been our practice up to now, eg in comparable cases in
> discussions of GUC variables, only the first reference is xref-ified.
> I think it could be kind of annoying to make every reference a link,
> both for regular readers (the link decoration is too bold in most
> browsers)

Hmmm. That looks like an underlying CSS issue, not that links are 
intrinsically bad.

I find it annoying that the same thing appears differently from one line 
to the next. It seems I'm the only one who likes things to be uniform, 
though.

> and for users of screen-reader software.

I do not know about those, and what constraints it puts on markup.

-- 
Fabien.


Re: [PATCH] Missing links between system catalog documentation pages

От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 2020-06-21 19:49, Dagfinn Ilmari Mannsåker wrote:
> There were only three cases of multiple mentions of the same table in a
> single paragraph, I've removed them in the attached patch.
> 
> I've also added a second patch that makes the SQL commands links.  There
> were some cases of the same commands being mentioned in the descriptions
> of multiple columns in the same table, but I've left those in place,
> since that feels less disruptive than in prose.

Committed after some rebasing and tweaking.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: [PATCH] Missing links between system catalog documentation pages

От:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Hi Peter,

Peter Eisentraut  writes:

> On 2020-06-21 19:49, Dagfinn Ilmari Mannsåker wrote:
>> There were only three cases of multiple mentions of the same table in a
>> single paragraph, I've removed them in the attached patch.
>>
>> I've also added a second patch that makes the SQL commands links.  There
>> were some cases of the same commands being mentioned in the descriptions
>> of multiple columns in the same table, but I've left those in place,
>> since that feels less disruptive than in prose.
>
> Committed after some rebasing and tweaking.

Thanks!

I just noticed that both this and the command link patch modified the
same sentence about CREATE DATABASE and pg_database, so those changes
seem to have been lost in the merge.  Attached is a follow-up patch that
adds them both.

- ilmari
-- 
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
 the consequences of."                              -- Skud's Meta-Law

From d043e64c925a21d42bfd28e6c4ca2e44e4b4d356 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= 
Date: Sun, 24 May 2020 21:48:29 +0100
Subject: [PATCH] Add two more missing command and catalog cross-links

The two earlier doc patches both modified this paragraph, so these two
changes appear to have been lost while resolving the conflict.
---
 doc/src/sgml/catalogs.sgml | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 508bea3bc6..6f2e0d19dc 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -14,13 +14,14 @@
    tables.  You can drop and recreate the tables, add columns, insert
    and update values, and severely mess up your system that way.
    Normally, one should not change the system catalogs by hand, there
-   are normally SQL commands to do that.  (For example, CREATE
-   DATABASE inserts a row into the
-   pg_database catalog — and actually
-   creates the database on disk.)  There are some exceptions for
-   particularly esoteric operations, but many of those have been made
-   available as SQL commands over time, and so the need for direct manipulation
-   of the system catalogs is ever decreasing.
+   are normally SQL commands to do that.  (For example,  inserts a row into the pg_database
+   catalog — and actually creates the database on disk.)  There
+   are some exceptions for particularly esoteric operations, but many
+   of those have been made available as SQL commands over time, and so
+   the need for direct manipulation of the system catalogs is ever
+   decreasing.
   
 
  
-- 
2.27.0

Re: [PATCH] Missing links between system catalog documentation pages

От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 2020-09-03 17:40, Dagfinn Ilmari Mannsåker wrote:
> I just noticed that both this and the command link patch modified the
> same sentence about CREATE DATABASE and pg_database, so those changes
> seem to have been lost in the merge.  Attached is a follow-up patch that
> adds them both.

I think in those cases I would leave off the link.  The mentions there 
are just examples of the relationship between a catalog and a command. 
It doesn't mean you are meant to look up the specific catalog and command.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


FAQ