Re: Extract numeric filed in JSONB more effectively

Chapman Flack <chap@anastigmatix.net>

From: Chapman Flack <chap@anastigmatix.net>
To: Andy Fan <zhihui.fan1213@gmail.com>
Cc: jian he <jian.universality@gmail.com>, Pavel Stehule <pavel.stehule@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-08-22T12:16:02Z
Lists: pgsql-hackers
On 2023-08-22 01:54, Andy Fan wrote:
> After we label it, we will get error like this:
> 
> select (a->'a')::int4 from m;
> ERROR:  cannot display a value of type internal

Without looking in depth right now, I would double-check
what relabel node is being applied at the result. The idea,
of course, was to relabel the result as the expected result
type, not internal.

(Or, as in the restructuring suggested earlier, to use a
finish function whose return type is already as expected,
and needs no relabeling.)

Regards,
-Chap



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