Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZFHb-0006L3-3B for pgsql-docs@arkaria.postgresql.org; Mon, 25 Nov 2019 14:24:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iZFHX-0008Do-4G for pgsql-docs@arkaria.postgresql.org; Mon, 25 Nov 2019 14:24:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZFHW-0008Db-LC for pgsql-docs@lists.postgresql.org; Mon, 25 Nov 2019 14:24:02 +0000 Received: from smtp2.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iZFHO-0007dO-4Q for pgsql-docs@lists.postgresql.org; Mon, 25 Nov 2019 14:24:01 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 9A19F2E4C741 for ; Mon, 25 Nov 2019 15:23:43 +0100 (CET) Received: from s498.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 7B9B22E27F73; Mon, 25 Nov 2019 15:23:43 +0100 (CET) Received: from s472.loopia.se (unknown [172.22.191.5]) by s498.loopia.se (Postfix) with ESMTP id 7315E4707E9; Mon, 25 Nov 2019 15:23:43 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s498.loopia.se ([172.22.191.6]) by s472.loopia.se (s472.loopia.se [172.22.190.12]) (amavisd-new, port 10024) with UTF8LMTP id PzhEuPO4InK2; Mon, 25 Nov 2019 15:23:42 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from [192.168.72.43] (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s498.loopia.se (Postfix) with ESMTPSA id D60BE4707EA; Mon, 25 Nov 2019 15:23:42 +0100 (CET) From: Daniel Gustafsson Content-Type: multipart/mixed; boundary="Apple-Mail=_FA043A98-2D0A-4D07-9007-AEE178CDB637" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Example not producing shown output Date: Mon, 25 Nov 2019 15:23:42 +0100 References: <157468351705.7229.6629196528495737297@wrigleys.postgresql.org> To: miodrag.milic@gmail.com, pgsql-docs@lists.postgresql.org In-Reply-To: <157468351705.7229.6629196528495737297@wrigleys.postgresql.org> Message-Id: <21BF1412-3E64-4F10-8F8E-74AD0EC3AAC3@yesql.se> X-Mailer: Apple Mail (2.3445.104.11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_FA043A98-2D0A-4D07-9007-AEE178CDB637 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 25 Nov 2019, at 13:05, PG Doc comments form = wrote: >=20 > The following documentation comment has been logged on the website: >=20 > Page: https://www.postgresql.org/docs/12/functions-textsearch.html > Description: >=20 > Page: https://www.postgresql.org/docs/12/functions-textsearch.html >=20 > Examples should have specified 'english'. >=20 > Instead: > to_tsvector('fat cats ate rats') @@ to_tsquery('cat & rat') >=20 > 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 --Apple-Mail=_FA043A98-2D0A-4D07-9007-AEE178CDB637 Content-Disposition: attachment; filename=textsearch_english.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="textsearch_english.diff" Content-Transfer-Encoding: 7bit diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 57a1539506..cc29d2ed47 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -9889,14 +9889,14 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple @@ boolean tsvector matches tsquery ? - to_tsvector('fat cats ate rats') @@ to_tsquery('cat & rat') + to_tsvector('english', 'fat cats ate rats') @@ to_tsquery('english', 'cat & rat') t @@@ boolean deprecated synonym for @@ - to_tsvector('fat cats ate rats') @@@ to_tsquery('cat & rat') + to_tsvector('english', 'fat cats ate rats') @@@ to_tsquery('english', 'cat & rat') t --Apple-Mail=_FA043A98-2D0A-4D07-9007-AEE178CDB637 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_FA043A98-2D0A-4D07-9007-AEE178CDB637--