On Tue, Dec 21, 2010 at 7:48 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> "Maxim Boguk" <maxim.bo...@gmail.com> writes:
>> Bad explain:
>> billing=# EXPLAIN SELECT * from domains where
>> name='"name"=>"somedomain"'::text::hstore->'name';
>>                                              QUERY PLAN
>> ----------------------------------------------------------------------------
>> ------------------------
>>  Seq Scan on domains  (cost=0.00..7775.91 rows=1 width=230)
>>    Filter: ((name)::text = (('"name"=>"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.  This is fixed in 9.0.
>
>                        regards, 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

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to