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

Trim trailing semicolon #20

Merged
merged 3 commits into from
Oct 26, 2023
Merged

Conversation

lu-zhengda
Copy link
Collaborator

Trim trailing semicolon after normalization.
The motivation behind this change is that pg_stat_statements normalizes queries without semicolon, while pg_stat_activity retains the exact query that's executed.
Since the semicolon (;) at the end of a SQL statement is optional and doesn't affect the "meaning" of the query, we want to left it off to simplify and standardize the pattern post normalization.

@lu-zhengda lu-zhengda marked this pull request as ready for review October 25, 2023 14:32
@lu-zhengda lu-zhengda requested a review from a team as a code owner October 25, 2023 14:32
@lu-zhengda lu-zhengda merged commit 23500b6 into main Oct 26, 2023
3 checks passed
@lu-zhengda lu-zhengda deleted the zhengda.lu/trim-trailing-semicolon branch October 26, 2023 14:55
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.

2 participants