doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"
Hi
Commit be8a7a68662 added custom GUC "pg_trgm.strict_word_similarity_threshold",
but omitted to document this in the section "GUC Parameters"; proposed patch
attached.
I suggest backpatching to Pg11, where it was introduced.
Regards
Ian Barwick
--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachments:
doc-pg_trgm-guc.patchtext/x-patch; name=doc-pg_trgm-guc.patchDownload
diff --git a/doc/src/sgml/pgtrgm.sgml b/doc/src/sgml/pgtrgm.sgml
index 83b0033d7a..463df46bdd 100644
--- a/doc/src/sgml/pgtrgm.sgml
+++ b/doc/src/sgml/pgtrgm.sgml
@@ -337,6 +337,20 @@
</para>
</listitem>
</varlistentry>
+ <varlistentry id="guc-pgtrgm-strict-word-similarity-threshold" xreflabel="pg_trgm.strict_word_similarity_threshold">
+ <term>
+ <varname>pg_trgm.strict_word_similarity_threshold</varname> (<type>real</type>)
+ <indexterm>
+ <primary><varname>pg_trgm.strict_word_similarity_threshold</varname> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Sets the current strict word similarity threshold that is used by the <literal><<%</literal>
+ and <literal>%>></literal> operators. The threshold must be between 0 and 1 (default is 0.5).
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</sect2>
On Thu, Jun 6, 2019 at 10:19 PM Ian Barwick <ian.barwick@2ndquadrant.com> wrote:
Hi
Commit be8a7a68662 added custom GUC "pg_trgm.strict_word_similarity_threshold",
but omitted to document this in the section "GUC Parameters";
Indeed.
BTW while looking GUC variables defined in trgm_op.c the operators in
each short description seems not correct; there is an extra percent
sign. Should we also fix them?
postgres(1:43133)=# select name, short_desc from pg_settings where
name like 'pg_trgm%';
name | short_desc
------------------------------------------+-----------------------------------------------
pg_trgm.similarity_threshold | Sets the threshold used by
the %% operator.
pg_trgm.strict_word_similarity_threshold | Sets the threshold used by
the <<%% operator.
pg_trgm.word_similarity_threshold | Sets the threshold used by
the <%% operator.
Regards,
--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
On Fri, Jun 07, 2019 at 03:44:14PM +0900, Masahiko Sawada wrote:
BTW while looking GUC variables defined in trgm_op.c the operators in
each short description seems not correct; there is an extra percent
sign. Should we also fix them?
Both of you are right here, and the addition documentation looks fine
to me (except the indentation). The fix for the parameter
descriptions can be back-patched safely as they would reload correctly
once the version is updated. Or is that not worth bothering except on
HEAD? Thoughts?
--
Michael
On 6/7/19 9:00 PM, Michael Paquier wrote:
On Fri, Jun 07, 2019 at 03:44:14PM +0900, Masahiko Sawada wrote:
BTW while looking GUC variables defined in trgm_op.c the operators in
each short description seems not correct; there is an extra percent
sign. Should we also fix them?Both of you are right here
I did notice the double percent signs but my brain skipped over them
assuming they were translatable strings, thanks for catching that.
and the addition documentation looks fine to me (except the indentation).
The indentation in the additional documentation seems fine to me, it's
the section for the preceding GUC which is offset one column to the right.
Patch attached for that.
The fix for the parameter descriptions can be back-patched safely as they
would reload correctly once the version is updated.
Yup, they would appear the first time one of the pg_trgm functions is called
in a session after the new object file is installed.
Or is that not worth bothering except on HEAD? Thoughts?
Personally I don't think it's that critical, but not bothered either way.
Presumably no-one has complained so far anyway (I only chanced upon the missing
GUC description because I was poking about looking for examples of custom
GUC handling...)
Regards
Ian Barwick
--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachments:
doc-pg_trgm-guc-format.patchtext/x-patch; name=doc-pg_trgm-guc-format.patchDownload
diff --git a/doc/src/sgml/pgtrgm.sgml b/doc/src/sgml/pgtrgm.sgml
index 83b0033d7a..e353ecc954 100644
--- a/doc/src/sgml/pgtrgm.sgml
+++ b/doc/src/sgml/pgtrgm.sgml
@@ -320,23 +320,23 @@
</para>
</listitem>
</varlistentry>
- <varlistentry id="guc-pgtrgm-word-similarity-threshold" xreflabel="pg_trgm.word_similarity_threshold">
- <term>
- <varname>pg_trgm.word_similarity_threshold</varname> (<type>real</type>)
- <indexterm>
- <primary>
- <varname>pg_trgm.word_similarity_threshold</varname> configuration parameter
- </primary>
- </indexterm>
- </term>
- <listitem>
- <para>
- Sets the current word similarity threshold that is used by
- <literal><%</literal> and <literal>%></literal> operators. The threshold
- must be between 0 and 1 (default is 0.6).
- </para>
- </listitem>
- </varlistentry>
+ <varlistentry id="guc-pgtrgm-word-similarity-threshold" xreflabel="pg_trgm.word_similarity_threshold">
+ <term>
+ <varname>pg_trgm.word_similarity_threshold</varname> (<type>real</type>)
+ <indexterm>
+ <primary>
+ <varname>pg_trgm.word_similarity_threshold</varname> configuration parameter
+ </primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Sets the current word similarity threshold that is used by
+ <literal><%</literal> and <literal>%></literal> operators. The threshold
+ must be between 0 and 1 (default is 0.6).
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</sect2>
On Fri, Jun 7, 2019 at 6:02 PM Ian Barwick <ian.barwick@2ndquadrant.com> wrote:
On 6/7/19 9:00 PM, Michael Paquier wrote:
On Fri, Jun 07, 2019 at 03:44:14PM +0900, Masahiko Sawada wrote:
Or is that not worth bothering except on HEAD? Thoughts?Personally I don't think it's that critical, but not bothered either way.
Presumably no-one has complained so far anyway (I only chanced upon the missing
GUC description because I was poking about looking for examples of custom
GUC handling...)
I think it worth maintaining consistent documentation and GUC
descriptions in back branches. So, I'm +1 for backpatching.
I'm going to commit all 3 patches (documentation, GUC description,
documentation indentation) on no objections.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
On Sat, Jun 8, 2019 at 8:17 PM Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
On Fri, Jun 7, 2019 at 6:02 PM Ian Barwick <ian.barwick@2ndquadrant.com> wrote:
On 6/7/19 9:00 PM, Michael Paquier wrote:
On Fri, Jun 07, 2019 at 03:44:14PM +0900, Masahiko Sawada wrote:
Or is that not worth bothering except on HEAD? Thoughts?Personally I don't think it's that critical, but not bothered either way.
Presumably no-one has complained so far anyway (I only chanced upon the missing
GUC description because I was poking about looking for examples of custom
GUC handling...)I think it worth maintaining consistent documentation and GUC
descriptions in back branches. So, I'm +1 for backpatching.I'm going to commit all 3 patches (documentation, GUC description,
documentation indentation) on no objections.
Pushed!
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
On 6/11/19 2:33 AM, Alexander Korotkov wrote:
On Sat, Jun 8, 2019 at 8:17 PM Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:On Fri, Jun 7, 2019 at 6:02 PM Ian Barwick <ian.barwick@2ndquadrant.com> wrote:
On 6/7/19 9:00 PM, Michael Paquier wrote:
On Fri, Jun 07, 2019 at 03:44:14PM +0900, Masahiko Sawada wrote:
Or is that not worth bothering except on HEAD? Thoughts?Personally I don't think it's that critical, but not bothered either way.
Presumably no-one has complained so far anyway (I only chanced upon the missing
GUC description because I was poking about looking for examples of custom
GUC handling...)I think it worth maintaining consistent documentation and GUC
descriptions in back branches. So, I'm +1 for backpatching.I'm going to commit all 3 patches (documentation, GUC description,
documentation indentation) on no objections.Pushed!
Thanks!
Regards
Ian Barwick
--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Em seg, 10 de jun de 2019 às 14:34, Alexander Korotkov
<a.korotkov@postgrespro.ru> escreveu:
Pushed!
Alexander, this commit is ok for 11 and so. However, GUC
strict_word_similarity_threshold does not exist in 9.6 and 10. The
attached patch revert this part. It should apply cleanly in 9.6 and
10.
--
Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
Attachments:
0001-Fix-pg_trgm-documentation.patchtext/x-patch; charset=US-ASCII; name=0001-Fix-pg_trgm-documentation.patchDownload
From 26f77930fa668c329694da43697361877dfb5ac0 Mon Sep 17 00:00:00 2001
From: Euler Taveira <euler@timbira.com.br>
Date: Thu, 12 Sep 2019 09:12:59 -0300
Subject: [PATCH] Fix pg_trgm documentation
Revert part of the commit 9ee98cc3f because it introduced a GUC
description that does not exist on this version.
---
doc/src/sgml/pgtrgm.sgml | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/doc/src/sgml/pgtrgm.sgml b/doc/src/sgml/pgtrgm.sgml
index 9f9482ef27..b8e0df6c03 100644
--- a/doc/src/sgml/pgtrgm.sgml
+++ b/doc/src/sgml/pgtrgm.sgml
@@ -263,23 +263,6 @@
</para>
</listitem>
</varlistentry>
- <varlistentry id="guc-pgtrgm-strict-word-similarity-threshold" xreflabel="pg_trgm.strict_word_similarity_threshold">
- <term>
- <varname>pg_trgm.strict_word_similarity_threshold</varname> (<type>real</type>)
- <indexterm>
- <primary>
- <varname>pg_trgm.strict_word_similarity_threshold</varname> configuration parameter
- </primary>
- </indexterm>
- </term>
- <listitem>
- <para>
- Sets the current strict word similarity threshold that is used by the
- <literal><<%</literal> and <literal>%>></literal> operators. The threshold
- must be between 0 and 1 (default is 0.5).
- </para>
- </listitem>
- </varlistentry>
</variablelist>
</sect2>
--
2.11.0
On Thu, Sep 12, 2019 at 3:39 PM Euler Taveira <euler@timbira.com.br> wrote:
Em seg, 10 de jun de 2019 às 14:34, Alexander Korotkov
<a.korotkov@postgrespro.ru> escreveu:Pushed!
Alexander, this commit is ok for 11 and so. However, GUC
strict_word_similarity_threshold does not exist in 9.6 and 10. The
attached patch revert this part. It should apply cleanly in 9.6 and
10.
Thank you for pointing this out.
Pushed.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company