Обсуждение: doc: pg_trgm missing description for GUC"pg_trgm.strict_word_similarity_threshold"

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

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

От
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

Вложения

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

От
Masahiko Sawada
Дата:
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



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

От
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

Вложения

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

От
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

Вложения

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

От
Alexander Korotkov
Дата:
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



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

От
Alexander Korotkov
Дата:
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



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

От
Ian Barwick
Дата:
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



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

От
Euler Taveira
Дата:
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

Вложения

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

От
Alexander Korotkov
Дата:
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