Re: Naming of new tsvector functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Naming of new tsvector functions
Дата
Msg-id 10331.1462477476@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Naming of new tsvector functions  (Stas Kelvich <s.kelvich@postgrespro.ru>)
Ответы Re: Naming of new tsvector functions  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Список pgsql-hackers
Stas Kelvich <s.kelvich@postgrespro.ru> writes:
>> On 04 May 2016, at 20:15, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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.

Yeah, I see we're already a bit inconsistent here.  The problem with using
a ts_ prefix, to my mind, is that it offers no option for distinguishing
tsvector from tsquery, should you need to do that.  Maybe this isn't a
problem for functions that have tsvector as input.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: atomic pin/unpin causing errors
Следующее
От: Tom Lane
Дата:
Сообщение: Re: quickdie doing memory allocations (was atomic pin/unpin causing errors)