Igor Korot <[email protected]> writes: > Is there a way to see if the query has been prepared already (in libpq)?
Use the pg_prepared_statements view. I don't think libpq keeps any
client-side state about this.
> Or is it better to run PQprepare for all known parameterized queries
> in the very beginning of the program and just execute them when needed?
Very probably. Querying pg_prepared_statements every time would be
expensive.
regards, tom lane
