I\'m trying the following query:
SELECT (json_data->\'position\'->\'lat\') + 1.0 AS lat FROM updates LIMIT 5;
(The +1.0 is just there
When creating a view I used CAST:
create view mydb.myview as
select id,
config->>'version' as version,
config->>'state' as state,
config->>'name' as name,
config->>'internal-name' as internal_name,
config->>'namespace' as namespace,
create_date,
update_date,
CAST(config ->> 'version' as double precision) as version_number
from mydb.mytbl;