Re: Extract numeric filed in JSONB more effectively

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Andy Fan <zhihui.fan1213@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, jian he <jian.universality@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-08-14T12:54:22Z
Lists: pgsql-hackers
po 14. 8. 2023 v 11:17 odesílatel Andy Fan <zhihui.fan1213@gmail.com>
napsal:

>
>> you cannot to use type as parameter. There should be some typed value -
>> like
>>
>> jsonb_object_field, '{"a":10}', 'a', NULL::int)
>>
>> and return type should be anyelement.
>>
>>
> So could we get the inputted type in the body of jsonb_object_field?
> I guess no.  IIUC, our goal will still be missed in this way.
>

why not? You can easily build null constant of any type.

>
> --
> Best Regards
> Andy Fan
>

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add trailing commas to enum definitions