Skip to content

auto-detect stored procedures as anything without whitespace#1975

Merged
mgravell merged 3 commits into
mainfrom
autosp
Oct 10, 2023
Merged

auto-detect stored procedures as anything without whitespace#1975
mgravell merged 3 commits into
mainfrom
autosp

Conversation

@mgravell

Copy link
Copy Markdown
Member

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

@kirylbokach

kirylbokach commented Nov 9, 2023

Copy link
Copy Markdown

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
Copy Markdown
Member Author

@kirylbokach #1995 thanks!

@crayzd92

Copy link
Copy Markdown

This change also breaks the REVERT command

@mgravell

Copy link
Copy Markdown
Member Author

K, will fix

@SSMKittel

SSMKittel commented Mar 19, 2024

Copy link
Copy Markdown

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

@mgravell

Copy link
Copy Markdown
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