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

db plugin: support multiline revoke stmt in postgres #18632

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

fairclothjm
Copy link
Contributor

Use the existing helper function to enable parsing multiline strings in revocation statements like we do for creation statements.

fixes: #15678

@fairclothjm fairclothjm requested a review from a team January 9, 2023 15:58
@fairclothjm fairclothjm added this to the 1.13.0-rc1 milestone Jan 9, 2023
Copy link
Member

@robmonte robmonte left a comment

Choose a reason for hiding this comment

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

Nice improvement, just 1 idea if you agree or not.

"username": username,
}
if err := dbtxn.ExecuteTxQueryDirect(ctx, tx, m, stmt); err != nil {
return err
Copy link
Member

Choose a reason for hiding this comment

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

Do you think it'd be a good idea to wrap this error so it's labeled as a multiline query that was attempted?

return fmt.Errorf("failed to execute multiline query: %w", err)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I will leave this one as is since we already aren't doing it for creation

@fairclothjm fairclothjm merged commit 7517e39 into main Jan 10, 2023
@fairclothjm fairclothjm deleted the dbplugin/postgres-revoke-support-multiline-str branch January 10, 2023 21:27
AnPucel pushed a commit that referenced this pull request Feb 3, 2023
* db plugin: support multiline revoke stmt in postgres

* add changelong
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 this pull request may close these issues.

PostgreSQL Revocation Statements doesn't allow multiline queries
2 participants