Skip to content

Prepared statements - psycopg3, psycopg2 #995

Answered by JelteF
joseortiz3 asked this question in Q&A
Discussion options

You must be logged in to vote

Psycopg3 docs are outdated now. However, it's not completely working with PgBouncer at the moment. The reason is that to close prepared statements it uses the DEALLOCATE sql command.

You can disable the deallocation behaviour in psycopg by setting prepare_threshold to float('inf') (or some very high number).

Related links:

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@riteshgl
Comment options

@JelteF
Comment options

@riteshgl
Comment options

@JelteF
Comment options

Answer selected by joseortiz3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants