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

[BUG]: Fixed procedure/function definition and exdecution logic for PostgreSQL #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tvarsis
Copy link
Contributor

@tvarsis tvarsis commented Mar 8, 2024

PostgreSQL have had official support for Procedures since version 11 released in 2018. Dreamfactorys' implementation for handling functions and procedures dates before that, and handles it based on IN/OUT params for those, which from version PG 11 is no longer accurate. This commit fixes this to correctly look at the ROUTINE_TYPE value in the database information schema to determine if it is an procedure or function.
The important part for this is that procedures needs to be executed using "CALL" where functions are executed using "SELECT", this leads to that the current implementation are not able to execute procedures at all and throws errors when trying to do it, which this commit fixes.
This would be a breaking change for applications that calls actual Postgres functions using the incorrect "_proc/" endpoints, which would then need to be updated to call the correct "_func/" endpoint instead.

I have tested and verified that executing both functions and procedures are working after this fix.

@tvarsis
Copy link
Contributor Author

tvarsis commented Mar 8, 2024

@anas-srikou Please review this one when you get a chance. Would be great to get it merged. Thank you!

@ghost
Copy link

ghost commented Apr 13, 2024

@tvarsis Sorry, I'm no longer an employee at Dreamfactory anymore!

@tvarsis
Copy link
Contributor Author

tvarsis commented Apr 29, 2024

@thekevinm not sure who is the owner of this repo anymore, but I saw that you have committed to other DF projects so maybe you could help me get this to the right person? Thanks!

@tvarsis
Copy link
Contributor Author

tvarsis commented Jul 19, 2024

@nicdavidson @thekevinm Is there someone responsible for this repo or is it dead?

@thekevinm
Copy link

@tvarsis Thank you for your contribution! We are looking to implement this in our v7 release later this month.

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.

2 participants