Re: querying within json
От | Tim Dudgeon |
---|---|
Тема | Re: querying within json |
Дата | |
Msg-id | 54528FDF.6070807@gmail.com обсуждение исходный текст |
Ответ на | Re: querying within json (David G Johnston <david.g.johnston@gmail.com>) |
Список | pgsql-sql |
On 30/10/2014 16:48, David G Johnston wrote: >>> CREATE INDEX idxgin_numeric_prop ON atable USING >>> gin((json_col->'numeric_prop')); >> I can add the index, but no evidence of it being used when I run a query >> like this: >> select * from atable where (json_col->>'numeric_prop')::numeric < 100; > The index is storing text while the expression has been cast to numeric so, > no, if what is shown above is exactly what you did then you would not be > using the index. So I tried to create the index to make it a numeric index using a cast (won't show the failed details) but failed. Any suggestions on how to do this? Tim > > > > > > -- > View this message in context: http://postgresql.1045698.n5.nabble.com/querying-within-json-tp5825042p5825055.html > Sent from the PostgreSQL - sql mailing list archive at Nabble.com. > >
В списке pgsql-sql по дате отправления: