Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

2019-09-12 Thread Alexander Korotkov
On Thu, Sep 12, 2019 at 3:39 PM Euler Taveira  wrote:
> Em seg, 10 de jun de 2019 às 14:34, Alexander Korotkov
>  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




Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

2019-09-12 Thread Euler Taveira
Em seg, 10 de jun de 2019 às 14:34, Alexander Korotkov
 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
From 26f77930fa668c329694da43697361877dfb5ac0 Mon Sep 17 00:00:00 2001
From: Euler Taveira 
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 @@
  
 

-   
-
- pg_trgm.strict_word_similarity_threshold (real)
- 
-  
-   pg_trgm.strict_word_similarity_threshold configuration parameter
-  
- 
-
-
- 
-  Sets the current strict word similarity threshold that is used by the
-  % and % operators.  The threshold
-  must be between 0 and 1 (default is 0.5).
- 
-
-   
   
  
 
-- 
2.11.0



Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

2019-06-10 Thread Ian Barwick

On 6/11/19 2:33 AM, Alexander Korotkov wrote:

On Sat, Jun 8, 2019 at 8:17 PM Alexander Korotkov
 wrote:

On Fri, Jun 7, 2019 at 6:02 PM Ian Barwick  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




Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

2019-06-10 Thread Alexander Korotkov
On Sat, Jun 8, 2019 at 8:17 PM Alexander Korotkov
 wrote:
> On Fri, Jun 7, 2019 at 6:02 PM Ian Barwick  
> 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




Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

2019-06-08 Thread Alexander Korotkov
On Fri, Jun 7, 2019 at 6:02 PM Ian Barwick  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




Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

2019-06-07 Thread Ian Barwick

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
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 @@
  
 

-
- 
-  pg_trgm.word_similarity_threshold (real)
-  
-   
-pg_trgm.word_similarity_threshold configuration parameter
-   
-  
- 
- 
-  
-   Sets the current word similarity threshold that is used by
-   % and % operators.  The threshold
-   must be between 0 and 1 (default is 0.6).
-  
- 
-
+   
+
+ pg_trgm.word_similarity_threshold (real)
+ 
+  
+   pg_trgm.word_similarity_threshold configuration parameter
+  
+ 
+
+
+ 
+  Sets the current word similarity threshold that is used by
+  % and % operators.  The threshold
+  must be between 0 and 1 (default is 0.6).
+ 
+
+   
   
  
 


Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

2019-06-07 Thread Michael Paquier
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


signature.asc
Description: PGP signature


Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

2019-06-07 Thread Masahiko Sawada
On Thu, Jun 6, 2019 at 10:19 PM Ian Barwick  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




doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

2019-06-06 Thread Ian Barwick

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
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 @@
   
  
 
+   
+
+ pg_trgm.strict_word_similarity_threshold (real)
+ 
+  pg_trgm.strict_word_similarity_threshold configuration parameter
+ 
+
+
+ 
+  Sets the current strict word similarity threshold that is used by the %
+  and % operators.  The threshold must be between 0 and 1 (default is 0.5).
+ 
+
+