Erik Hofman <erik(at)ehofman(dot)com> writes:
> Probably adding CONNECTION_MADE to PQsendQuery
The code is not broken, but it would be if we changed that.
CONNECTION_MADE is an intermediate state in the nonblocking connection
procedure; it does not entitle you to send a query. You really
shouldn't be looking at PQstatus anyway, IMHO, until you've gotten a
PGRES_POLLING_OK result from PQconnectPoll.
regards, tom lane