File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
packages/transform/src/transformers Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ export class V13ToV14Transformer {
239239 }
240240
241241 FunctionParameter ( node : PG13 . FunctionParameter , context : TransformerContext ) : any {
242- const result : any = { ... node } ;
242+ const result : any = { } ;
243243
244244 if ( node . name !== undefined ) {
245245 result . name = node . name ;
@@ -983,8 +983,20 @@ export class V13ToV14Transformer {
983983 }
984984
985985 private shouldPreserveObjfuncargs ( context : TransformerContext ) : boolean {
986- // Based on test evidence, objfuncargs should be preserved in almost all contexts
987- return true ; // Always preserve objfuncargs to match test expectations
986+ if ( ! context . parentNodeTypes || context . parentNodeTypes . length === 0 ) {
987+ return true ;
988+ }
989+
990+ for ( const parentType of context . parentNodeTypes ) {
991+ if ( parentType === 'AlterFunctionStmt' ||
992+ parentType === 'DropStmt' ||
993+ parentType === 'RenameStmt' ||
994+ parentType === 'CommentStmt' ) {
995+ return false ;
996+ }
997+ }
998+
999+ return true ;
9881000 }
9891001
9901002 private isVariadicAggregateContext ( context : TransformerContext ) : boolean {
You can’t perform that action at this time.
0 commit comments