Re: Example not producing shown output - Mailing list pgsql-docs

From Alvaro Herrera
Subject Re: Example not producing shown output
Date
Msg-id 20191126182818.GC4161@alvherre.pgsql
Whole thread Raw
In response to Re: Example not producing shown output  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: Example not producing shown output
List pgsql-docs
On 2019-Nov-25, Daniel Gustafsson wrote:

> > On 25 Nov 2019, at 13:05, PG Doc comments form <noreply@postgresql.org> wrote:

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

Hmm.  I'm not sure that it's an improvement to make all the examples
alike; that means we would not provide examples of the simpler syntax.
And because other examples already show that it's possible to indicate
the language, I'm not sure it's strictly necessary to do so here.

Maybe this complaint could be addressed by indicating in a note that
some examples might not work identically if run under a different
locale.  Or perhaps we can add a second line in the example cell for the
@@ operator, to make it clear that both forms can be used.  Users can be
expected to apply some intuition from that point onwards.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-docs by date:

Previous
From: Jonathan Buhacoff
Date:
Subject: Re: legacy assumptions
Next
From: Daniel Gustafsson
Date:
Subject: Re: Example not producing shown output