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

PGProcedure #62

Open
euanlau opened this issue Oct 15, 2021 · 4 comments
Open

PGProcedure #62

euanlau opened this issue Oct 15, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@euanlau
Copy link

euanlau commented Oct 15, 2021

Do we have a PGFunction equivalent for procedure statement?

Right now we could do
PGFunction.from_sql('create function...') or PGFunction(..constructor params)

Is there a PGProcedure class that we can use to generate a create procedure statement ?

https://www.postgresql.org/docs/11/sql-createprocedure.html

@olirice
Copy link
Owner

olirice commented Oct 15, 2021

There is no support for procedures currently as (afaik) the functionality is a subset of functions. Is there something specific you need that can't work as a function?

@euanlau
Copy link
Author

euanlau commented Oct 16, 2021

More for compatibility purpose. Having some existing statements that are in the form of procedure. It would be nice if one could use something like PGProcedure instead of updating existing codebase/db.

@olirice
Copy link
Owner

olirice commented Oct 16, 2021

Got it

No, there is not support for procedures and it isn't currently on the roadmap

But if anything is missing from functions that prevents porting procedures to them I'd be interested in supporting it

@olirice olirice added the enhancement New feature or request label Oct 18, 2021
@diegoful-fr
Copy link

But if anything is missing from functions that prevents porting procedures to them I'd be interested in supporting it

Procedures can do transaction management, while functions cannot. This allows for a whole set of use cases that are supported by procedures, but not by functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants