pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Aleksander Alekseev <a.alekseev@postgrespro.ru>
To: Dmitry Ivanov <d.ivanov@postgrespro.ru>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Aleksandr Parfenov <a.parfenov@postgrespro.ru>
Cc: David Steele <david@pgmasters.net>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: new function for tsquery creartion
Date: Wed, 28 Mar 2018 12:21:15 +0300
Message-ID: <20180328092115.GA32581@e733.localdomain> (raw)
In-Reply-To: <9153fb21831d0ba7c832960f37df2688@postgrespro.ru>
References: <fe931111ff7e9ad79196486ada79e268@postgrespro.ru>
	<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>
	<a1686708fc7d43d9a2de19c1697ac57e@postgrespro.ru>
	<CAEepm=3dQmh7NCC_ap-L4yMiVRcZuPXtJUv5_mOnYdoqsnUKvg@mail.gmail.com>
	<6754a224654a4f0339195b83b133d551@postgrespro.ru>
	<9153fb21831d0ba7c832960f37df2688@postgrespro.ru>

Hello Dmitry,

> A few gotchas:
> 
> I haven't touched gettoken_tsvector() yet. As a result, the following
> queries produce errors:
> 
> select websearch_to_tsquery('simple', '''');
> ERROR:  syntax error in tsquery: "'"
> 
> select websearch_to_tsquery('simple', '\');
> ERROR:  there is no escaped character: "\"
> 
> 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.

-- 
Best regards,
Aleksander Alekseev

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (36+ messages)  latest in thread

Message-ID: <20180328092115.GA32581@e733.localdomain>
Permalink:  ../20180328092115.GA32581@e733.localdomain/
Also on:    postgresql.org/message-id/20180328092115.GA32581@e733.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: a.alekseev@postgrespro.ru, d.ivanov@postgrespro.ru, thomas.munro@enterprisedb.com, a.parfenov@postgrespro.ru, david@pgmasters.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: new function for tsquery creartion
  In-Reply-To: <20180328092115.GA32581@e733.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox