Re: SQL:2023 JSON simplified accessor support
Alexandra Wang <alexandra.wang.oss@gmail.com>
From: Alexandra Wang <alexandra.wang.oss@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Andrew Dunstan <andrew@dunslane.net>,
Nikita Glukhov <glukhov.n.a@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
"David E. Wheeler" <david@justatheory.com>, jian he <jian.universality@gmail.com>, matheusssilv97@gmail.com
Date: 2025-02-27T15:46:48Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add test coverage for indirection transformation
- 64492917280a 19 (unreleased) landed
-
Fix typo in comment
- 81a61fde84ff 19 (unreleased) landed
-
Implementation of subscripting for jsonb
- 676887a3b0b8 14.0 cited
Attachments
- v8-0002-Pass-field-accessors-to-generic-subscripting.patch (application/octet-stream) patch v8-0002
- v8-0004-Extract-coerce_jsonpath_subscript.patch (application/octet-stream) patch v8-0004
- v8-0001-Allow-transformation-only-of-a-sublist-of-subscri.patch (application/octet-stream) patch v8-0001
- v8-0005-Eanble-String-node-as-field-accessors-in-generic-.patch (application/octet-stream) patch v8-0005
- v8-0006-Implement-read-only-dot-notation-for-jsonb.patch (application/octet-stream) patch v8-0006
- v8-0003-Export-jsonPathFromParseResult.patch (application/octet-stream) patch v8-0003
- v8-0007-Allow-wild-card-member-access-for-jsonb.patch (application/octet-stream) patch v8-0007
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