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 {
54615461 : argValue ;
54625462 return `${ node . defname } = ${ quotedValue } ` ;
54635463 }
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+
54655478 // Handle CREATE OPERATOR and CREATE TYPE context
54665479 if ( context . parentNodeTypes . includes ( 'DefineStmt' ) ) {
54675480 const preservedName = this . preserveOperatorDefElemCase ( node . defname ) ;
You can’t perform that action at this time.
0 commit comments