Try to standardize formatting for CREATE FUNCTION#647
Merged
jeltz merged 1 commit intopercona:mainfrom Apr 8, 2026
Merged
Conversation
bde3a73 to
d2e24e3
Compare
Contributor
|
I've not wanted to change these files until we do new versions, but i guess we could. I think the bigger issue with them is the numbered OUT arguments that have the completely wrong numbers :D. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #647 +/- ##
==========================================
+ Coverage 86.32% 86.47% +0.14%
==========================================
Files 3 3
Lines 1346 1346
Branches 217 217
==========================================
+ Hits 1162 1164 +2
+ Misses 87 86 -1
+ Partials 97 96 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@AndersAstrand It was when I was contemplating fixing some of the more serious issues I got annoyed at the lack of consistency. This PR is just about making things nicer to work with for when fixing the actual real issues. |
AndersAstrand
approved these changes
Apr 8, 2026
The ways we wrote CREATE FUNCTION were all over the place so this is an attempt at standardizing how we write SQL functions without changing the semantic meaning of any of the upgrade scripts. The goals of this is to make sure we always write things in the same order and that we put the function body last. We also skip declaring VOLATILE since that is the default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ways we wrote
CREATE FUNCTIONwere all over the place so this is an attempt at standardizing how we write SQL functions without changing the semantic meaning of any of the upgrade scripts.The goals of this is to make sure we always write things in the same order and that we put the function body last. We also skip declaring
VOLATILEsince that is the default.Feel free to suggest a totally different formatting, this is just one way to do it, and I mostly care about us writing things in a uniform way.