File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -5461,7 +5461,20 @@ export class Deparser implements DeparserVisitor {
5461
5461
: argValue ;
5462
5462
return `${ node . defname } = ${ quotedValue } ` ;
5463
5463
}
5464
-
5464
+
5465
+ // Handle CopyStmt WITH clause options - uppercase format without quotes
5466
+ if ( context . parentNodeTypes . includes ( 'CopyStmt' ) ) {
5467
+ if ( node . defname === 'format' && node . arg && this . getNodeType ( node . arg ) === 'String' ) {
5468
+ const stringData = this . getNodeData ( node . arg ) ;
5469
+ return `FORMAT ${ stringData . sval . toUpperCase ( ) } ` ;
5470
+ }
5471
+ // Handle other COPY options with uppercase defname
5472
+ if ( node . arg ) {
5473
+ return `${ node . defname . toUpperCase ( ) } ${ argValue } ` ;
5474
+ }
5475
+ return node . defname . toUpperCase ( ) ;
5476
+ }
5477
+
5465
5478
// Handle CREATE OPERATOR and CREATE TYPE context
5466
5479
if ( context . parentNodeTypes . includes ( 'DefineStmt' ) ) {
5467
5480
const preservedName = this . preserveOperatorDefElemCase ( node . defname ) ;
You can’t perform that action at this time.
0 commit comments