Re: Extract numeric [field] in JSONB more effectively

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extract numeric [field] in JSONB more effectively
Date: 2023-08-08 20:30:10
Message-ID: 980c525223e2746c3635f9b68a95356e@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Looking at the most recent patch, so far I have a minor
spelling point, and a question (which I have not personally
explored).

The minor spelling point, the word 'field' has been spelled
'filed' throughout this comment (just as in the email subject):

+ /*
+ * Simplify cast(jsonb_object_filed(jsonb, filedName) as type)
+ * to jsonb_object_field_type(jsonb, filedName, targetTypeOid);
+ */

The question: the simplification is currently being applied
when the underlying operation uses F_JSONB_OBJECT_FIELD.
Are there opportunities for a similar benefit if applied
over F_JSONB_ARRAY_ELEMENT and/or F_JSONB_EXTRACT_PATH?

Regards,
-Chap

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-08-08 20:44:37 Re: Configurable FP_LOCK_SLOTS_PER_BACKEND
Previous Message Tomas Vondra 2023-08-08 20:24:21 Re: Use of additional index columns in rows filtering