Skip to content

Commit 5d87595

Browse files
fix: preserve objfuncargs in AlterFunctionStmt contexts
- Remove AlterFunctionStmt from contexts that should not preserve objfuncargs - Based on test evidence showing objfuncargs should be preserved in most contexts - Only remove objfuncargs in CreateCastStmt contexts where PG14 doesn't expect them Co-Authored-By: Dan Lynch <[email protected]>
1 parent 6f9096e commit 5d87595

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/transform/src/transformers/v13-to-v14.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -989,14 +989,14 @@ export class V13ToV14Transformer {
989989
return true; // Default to preserving objfuncargs when no context
990990
}
991991

992+
// Based on test evidence, most contexts should preserve objfuncargs
992993
for (const parentType of context.parentNodeTypes) {
993-
if (parentType === 'AlterFunctionStmt' ||
994-
parentType === 'CreateCastStmt') {
995-
return false; // These contexts should not have objfuncargs
994+
if (parentType === 'CreateCastStmt') {
995+
return false; // CreateCastStmt should not have objfuncargs in PG14
996996
}
997997
}
998998

999-
return true;
999+
return true; // Preserve objfuncargs in all other contexts including AlterFunctionStmt
10001000
}
10011001

10021002
private isVariadicAggregateContext(context: TransformerContext): boolean {

0 commit comments

Comments
 (0)