Am 04.01.2019 um 19:10 schrieb Justin Pryzby:
Currently it calls PQexecParams which (I think you agree) is creating unnamed
prepared statements behind the scenes.
Just found this in the docs
(https://www.postgresql.org/docs/11/protocol-flow.html):
"An unnamed prepared statement lasts only until the next Parse statement
specifying the unnamed statement as destination is issued. (Note that a
simple Query message also destroys the unnamed statement.)"
The side node is exactly what I observed. As far as I understand, this
means unnamed prepared statements should be only executed once, and best
directly after they have been created.
We could add this as caveat to the docs and docstrings.
And I will also revert to the API with the name as a positional
parameter, since unnamed statements are not so useful and the API is
then more consistent and more convenient for named statements.
-- Christoph
_______________________________________________
PyGreSQL mailing list
PyGreSQL@Vex.Net
https://mail.vex.net/mailman/listinfo/pygresql