Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f17Gj-0000uf-Kj for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Mar 2018 09:21:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f17Gi-0001U8-Ee for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Mar 2018 09:21:20 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1f17Gi-0001Tz-12 for pgsql-hackers@lists.postgresql.org; Wed, 28 Mar 2018 09:21:20 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f17Gf-0007hD-Ay for pgsql-hackers@lists.postgresql.org; Wed, 28 Mar 2018 09:21:19 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id F160421C280B; Wed, 28 Mar 2018 12:21:15 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from localhost (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id B9F4821C2806; Wed, 28 Mar 2018 12:21:15 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1522228875; bh=mR0a9A6yqCjWn7p4mxi8AcwqQtL2pgY1K3BoPtGALDA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=p5z1Uo8vdSvEG8TPVRL9V0/HilvcGVx9vbn7S9codnmMhqp4PWx75Ke0FvXofuI+d Zi06ITCxdcrZ1jx18MjdfXlUtEIRni11ILdnpW30pQroMMKBWGNNt+bcAujM8LKFLh PMoIUcfNWlbnpAHrL6H031bht0zbBiVAawmbDNEc= Date: Wed, 28 Mar 2018 12:21:15 +0300 From: Aleksander Alekseev To: Dmitry Ivanov Cc: Thomas Munro , Aleksandr Parfenov , David Steele , PostgreSQL Hackers Subject: Re: new function for tsquery creartion Message-ID: <20180328092115.GA32581@e733.localdomain> References: <20180302030605.5ur6ktkb2vyb46pb@alap3.anarazel.de> <152025433949.1548.16466871234054596674.pgcf@coridan.postgresql.org> <34280367-0dab-7f73-8d7c-d21c7276814b@pgmasters.net> <8df9de83119eb295f3424c573d64ff84@postgrespro.ru> <20180326092405.71820cf2@asp437-24-g082ur> <6754a224654a4f0339195b83b133d551@postgrespro.ru> <9153fb21831d0ba7c832960f37df2688@postgrespro.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <9153fb21831d0ba7c832960f37df2688@postgrespro.ru> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Dmitry, > A few gotchas: >=20 > I haven't touched gettoken_tsvector() yet. As a result, the following > queries produce errors: >=20 > select websearch_to_tsquery('simple', ''''); > ERROR: syntax error in tsquery: "'" >=20 > select websearch_to_tsquery('simple', '\'); > ERROR: there is no escaped character: "\" >=20 > Maybe there's more. The question is: should we fix those, or it's fine as= it > is? I don't have a strong opinion about this. It doesn't sound right to me to accept any input as a general rule but sometimes return errors nevertheless. That API would be complicated for the users. Thus I suggest to accept any garbage and try our best to interpret it. --=20 Best regards, Aleksander Alekseev --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEECAokn0QZCoIHW4GpEEnCBLXCDtYFAlq7XogACgkQEEnCBLXC Dtb78g//TtrNIlm57n9odWuJ74llEQpUp7QYfn4K9ppWVT4ocdyygYhRu/vHZDCS BgkbFPCJh8T0sQ4Gw4F5B1LflZcUZxwgHsrMphtM4SWmS+jIFngzUPTsqyLFqkBW eXaJX+sxhzsyM9S9B4zIfPopMIbThtH5PEy8DjEBo1DnMmym6OzsBwQwuv6v0rmU JwOWCm9yHmsI45wx4QLy9oDcGVw1hIReJIZHdb1HiOTsygA+FHaY+H1k3Q/8umDE W8saFIM4TXT9d7sq9ANl+kuUNzk+e2wp/045PcLrjvs/qaPTADc9NuobMZgYgjzx Y3TYuXEJabYlqBj/bGaqOjNjPeK2weR3IUIJD0RwN2RBtyqGUrGC8w58GshrCsxH bDq/rDaMCLGNkb/uE2Ywul/EbXJKm2uB30E4vN3CdSqMRmMQDgeMTiyWmbgunc2g /CDvOXahbPijfgGCxBz6XJFWvhu+FNXChHxVi8wvPMZOD8zmF735vJZYa1oOyEGa XA0J8CrtvLmO41wf3EtZMuEoaeVyX/xFGNhHotNYgY/oB8xUW8Bw7xScRixF32K5 bD1MRXfXudwfTZRX99E+Vh2d9vcysH9A/EzTyEBu1vgkEF3d4lB2PTEI8rOAu0F7 0yQz6Db5YTxYYsUuV80v5I55+bn0dSxVgIORSFadFeywe8HmDiw= =fHkp -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR--