"David E. Wheeler" <da...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers