Arjen van der Meijden <[EMAIL PROTECTED]> writes: > I had a look at that _close_pgsql_link-function and this it the code:
> while ((res = PQgetResult(link))) { > PQclear(res); > } > So there is indeed a very clear loop. But I'm not sure whether this code > is incorrect as a generic "close the connection cleanly without memory > leaks"-function? It's surely incorrect as a means of getting out of a COPY state. To tell the truth, if their intention is to close the connection unceremoniously, they should just do that, ie PQfinish or just quit the application. So I'd suggest removing that loop. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly