Re: SQL:2023 JSON simplified accessor support

From: Alexandra Wang <alexandra(dot)wang(dot)oss(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Nikita Glukhov <glukhov(dot)n(dot)a(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, "David E(dot) Wheeler" <david(at)justatheory(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, matheusssilv97(at)gmail(dot)com
Subject: Re: SQL:2023 JSON simplified accessor support
Date: 2025-02-27 15:46:48
Message-ID: CAK98qZ0EfrPcv3ZwGdeDiLPEpXYfHOEc8S2D=OCPJGcyWy5d-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello hackers,

I’ve fixed the compilation failure for hstore and updated the patches.
In this version, I’ve further cleaned up the code and added more
comments. I hope this helps!

Summary of changes:

v8-0001 through v8-0005:
Refactoring and preparatory steps for the actual implementation.

v8-0006 (Implement read-only dot notation for JSONB):
I removed the vars field (introduced in v7) from JsonbSubWorkspace
after realizing that JsonPathVariable is not actually needed for
dot-notation.

v8-0007 (Allow wildcard member access for JSONB):
I'm aware that the #if 0 in check_indirection() is not ideal. I
haven’t removed it yet because I’m still reviewing other cases—beyond
our JSONB simplified accessor use case—where this check should remain
strict. I’ll post an additional patch to address this.

Looking forward to comments and feedback!

Thanks,
Alex

Attachment Content-Type Size
v8-0002-Pass-field-accessors-to-generic-subscripting.patch application/octet-stream 9.8 KB
v8-0004-Extract-coerce_jsonpath_subscript.patch application/octet-stream 5.4 KB
v8-0001-Allow-transformation-only-of-a-sublist-of-subscri.patch application/octet-stream 8.3 KB
v8-0005-Eanble-String-node-as-field-accessors-in-generic-.patch application/octet-stream 7.5 KB
v8-0006-Implement-read-only-dot-notation-for-jsonb.patch application/octet-stream 26.1 KB
v8-0003-Export-jsonPathFromParseResult.patch application/octet-stream 2.4 KB
v8-0007-Allow-wild-card-member-access-for-jsonb.patch application/octet-stream 18.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-02-27 16:00:22 Re: pgbench client-side performance issue on large scripts
Previous Message Bertrand Drouvot 2025-02-27 15:42:45 Re: Draft for basic NUMA observability