Skip to content

Conversation

@pyramation
Copy link
Collaborator

@pyramation pyramation commented Nov 23, 2025

Fix #219: Add OBJECT_PUBLICATION support to AlterOwnerStmt deparser

Summary

Adds support for deparsing ALTER PUBLICATION ... OWNER TO ... statements by adding the OBJECT_PUBLICATION case to the AlterOwnerStmt switch statement in the deparser.

Changes:

Before: Deparser threw error: Unsupported AlterOwnerStmt objectType: OBJECT_PUBLICATION
After: Successfully deparses to: ALTER PUBLICATION "my_publication" OWNER TO "postgres"

Review & Testing Checklist for Human

  • Verify the fixture test misc/issues-17.sql passes and correctly round-trips the SQL statement
  • Confirm CI checks pass (especially deparser test suite - all 284 tests should pass)
  • Spot-check that the change follows the same pattern as other object types (e.g., OBJECT_COLLATION, OBJECT_TYPE)

Notes

  • This is a minimal, surgical fix that adds 3 lines following the exact same pattern as all other object types in the switch statement
  • All 284 deparser tests pass locally
  • No new lint issues introduced by this change
  • Built on top of the fix/issues-219 branch which already included the fixture test

Link to Devin run: https://app.devin.ai/sessions/505114984e764debaca3c75b2dab458c
Requested by: Dan Lynch (pyramation@gmail.com) / @pyramation

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Fixes issue #219 by adding OBJECT_PUBLICATION case to the AlterOwnerStmt
switch statement in the deparser. This enables deparsing of ALTER PUBLICATION
... OWNER TO ... statements.

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
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.

Error deparsing AlterOwnerStmt: Unsupported AlterOwnerStmt objectType: OBJECT_PUBLICATION

2 participants