On Tue, 1 Aug 2023 at 06:39, Andy Fan <zhihui.fan1213@gmail.com> wrote: > > Hi: > > Currently if we want to extract a numeric field in jsonb, we need to use > the following expression: cast (a->>'a' as numeric). It will turn a numeric > to text first and then turn the text to numeric again.
Why wouldn't you use cast(a->'a' as numeric), or ((a->'a')::numeric)?
Thanks for this information! I didn't realize we have this function