Poorly named support routines for GIN tsearch index opclasses

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Poorly named support routines for GIN tsearch index opclasses
Дата
Msg-id 12431.1196201871@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Poorly named support routines for GIN tsearch index opclasses  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
I've just noticed that tsearch includes a couple of support functions
with rather vague names:gin_extract_query(internal,internal,smallint)gin_ts_consistent(internal,smallint,internal)
These are, in fact, specialized to the case of operating on tsquery
inputs, but you'd never guess that from either the name or the
declared argument types.  The first one seems particularly likely
to conflict with other peoples' GIN opclasses, down the road sometime.

Since we've already forced initdb for the next beta, it would be "free"
to rename these things now.  I don't believe this would cause any
compatibility problems for applications, since SQL queries never call
these things directly.  I'm thinking "gin_extract_tsquery" and
"gin_tsquery_consistent" would be suitable names.

Another possibility would be to change the declared signatures to show
"tsquery" rather than "internal" at the places where a tsquery argument
is expected.  I'm less excited about that part though.

Comments, objections?
        regards, tom lane


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

Предыдущее
От: "Brendan Jurd"
Дата:
Сообщение: Re: [GENERAL] Empty arrays with ARRAY[]
Следующее
От: Tom Lane
Дата:
Сообщение: Still a NOTICE in dict_thesaurus.c