From: Stas Kelvich <s.kelvich@postgrespro.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Fetter <david@fetter.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Naming of new tsvector functions
Date: Thu, 5 May 2016 12:20:02 +0300
Message-ID: <EF75DFB4-29A7-49D9-8BE0-40B4068BDB84@postgrespro.ru> (raw)
In-Reply-To: <12735.1462382108@sss.pgh.pa.us>
References: <4875.1462210058@sss.pgh.pa.us>
<6106.1462211891@sss.pgh.pa.us>
<20160502215907.GA1882@fetter.org>
<D91383B7-1CCA-4FE1-8570-C6275C202CC0@postgrespro.ru>
<4328.1462370302@sss.pgh.pa.us>
<2AF3687B-2B6B-415C-978E-0991EFE9718B@postgrespro.ru>
<12735.1462382108@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
> On 04 May 2016, at 20:15, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Stas Kelvich <s.kelvich@postgrespro.ru> writes:
>>> On 04 May 2016, at 16:58, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> The other ones are not so problematic because they do not conflict with
>>> SQL keywords. It's only delete() and filter() that scare me.
>
>> Okay, so changed functions to ts_setweight, ts_delete, ts_unnest, ts_filter.
>
> Somehow, I don't think you read what I wrote.
>
> Renaming the pre-existing setweight() function to ts_setweight() is
> not going to happen; it's been like that for half a dozen years now.
> It would make no sense to call the new variant ts_setweight() while
> keeping setweight() for the existing function, either.
Oh, I accidentally renamed one of the old functions, my mistake.
> I also don't see that much point in ts_unnest(), since unnest()
> in our implementation is a function not a keyword. I don't have
> a strong opinion about that one, though.
Just to keep some level of uniformity in function names. But also i’m
not insisting.
> Also, I'd supposed that we'd rename to tsvector_something, since
> the same patch also introduced tsvector_to_array() and
> array_to_tsvector(). What's the motivation for using ts_ as the
> prefix?
There is already several functions named ts_* (ts_rank, ts_headline, ts_rewrite)
and two named starting from tsvector_* (tsvector_update_trigger, tsvector_update_trigger_column).
Personally I’d prefer ts_ over tsvector_ since it is shorter, and still keeps semantics.
>
> regards, tom lane
--
Stas Kelvich
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: s.kelvich@postgrespro.ru, tgl@sss.pgh.pa.us, david@fetter.org
Subject: Re: Naming of new tsvector functions
In-Reply-To: <EF75DFB4-29A7-49D9-8BE0-40B4068BDB84@postgrespro.ru>
References: <4875.1462210058@sss.pgh.pa.us> <6106.1462211891@sss.pgh.pa.us> <20160502215907.GA1882@fetter.org> <D91383B7-1CCA-4FE1-8570-C6275C202CC0@postgrespro.ru> <4328.1462370302@sss.pgh.pa.us> <2AF3687B-2B6B-415C-978E-0991EFE9718B@postgrespro.ru> <12735.1462382108@sss.pgh.pa.us> <EF75DFB4-29A7-49D9-8BE0-40B4068BDB84@postgrespro.ru>
* 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