ltree::text not immutable?

Поиск
Список
Период
Сортировка
От Joe Van Dyk
Тема ltree::text not immutable?
Дата
Msg-id CACfv+pL2oX08SSZSoaHpyC=UbfTFmPt4UmVEKJTH7y=2QMRCBw@mail.gmail.com
обсуждение исходный текст
Ответы Re: ltree::text not immutable?
Список pgsql-bugs
create table t1 (json json);
create index on t1 using btree((json::text));
-- Above works as expected

create extension ltree;
create table t2 (ltree ltree);
create index on t2 using btree((ltree::text));
psql:/tmp/t.sql:8: ERROR:  functions in index expression must be marked
IMMUTABLE

What I'm trying to do is quickly grab the root category from an categories
ltree.

Doing something like
  where root_categories.id = subtree(ltree, 0, 1)
and was trying to make some indexes to make this go faster.

Seems like casting ltree to text and the subtree function should be
immutable?

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

Предыдущее
От: keyurgovande@gmail.com
Дата:
Сообщение: BUG #11767: ODBC driver bug when fetching constant string columns
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #11771: wrong behaviour of planner when pushing conditions