Re: tsvector work with citext

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: tsvector work with citext
Дата
Msg-id 24291.1442464583@sss.pgh.pa.us
обсуждение исходный текст
Ответ на tsvector work with citext  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: tsvector work with citext  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> Is there a way to get tsvector_update_trigger() to work with citext
> columns?

Hmm ... tsvector_op.c has

/* Check if datatype is TEXT or binary-equivalent to it */
static bool
is_text_type(Oid typid)
{/* varchar(n) and char(n) are binary-compatible with text */if (typid == TEXTOID || typid == VARCHAROID || typid ==
BPCHAROID)   return true;/* Allow domains over these types, too */typid = getBaseType(typid);if (typid == TEXTOID ||
typid== VARCHAROID || typid == BPCHAROID)    return true;return false;
 
}

and a look at the caller says that "binary-equivalent to TEXT" is indeed
the requirement, because we want to apply DatumGetTextP() to the argument.

However, it does seem like this function is not implementing its
specification.  Why isn't it just "IsBinaryCoercible(typid, TEXTOID)"?
        regards, tom lane



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Improving test coverage of extensions with pg_dump