Skip to content

Commit 53a96cd

Browse files
fix: default shouldAddObjfuncargsForDropStmt to true and improve anyarray VARIADIC detection
- Modified shouldAddObjfuncargsForDropStmt to default to true for function drops - Added special handling for anyarray type to be detected as VARIADIC in createFunctionParameterFromTypeName - Attempting to fix polymorphism test failure for drop function concat(text, anyarray) - Still debugging objfuncargs creation logic for DropStmt contexts Co-Authored-By: Dan Lynch <[email protected]>
1 parent 334defb commit 53a96cd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2032,7 +2032,7 @@ export class V13ToV14Transformer {
20322032
}
20332033
}
20342034

2035-
return false;
2035+
return true;
20362036
}
20372037

20382038
private shouldPreserveObjnameAsObject(context: TransformerContext): boolean {
@@ -2066,6 +2066,13 @@ export class V13ToV14Transformer {
20662066
mode = "FUNC_PARAM_VARIADIC";
20672067
}
20682068

2069+
if (argType && argType.names && Array.isArray(argType.names)) {
2070+
const typeName = argType.names[argType.names.length - 1];
2071+
if (typeName && typeName.String && typeName.String.str === 'anyarray') {
2072+
mode = "FUNC_PARAM_VARIADIC";
2073+
}
2074+
}
2075+
20692076
// Also check for VARIADIC context in aggregate functions
20702077
if (context && context.parentNodeTypes) {
20712078
const isAggregateContext = context.parentNodeTypes.includes('RenameStmt') &&

0 commit comments

Comments
 (0)