Will there be a JSON operator like ->> but returning numeric? - Mailing list pgsql-general

From Seamus Abshere
Subject Will there be a JSON operator like ->> but returning numeric?
Date
Msg-id 5421981F.8030204@abshere.net
Whole thread Raw
Responses Re: Will there be a JSON operator like ->> but returning numeric?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
hi,

I've got use cases like

> array_remove(array_agg((a->>'b')::float), NULL)

It would be nice to replace (a->>'b')::float with something like

> a->^'b'

that directly returned a numeric... is that in the cards?

Thanks,
Seamus


--
Seamus Abshere, SCEA
https://github.com/seamusabshere


pgsql-general by date:

Previous
From: Seamus Abshere
Date:
Subject: Unexpected syntax error when using JSON -> in 9.3.5
Next
From: Daniel Lenski
Date:
Subject: Re: Where art thou, plpython2.dll? (EDB installer)