Re: BUG #5797: Strange bug with hstore

Поиск
Список
Период
Сортировка
От Maxim Boguk
Тема Re: BUG #5797: Strange bug with hstore
Дата
Msg-id AANLkTi=usxGXtuuR46XkFaeUpQFLSE1UvxCdVtbVZrq8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #5797: Strange bug with hstore  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #5797: Strange bug with hstore  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-bugs
On Tue, Dec 21, 2010 at 7:48 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Maxim Boguk" <Maxim.Boguk@gmail.com> writes:
>> Bad explain:
>> billing=3D# EXPLAIN SELECT * from domains where
>> name=3D'"name"=3D>"somedomain"'::text::hstore->'name';
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0QUERY PLAN
>> ------------------------------------------------------------------------=
----
>> ------------------------
>> =C2=A0Seq Scan on domains =C2=A0(cost=3D0.00..7775.91 rows=3D1 width=3D2=
30)
>> =C2=A0 =C2=A0Filter: ((name)::text =3D (('"name"=3D>"somedomain"'::text)=
::hstore ->
>> 'name'::text))
>> (index not used)
>
> The reason for this is that hstore fails to label its I/O functions as
> immutable (or even stable) in 8.4. =C2=A0This is fixed in 9.0.
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0regards, tom lane
>

Sorry for late responce and thank you for clarification.

My research of that problem leads me to conclusion that can be fixed
on 8.4.4 with:
 ALTER FUNCTION hstore_in(cstring) IMMUTABLE;
but is it really safe?
Or text->hstore conversion in 8.4 is really VOLATILE as labeled in
hstrore module?

Regards, Maxim

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: BUG #5781: unaccent() function should be marked IMMUTABLE
Следующее
От: Eric Schwarzenbach
Дата:
Сообщение: IN clause on BYTEA column works against table directly but gives error against view