Suggesting a libpq addition
Marc Balmer <marc@msys.ch>
From: Marc Balmer <marc@msys.ch>
To: pgsql-hackers@postgresql.org
Date: 2010-12-05T09:22:49Z
Lists: pgsql-hackers
Attachments
- pqvexec.c (text/plain)
I am suggesting adding a function to libpq: PGresult *PQvexec(PGconn *conn, const char *fmt, ...); It behaves similar to PQexec, but it allows for printf style varargs and does connection re-establishing if the connection fails (it can be discussed if this already to much magic, maybe remove this part). It has been carefully designed to handle memory the right way. We use this since a long time. What do you think?