Skip to content

Rewrite json_array_elements to json_to_recordset - #3204

Open
benjie wants to merge 13 commits into
nextfrom
json_to_recordset
Open

benjie wants to merge 13 commits into
nextfrom
json_to_recordset

Conversation

@benjie

@benjie benjie commented Oct 9, 2026

Copy link
Copy Markdown
Member

It's a bit cleaner to have Postgres do the casting for us internally rather than us using ->> to extract elements, and then casting them ourselves.

Annoyingly it did require special handling for json/jsonb because json_to_recordset checks if the target is json and if so it just hands the value through unmodified, but we (normally) encode all values to Postgres' textual representation. So now we do PG text for everything except JSON-y stuff.

@changeset-bot

changeset-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8e7b6c7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
postgraphile Patch
@dataplan/pg Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benjie
benjie enabled auto-merge October 9, 2026 16:31

This branch has not been deployed

No deployments
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