Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printer for "SET configuration_parameter FROM CURRENT" #167

Closed
bolajiwahab opened this issue Feb 2, 2025 · 2 comments
Closed

Printer for "SET configuration_parameter FROM CURRENT" #167

bolajiwahab opened this issue Feb 2, 2025 · 2 comments

Comments

@bolajiwahab
Copy link
Contributor

bolajiwahab commented Feb 2, 2025

PostgreSQL support this syntax for setting configuration:

SET configuration_parameter { TO value | = value | FROM CURRENT }

Currently there is no printer for this syntax even though it is valid syntax and we simply raise NotImplementedError.
We could do:

if node.kind == vsk.VAR_SET_CURRENT:
    output.write('FROM CURRENT')
elif node.kind == vsk.VAR_SET_VALUE:
    output.write(' TO ')
    output.print_list(node.args)
elif node.kind == vsk.VAR_SET_DEFAULT:
    output.write(' TO ')
    output.write('DEFAULT')
elif node.kind == vsk.VAR_SET_MULTI:
    pass
@lelit
Copy link
Owner

lelit commented Feb 2, 2025

Thanks for finding and reporting the defect! Will cure the problem... if you do not beat me with a PR 😉

@bolajiwahab
Copy link
Contributor Author

bolajiwahab commented Feb 2, 2025

Thanks. You can have a look at the PR #168. Looks like tests are not running though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants