Skip to content

PostgreSQL ALTER FUNCTION / ALTER AGGREGATE#2248

Open
LucaCappelletti94 wants to merge 2 commits intoapache:mainfrom
LucaCappelletti94:postgres-regression-3
Open

PostgreSQL ALTER FUNCTION / ALTER AGGREGATE#2248
LucaCappelletti94 wants to merge 2 commits intoapache:mainfrom
LucaCappelletti94:postgres-regression-3

Conversation

@LucaCappelletti94
Copy link
Contributor

What this PR introduces

  • Adds parser + AST support for ALTER FUNCTION and ALTER AGGREGATE statements.
  • Adds support for operations:
    • RENAME TO
    • OWNER TO
    • SET SCHEMA
  • Adds ALTER FUNCTION action parsing (IMMUTABLE/STABLE/VOLATILE, null-input modes, LEAKPROOF, security, PARALLEL, COST, ROWS, SUPPORT, SET, RESET, optional RESTRICT).
  • Adds function-level [NO] DEPENDS ON EXTENSION handling.
  • Adds aggregate signature support for:
    • (*)
    • (argtypes)
    • (argtypes ORDER BY argtypes)
    • (ORDER BY argtypes)

PostgreSQL parity adjustments

  • Allows unambiguous argless ALTER FUNCTION name action forms.
  • Restricts [NO] DEPENDS ON EXTENSION to ALTER FUNCTION (not aggregate).
  • Tightens aggregate argument rules by rejecting unsupported modes/defaults (OUT, INOUT, VARIADIC, DEFAULT, = in aggregate signatures).
  • Adds VARIADIC as a function argument mode in parser/AST.

Tests

  • Adds a focused PostgreSQL test matrix for ALTER FUNCTION / ALTER AGGREGATE variants.
  • Includes both positive and negative parity cases and canonical output assertions.
  • Existing related PostgreSQL alter/create-function tests remain passing.

Add ALTER FUNCTION/ALTER AGGREGATE support through AST and parser dispatch, including action parsing and aggregate signature handling.

Tighten PostgreSQL parity semantics in parser branches (function-only DEPENDS ON EXTENSION, stricter aggregate signature argument rules) and add VARIADIC function argument mode support.
Add a focused PostgreSQL test matrix for ALTER FUNCTION and ALTER AGGREGATE covering valid forms, canonical output, and strict-parity rejection cases.
@LucaCappelletti94 LucaCappelletti94 marked this pull request as ready for review February 27, 2026 07:30
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