Re: Example not producing shown output

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: miodrag(dot)milic(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Example not producing shown output
Date: 2019-11-25 14:23:42
Message-ID: 21BF1412-3E64-4F10-8F8E-74AD0EC3AAC3@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

> On 25 Nov 2019, at 13:05, PG Doc comments form <noreply(at)postgresql(dot)org> wrote:
>
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/12/functions-textsearch.html
> Description:
>
> Page: https://www.postgresql.org/docs/12/functions-textsearch.html
>
> Examples should have specified 'english'.
>
> Instead:
> to_tsvector('fat cats ate rats') @@ to_tsquery('cat & rat')
>
> which returns fale on my own blank installation of Postgre (Serbian locale
> Windows OS) instead of true:
> to_tsvector('english', 'fat cats ate rats') @@ to_tsquery('cat & rat')

I agree with this complaint, mainly since other examples on the page do specify
english where required AFAICT, this makes it consistent. The attached diff
adds the english configuration directive to @@ and @@@.

The examples on chapter 12.1 all have the same issue, but adding 'english' to
all of them in order to make them work out of the box everywhere doesn't seem
like an improvement to the docs so those are left as is.

cheers ./daniel

Attachment Content-Type Size
textsearch_english.diff application/octet-stream 1.2 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2019-11-25 15:16:59 Re: Add <caution> for ALTER TEXT SEARCH CONFIGURATION
Previous Message Euler Taveira 2019-11-25 13:51:23 Re: Add <caution> for ALTER TEXT SEARCH CONFIGURATION