Thread
Commits
-
Doc: minor improvements for section 11.2 "Index Types".
- 85b4ba73423b 14.0 landed
-
[PATCH] Add section headings to index types doc
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> — 2020-07-31T09:30:59Z
Hi hackers, Every time I have to look up what kinds of operations each index type is suitable for, I get annoyed by the index types page being virtually unskimmable due to not having headings for each index type. Attached is a patch that adds <sect2> tags for each index type to make it easier to see where the description of each one starts. - 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
-
Re: [PATCH] Add section headings to index types doc
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> — 2020-08-03T11:32:17Z
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > Hi hackers, > > Every time I have to look up what kinds of operations each index type is > suitable for, I get annoyed by the index types page being virtually > unskimmable due to not having headings for each index type. > > Attached is a patch that adds <sect2> tags for each index type to make > it easier to see where the description of each one starts. Added to the next commitfest: https://commitfest.postgresql.org/29/2665/ Also, for easier review, here's the `git diff -w` output, since the <sect2> tags caused most of the page to have to be renidented. Tangentially, does anyone know of a tool to strip whitespace changes from an existing diff, as if it had been generated with `-w` in the first place? diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml index 28adaba72d..332d161547 100644 --- a/doc/src/sgml/indices.sgml +++ b/doc/src/sgml/indices.sgml @@ -122,6 +122,9 @@ B-tree indexes, which fit the most common situations. </para> + <sect2 id="indexes-types-btree"> + <title>B-tree</title> + <para> <indexterm> <primary>index</primary> @@ -172,6 +175,10 @@ This is not always faster than a simple scan and sort, but it is often helpful. </para> + </sect2> + + <sect2 id="indexes-types-hash"> + <title>Hash</title> <para> <indexterm> @@ -191,6 +198,10 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> USING HASH (<replaceable>column</replaceable>); </synopsis> </para> + </sect2> + + <sect2 id="indexes-type-gist"> + <title>GiST</title> <para> <indexterm> @@ -246,6 +257,10 @@ In <xref linkend="gist-builtin-opclasses-table"/>, operators that can be used in this way are listed in the column <quote>Ordering Operators</quote>. </para> + </sect2> + + <sect2 id="indexes-type-spgist"> + <title>SP-GiST</title> <para> <indexterm> @@ -286,6 +301,10 @@ corresponding operator is specified in the <quote>Ordering Operators</quote> column in <xref linkend="spgist-builtin-opclasses-table"/>. </para> + </sect2> + + <sect2 id="indexes-types-gin"> + <title>GIN</title> <para> <indexterm> @@ -327,6 +346,10 @@ classes are available in the <literal>contrib</literal> collection or as separate projects. For more information see <xref linkend="gin"/>. </para> + </sect2> + + <sect2 id="indexes-types-brin"> + <title>BRIN</title> <para> <indexterm> @@ -360,6 +383,7 @@ documented in <xref linkend="brin-builtin-opclasses-table"/>. For more information see <xref linkend="brin"/>. </para> + </sect2> </sect1> - ilmari -- "A disappointingly low fraction of the human race is, at any given time, on fire." - Stig Sandbeck Mathisen -
Re: [PATCH] Add section headings to index types doc
Magnus Hagander <magnus@hagander.net> — 2020-08-03T11:56:50Z
On Mon, Aug 3, 2020 at 1:32 PM Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> wrote: > ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > > > Hi hackers, > > > > Every time I have to look up what kinds of operations each index type is > > suitable for, I get annoyed by the index types page being virtually > > unskimmable due to not having headings for each index type. > > > > Attached is a patch that adds <sect2> tags for each index type to make > > it easier to see where the description of each one starts. > > Added to the next commitfest: > > https://commitfest.postgresql.org/29/2665/ > > Also, for easier review, here's the `git diff -w` output, since the > <sect2> tags caused most of the page to have to be renidented. > > Tangentially, does anyone know of a tool to strip whitespace changes > from an existing diff, as if it had been generated with `-w` in the > first place? > I think you can do something like: combinediff -w 0001-Add-section-headers-to-index-types-doc.patch /dev/null (combinediff requires two diffs, but one can be /dev/null) -- Magnus Hagander Me: https://www.hagander.net/ <http://www.hagander.net/> Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>
-
Re: [PATCH] Add section headings to index types doc
Tom Lane <tgl@sss.pgh.pa.us> — 2020-08-03T12:16:43Z
ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > Also, for easier review, here's the `git diff -w` output, since the > <sect2> tags caused most of the page to have to be renidented. TBH, I'd suggest just not being anal about whether the indentation nesting is perfect ;-). There are certainly plenty of places in the SGML files today where it is not. And for something like this, I doubt the gain is worth the loss of "git blame" tracking and possible back-patching hazards. I'm a compulsive neatnik when it comes to indentation of the C code, but much less so about the SGML docs. YMMV of course. regards, tom lane
-
Re: [PATCH] Add section headings to index types doc
Jürgen Purtz <juergen@purtz.de> — 2020-08-10T12:52:17Z
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation: tested, passed a) I'm wondering if we should apply one more change to this page. The line-by-line listing of operators occupies much space. What do you think about an inline list (in a separate line) of the operators? old source: <simplelist> <member><literal><</literal></member> <member><literal><=</literal></member> <member><literal>=</literal></member> <member><literal>>=</literal></member> <member><literal>></literal></member> </simplelist> new source: <synopsis>< <= = >= ></synopsis> It looks nice in HTML as well as in PDF. b) I'm in favor of the indentation of all affected lines as it is done in the patch. The new status of this patch is: Waiting on Author -
Re: [PATCH] Add section headings to index types doc
Michael Paquier <michael@paquier.xyz> — 2020-09-30T06:34:23Z
On Mon, Aug 10, 2020 at 12:52:17PM +0000, Jürgen Purtz wrote: > The new status of this patch is: Waiting on Author This has not been answered yet, so I have marked the patch as returned with feedback. -- Michael
-
Re: [PATCH] Add section headings to index types doc
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> — 2020-09-30T11:25:03Z
Michael Paquier <michael@paquier.xyz> writes: > On Mon, Aug 10, 2020 at 12:52:17PM +0000, Jürgen Purtz wrote: >> The new status of this patch is: Waiting on Author > > This has not been answered yet, so I have marked the patch as returned > with feedback. Updated patch attached, wich reformats the operator lists as requested by Jürgen, and skips the reindentation as suggested by Tom. The reindentation patch is attached separately, in case the committer decides they want it properly indented after all. - 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] Add section headings to index types doc
Heikki Linnakangas <hlinnaka@iki.fi> — 2020-09-30T12:53:41Z
On 30/09/2020 14:25, Dagfinn Ilmari Mannsåker wrote: > Michael Paquier <michael@paquier.xyz> writes: > >> On Mon, Aug 10, 2020 at 12:52:17PM +0000, Jürgen Purtz wrote: >>> The new status of this patch is: Waiting on Author >> >> This has not been answered yet, so I have marked the patch as returned >> with feedback. > > Updated patch attached, wich reformats the operator lists as requested > by Jürgen, and skips the reindentation as suggested by Tom. I wonder if "synopsis" is the right markup for the operator lists. I'm not too familiar with SGML, but the closest similar list I could find is this in create_operator.sgml: > The operator name is a sequence of up to <symbol>NAMEDATALEN</symbol>-1 > (63 by default) characters from the following list: > <literallayout> > + - * / < > = ~ ! @ # % ^ & | ` ? > </literallayout> Reading up on the meaning of "literallayout" at https://tdg.docbook.org/tdg/4.5/literallayout.html, though, it doesn't sound quite right either. Maybe "<simplelist type=horiz'>" ? - Heikki
-
Re: [PATCH] Add section headings to index types doc
Jürgen Purtz <juergen@purtz.de> — 2020-10-03T04:59:39Z
On 30.09.20 14:53, Heikki Linnakangas wrote: > On 30/09/2020 14:25, Dagfinn Ilmari Mannsåker wrote: >> Michael Paquier <michael@paquier.xyz> writes: >> >>> On Mon, Aug 10, 2020 at 12:52:17PM +0000, Jürgen Purtz wrote: >>>> The new status of this patch is: Waiting on Author >>> >>> This has not been answered yet, so I have marked the patch as returned >>> with feedback. >> >> Updated patch attached, wich reformats the operator lists as requested >> by Jürgen, and skips the reindentation as suggested by Tom. > > I wonder if "synopsis" is the right markup for the operator lists. I'm > not too familiar with SGML, but the closest similar list I could find > is this in create_operator.sgml: > >> The operator name is a sequence of up to >> <symbol>NAMEDATALEN</symbol>-1 >> (63 by default) characters from the following list: >> <literallayout> >> + - * / < > = ~ ! @ # % ^ & | ` ? >> </literallayout> > > Reading up on the meaning of "literallayout" at > https://tdg.docbook.org/tdg/4.5/literallayout.html, though, it doesn't > sound quite right either. Maybe "<simplelist type=horiz'>" ? > > - Heikki <literallyout> loses the aqua background color (in comparison to the existing documentation). <simplelist type="horiz" columns="5"><member><literal><</literal></member> ... is very chatty: it needs the additional 'columns' attribute and the additional 'member' element. Therefor I am in favor of the <synopsis> solution as given in the last patch of Dagfinn. Playing around I found another solution, which also looks quite good. The chapter uses operators within the text flow at different places. All of them are embedded in a <literal> element (inline). Using this <literal> element also for the index-specific operators, the reading of the page gets easier and the rendering is consistent. But the drawback is that these operator are no longer accentuated. Because they 'represents' the possible access methods per index-type, one can argue that they should be shown in a special way, eg.: in a separate paragraph as in Dagfin's patch. (I suppose that this was the original intention of the huge number of line-breaks.) It would look like the following, but I don't recommend to use it: -- Jürgen Purtz
-
Re: [PATCH] Add section headings to index types doc
David G. Johnston <david.g.johnston@gmail.com> — 2020-10-21T21:12:03Z
On Wed, Sep 30, 2020 at 4:25 AM Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> wrote: > Michael Paquier <michael@paquier.xyz> writes: > > > On Mon, Aug 10, 2020 at 12:52:17PM +0000, Jürgen Purtz wrote: > >> The new status of this patch is: Waiting on Author > > > > This has not been answered yet, so I have marked the patch as returned > > with feedback. > > Updated patch attached, wich reformats the operator lists as requested > by Jürgen, A couple of things: One, I would place the equality operator for hash inside a standalone synopsis just like all of the others. Two, why is hash special in having its create index command provided here? (I notice this isn't the fault of this patch but it stands out when reviewing it) I would suggest rewording hash to look more like the others and add a link to the "CREATE INDEX" command from the chapter preamble. and skips the reindentation as suggested by Tom. > Agreed David J.
-
Re: [PATCH] Add section headings to index types doc
Jürgen Purtz <juergen@purtz.de> — 2020-10-23T10:18:50Z
On 21.10.20 23:12, David G. Johnston wrote: > On Wed, Sep 30, 2020 at 4:25 AM Dagfinn Ilmari Mannsåker > <ilmari@ilmari.org <mailto:ilmari@ilmari.org>> wrote: > > Michael Paquier <michael@paquier.xyz <mailto:michael@paquier.xyz>> > writes: > > > On Mon, Aug 10, 2020 at 12:52:17PM +0000, Jürgen Purtz wrote: > >> The new status of this patch is: Waiting on Author > > > > This has not been answered yet, so I have marked the patch as > returned > > with feedback. > > Updated patch attached, wich reformats the operator lists as requested > by Jürgen, > > > A couple of things: > > One, I would place the equality operator for hash inside a standalone > synopsis just like all of the others. ok > Two, why is hash special in having its create index command provided > here? (I notice this isn't the fault of this patch but it stands out > when reviewing it) yes, this looks odd. > > I would suggest rewording hash to look more like the others ok > and add a link to the "CREATE INDEX" command from the chapter preamble. is the link necessary? > > and skips the reindentation as suggested by Tom. > > > Agreed > David J. -- J. Purtz
-
Re: [PATCH] Add section headings to index types doc
David G. Johnston <david.g.johnston@gmail.com> — 2020-10-23T16:08:50Z
On Fri, Oct 23, 2020 at 3:18 AM Jürgen Purtz <juergen@purtz.de> wrote: > and add a link to the "CREATE INDEX" command from the chapter preamble. > > is the link necessary? > I suppose it would make more sense to add it to the previous section - the introduction page. I do think having a link (or more than one) to CREATE INDEX from the Indexes chapter is reader friendly. Having links to SQL commands is never truly necessary - the reader knows a SQL command reference exists and the name of the command allows them to find the correct page. David J.
-
Re: [PATCH] Add section headings to index types doc
Jürgen Purtz <juergen@purtz.de> — 2020-10-25T09:40:07Z
On 23.10.20 18:08, David G. Johnston wrote: > On Fri, Oct 23, 2020 at 3:18 AM Jürgen Purtz <juergen@purtz.de > <mailto:juergen@purtz.de>> wrote: > >> and add a link to the "CREATE INDEX" command from the chapter >> preamble. > is the link necessary? > > > I suppose it would make more sense to add it to the previous section - > the introduction page. I do think having a link (or more than one) to > CREATE INDEX from the Indexes chapter is reader friendly. Having > links to SQL commands is never truly necessary - the reader knows a > SQL command reference exists and the name of the command allows them > to find the correct page. > > David J. > I'm afraid I haven't grasped everything of your intentions and suggestions of your last two mails. - equal operator in standalone paragraph: ok, integrated. - shift "create index ... using HASH" to a different place: You suggest shifting the statement or a link to the previous (sub-)chapter "11.1 Introduction"? But there is already a "create index" example. Please read my suggestion/modification in the first paragraph of the "11.2 Index Types" page. - "rewording hash": I don't know what is missing here. But I have added a few words about the nature of this index type. Attached are two patches: a) summary against master and b) standalone of my current changes. -- J. Purtz
-
Re: [PATCH] Add section headings to index types doc
Tom Lane <tgl@sss.pgh.pa.us> — 2020-11-25T19:08:02Z
=?UTF-8?Q?J=c3=bcrgen_Purtz?= <juergen@purtz.de> writes: > Attached are two patches: a) summary against master and b) standalone of > my current changes. This was a bit confused ... as submitted, the patch wanted to commit a couple of patchfiles. I sorted it out I believe, and pushed with a little additional fiddling of my own. I did not commit the reindentation of existing text --- I don't think it's worth adding "git blame" noise for. regards, tom lane