Skip to content

Commit

Permalink
Wtite TO only for value, default and multi
Browse files Browse the repository at this point in the history
  • Loading branch information
bolajiwahab committed Feb 3, 2025
1 parent 04e6bfc commit e683d4e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pglast/printers/ddl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3363,16 +3363,16 @@ def variable_set_stmt(node, output):
output.print_list(node.args, ',')
else:
output.print_name(node.name.split('.'))
if node.kind == vsk.VAR_SET_CURRENT:
output.write('FROM CURRENT')
else:
output.write(' TO ')
if node.kind == vsk.VAR_SET_VALUE:
output.print_list(node.args)
elif node.kind == vsk.VAR_SET_DEFAULT:
output.write('DEFAULT')
elif node.kind == vsk.VAR_SET_MULTI:
pass
if node.kind == vsk.VAR_SET_CURRENT:
output.write('FROM CURRENT')
else:
output.write(' TO ')
if node.kind == vsk.VAR_SET_VALUE:
output.print_list(node.args)
elif node.kind == vsk.VAR_SET_DEFAULT:
output.write('DEFAULT')
elif node.kind == vsk.VAR_SET_MULTI:
pass


@node_printer(ast.VariableShowStmt)
Expand Down

1 comment on commit e683d4e

@lelit
Copy link
Owner

@lelit lelit commented on e683d4e Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason of that last branch, with the pass statement?
And while there, maybe you can rectify the changelog grammar and force push?

Please sign in to comment.