-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add support for stored procedures #159
Comments
It should. Do you have the SQL for reference, pg dump of your schema, and the command you are running to generate the diff? |
here is the stored proc command used
|
Okay, I was mistaken. We do not support stored procedures. I was under the impression that function support == stored procedure support (and that stored procedures are just syntactic sugar for functions). This is only partially true. In the interim, you could structure your migrations to always create or replace your stored procedures at the end. |
Can you elaborate on what you mean by that? |
Unfortunately, the offset is in terms of index from the start instead of the end. I might add support for "negative indexes" in the future, such that the offset can also be in terms of a relative position from the end of the migration statements. |
So for now i can't do stored procedures ? |
|
But isn't the workaround to run them from start rather than at the end ? |
It's a bit situation dependent, but generally makes sense to run at the end after any adds/alters that may occur. |
Do you anticipate supporting stored procedures any time soon? |
I can try to knock it out soon-ish. Stored procedures shouldn't be too bad to implement. They're definitely a bit on the trickier end, however. Notably, we can't track the dependencies of pg/plsql functions. Postgres doesn't even track those dependencies. |
I did try to add a STORED PROCEDURE but the plan didn't generate a diff with the new file
The text was updated successfully, but these errors were encountered: