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

auto-detect stored procedures as anything without whitespace #1975

Merged
merged 3 commits into from
Oct 10, 2023
Merged

Conversation

mgravell
Copy link
Member

also, we have public fields? (hangs head in shame)

@mgravell mgravell merged commit a37b151 into main Oct 10, 2023
2 checks passed
mgravell added a commit that referenced this pull request Oct 19, 2023
mgravell added a commit that referenced this pull request Oct 19, 2023
@kirylbokach
Copy link

kirylbokach commented Nov 9, 2023

Unfortunately this change breaks all single word commands, like COMMIT and ROLLBACK, so the command type has to be set explicitly for these

@mgravell
Copy link
Member Author

@kirylbokach #1995 thanks!

@crayzd92
Copy link

This change also breaks the REVERT command

@mgravell
Copy link
Member Author

K, will fix

@SSMKittel
Copy link

SSMKittel commented Mar 19, 2024

Also breaks the "analyze" command in postgres. https://www.postgresql.org/docs/current/sql-analyze.html

@mgravell
Copy link
Member Author

k, adding analyze to the list; note that in all such cases, you can specify the CommandType explicitly, which will unblock you. But: please keep reporting any more contenders. I hope y'all understand the intent here; in almost all cases, this feature greatly simplifies usage with stored-procs, with single-word genuine commands being a tiny fraction of real world scenarios; meaning if someone says "run the SQL 'Foo' please" (from application code), it is 99%+ likely that "Foo" (as a single-word command) is a stored procedure.

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.

4 participants