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 1iZfZc-0002Kj-I1 for pgsql-docs@arkaria.postgresql.org; Tue, 26 Nov 2019 18:28:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iZfZb-0004DH-8M for pgsql-docs@arkaria.postgresql.org; Tue, 26 Nov 2019 18:28:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZfZb-0004DA-1N for pgsql-docs@lists.postgresql.org; Tue, 26 Nov 2019 18:28:27 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZfZY-0001B5-D8 for pgsql-docs@lists.postgresql.org; Tue, 26 Nov 2019 18:28:26 +0000 Received: by mail-qt1-x842.google.com with SMTP id 59so16949551qtg.8 for ; Tue, 26 Nov 2019 10:28:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=E8tFiAGj3yt0gZAWXceiH2xTRzlmzofefOaIocfrSjg=; b=qytCMRR/Z54o2JK7aKqIBmC7/oePsAZlO+IzTEoPCSQpadw/5aZXvwon9msMyP8dwO btGcT3zB6Gid/p+uRSj/RSOMry23XtrbeBhZYO0Go5vBFwHal68IN1XYAU8J05RkhZDB 72c0W4fYrKV6iJoMYpP1KgCSkayHlmuJabxkGJAai47HSpFFc82oBs3sXa/egf1/BW8U nsuzQCCHvz7EwlY8WhC8JYtnpO7T32DyujL7FuguYrVVD6arVyyqGIgaz+nUQN6+tdAN qGPTo70lGfwoDT6R8so6eqAf0YtmhUB5Dc4qoWHKpc9p2Kxs+NOfQBFcEXu3CBsFJKz7 u2QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=E8tFiAGj3yt0gZAWXceiH2xTRzlmzofefOaIocfrSjg=; b=A/0nat+4KjGnKQlrPkvj0MskYhZ4/+7YdgGDvdmpVC1AHIEJpRI1XV3j+pW+0wXUYH vK7MHfS+UVFb8TJeR5/kZPc2IB+4OkpWhz22RTaYsmOuPY9n9COgr8PriGtA5eJvoAqt 3McCrgb0ZtFprWN0lqcOG9V6pETz0lSvTOtYX/SowLYK0AKNFYMK+AiXReq3VEXD/gjD t6Of/qkmywLXQlDi4BswJ9k+D0SlJrQobX6L7y2DXSO5vFdeQgq2/cMdwY33V8URDxVm SOVp3FV0Di8Q2yME46DwRbjbeOmHvTQqozwglpTLBAUIGczO0kFzGmOyzdLGZzMCDiY0 oX3Q== X-Gm-Message-State: APjAAAWBsf3TxtIQsnQyUjUTGhm/lioRBG8sGRdeku/5DSCiFdpUgHC9 wZpdAx14tZMXwoEiLpkH8HGO7Q== X-Google-Smtp-Source: APXvYqycT6upcnmLTL+cZVRYXC0SvKRYTTXIoPyffquBFc32+rw+EcJPrCvKseg8EokN4+N2QLiJjw== X-Received: by 2002:ac8:6919:: with SMTP id e25mr36484393qtr.199.1574792902680; Tue, 26 Nov 2019 10:28:22 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id m186sm5593525qkc.39.2019.11.26.10.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 10:28:22 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 7EC6A300A50; Tue, 26 Nov 2019 15:28:18 -0300 (-03) Date: Tue, 26 Nov 2019 15:28:18 -0300 From: Alvaro Herrera To: Daniel Gustafsson Cc: miodrag.milic@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Example not producing shown output Message-ID: <20191126182818.GC4161@alvherre.pgsql> References: <157468351705.7229.6629196528495737297@wrigleys.postgresql.org> <21BF1412-3E64-4F10-8F8E-74AD0EC3AAC3@yesql.se> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <21BF1412-3E64-4F10-8F8E-74AD0EC3AAC3@yesql.se> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Nov-25, Daniel Gustafsson wrote: > > On 25 Nov 2019, at 13:05, PG Doc comments form 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