On 30/10/2014 15:22, Giuseppe Broccolo wrote:
Needed to work, yes. But if my reading of the docs is right then numeric types within json as supposed to be treated as Postgres numeric type?
See table 8.23 here:
http://www.postgresql.org/docs/9.4/static/datatype-json.html So this would mean a cast from numeric to text and then back to numeric?
There is no way to ask for a json 'field' in its actual data type so avoiding the cast?
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;
Tim