Skip to content

feat: add plpgsql proto support#323

Open
psteinroe wants to merge 1 commit intopganalyze:17-latestfrom
psteinroe:feat/plpgsql-protobuf
Open

feat: add plpgsql proto support#323
psteinroe wants to merge 1 commit intopganalyze:17-latestfrom
psteinroe:feat/plpgsql-protobuf

Conversation

@psteinroe
Copy link

@psteinroe psteinroe commented Jan 22, 2026

This pull request was written alongside Claude Code. As a fellow os maintainer, I can completely understand if it is closed without comments.

Adds support for parsing plpgsql into protobuf, replacing the experimental json output. I do not have much experience in C or Ruby but tried to follow existing patterns as close as possible. I verified it by pointing the Rust binding in the Postgres Language Server project at my fork. Tests pass, and it seems to work just fine (supabase-community/postgres-language-server#639).

This would enable much better plpgsql support in the Language Server! :)

Summary of changes:

  • Add pg_query_parse_plpgsql_protobuf() API function
  • Generate PLpgSQL types in pg_query.proto
  • Add automated code generation scripts for PLpgSQL nodes
  • Include outfuncs/readfuncs for serialization

- Add pg_query_parse_plpgsql_protobuf() API function
- Generate PLpgSQL types in pg_query.proto
- Add automated code generation scripts for PLpgSQL nodes
- Include outfuncs/readfuncs for serialization
@psteinroe psteinroe marked this pull request as ready for review January 22, 2026 08:07
@lfittl
Copy link
Member

lfittl commented Jan 23, 2026

@psteinroe Thanks for the contribution, and appreciate the proactive disclosure of having used Claude Code - I think that's not a deal breaker as long as you have tested/reviewed the result.

I've been looking at this already as part of the Postgres 18 PR - I will take your work here into account (and may use parts of it), and will try to take this into the Postgres 18 update that I'm actively working on completing.

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.

2 participants

Comments