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

Started by Ian Lawrence Barwickalmost 7 years ago9 messageshackers
Jump to latest
#1Ian Lawrence Barwick
barwick@gmail.com

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+14-0
#2Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Ian Lawrence Barwick (#1)
Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

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

#3Michael Paquier
michael@paquier.xyz
In reply to: Masahiko Sawada (#2)
Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

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

#4Ian Lawrence Barwick
barwick@gmail.com
In reply to: Michael Paquier (#3)
Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

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+17-17
#5Alexander Korotkov
aekorotkov@gmail.com
In reply to: Ian Lawrence Barwick (#4)
Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

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

#6Alexander Korotkov
aekorotkov@gmail.com
In reply to: Alexander Korotkov (#5)
Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

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

#7Ian Lawrence Barwick
barwick@gmail.com
In reply to: Alexander Korotkov (#6)
Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

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

In reply to: Alexander Korotkov (#6)
Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

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+0-18
#9Alexander Korotkov
aekorotkov@gmail.com
In reply to: Euler Taveira de Oliveira (#8)
Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

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