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

prepared statements: explicit support for EXEC SQL DEALLOCATE PREPARE name #67

Open
GitMensch opened this issue Jul 6, 2022 · 0 comments

Comments

@GitMensch
Copy link
Contributor

The PG documentation and others always specify "When you don't need the prepared statement anymore, you should deallocate it".

Trying it wiuth ocesql raises an error about unknown prepared statements - the reason behind this is that all prepared statements in ocesql are not handled by the DB, but in the DB lib (for whatever historic reason).

Still the prepared statements need memory, at least the prepare_list entry.

So to both circumvent strange errors from the DB about prepared statements not being known and to prevent resource leak I suggest to add EXEC SQL DEALLOCATE PREPARE to the parser and create a matching OCESQLPrepareDeallocate which will be called and free resources + drop the entry out of the internal list.

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

No branches or pull requests

1 participant