Re: BUG #5797: Strange bug with hstore
От | Robert Haas |
---|---|
Тема | Re: BUG #5797: Strange bug with hstore |
Дата | |
Msg-id | AANLkTimy3s8jS2mXQ388_HudTxNYNpr-dfOa9+UfyZ6n@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #5797: Strange bug with hstore (Maxim Boguk <maxim.boguk@gmail.com>) |
Список | pgsql-bugs |
On Sun, Dec 26, 2010 at 12:29 AM, Maxim Boguk <maxim.boguk@gmail.com> wrote: > 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'; >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0QUERY PLAN >>> -----------------------------------------------------------------------= ----- >>> ------------------------ >>> =A0Seq Scan on domains =A0(cost=3D0.00..7775.91 rows=3D1 width=3D230) >>> =A0 =A0Filter: ((name)::text =3D (('"name"=3D>"somedomain"'::text)::hst= ore -> >>> '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. =A0This is fixed in 9.0. >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =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: > =A0ALTER 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? I think your proposed change is safe. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-bugs по дате отправления: