Skip to content

Add PostgreSQL JSON operators to the AST compiler - #778

Open
josetduarte wants to merge 5 commits into
web2py:masterfrom
josetduarte:feat/postgres-json-compiler
Open

josetduarte wants to merge 5 commits into
web2py:masterfrom
josetduarte:feat/postgres-json-compiler

Conversation

@josetduarte

@josetduarte josetduarte commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds PostgreSQL AST compiler handlers for the five existing JSON operations: ->, ->>, #>, #>>, and @>.
  • Preserves the public JSON API and generic PostgreSQL/JDBC inline defaults while using typed operands and psycopg parameter binding where enabled.
  • Supports string and integer keys, PostgreSQL text-array path lists including empty paths, chained accessors/containment, and distinct JSON-null and SQL-NULL behavior.
  • Keeps serialized containment documents from being double-encoded and preserves parameter order and escaping.

Validation

Focused standalone JSON/compiler coverage and PostgreSQL JSON/TestJSON selectors passed. The composed CTE + JSON + Geo scope passed 27/27.

Related work

Follow-up to #774. The separately targeted recursive CTE fixture correction is tracked in #777 and is intentionally kept outside this independent JSON PR.

josetduarte and others added 5 commits September 15, 2026 12:09
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@josetduarte
josetduarte marked this pull request as ready for review September 15, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant