Skip to content

fix(pg): resolve scalar function aliases as values#137

Merged
rebelice merged 1 commit into
mainfrom
codex/pg-range-function-alias-jsonb
May 13, 2026
Merged

fix(pg): resolve scalar function aliases as values#137
rebelice merged 1 commit into
mainfrom
codex/pg-range-function-alias-jsonb

Conversation

@rebelice
Copy link
Copy Markdown
Collaborator

Summary

  • Match PostgreSQL whole-row resolution for scalar RTE_FUNCTION aliases after normal column lookup fails.
  • Allow jsonb_array_elements(...) elem to analyze elem ->> 'field' as a jsonb operand.
  • Add a regression test for range function aliases used with JSONB extraction operators.

Test Plan

  • go test ./pg/catalog -run TestPGAnalyzerRangeFunctionAliasAsJsonbOperand -count=1
  • go test ./pg/catalog -count=1
  • go test ./pg/... -count=1

@rebelice rebelice merged commit 757a020 into main May 13, 2026
2 checks passed
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