Re: problem with PQsendQuery/PQgetResult and COPY FROM statement

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: problem with PQsendQuery/PQgetResult and COPY FROM statement
Дата
Msg-id 10370.1148249736@sss.pgh.pa.us
обсуждение исходный текст
Ответ на problem with PQsendQuery/PQgetResult and COPY FROM statement  (max.poletto@gmail.com)
Список pgsql-hackers
max.poletto@gmail.com writes:
> I attempt to execute a "COPY test FROM STDIN" using PQsendQuery.
> Subsequently, after the appropriate poll()/PQconsumeInput/PQisBusy
> calls, PQgetResult returns tens of millions of (invalid?) non-null
> PGresults.

You should fix your code to pay some attention to what those results
are.  I'm betting they are error results.

> This behavior seems incorrect, and sometimes causes my
> application to exhaust memory and crash.

Well, that's because you're not PQclear'ing a result when done with it.
        regards, tom lane


В списке pgsql-hackers по дате отправления: