Re: code example for PQgetCopyData

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: code example for PQgetCopyData
Дата
Msg-id 12670.1259868603@sss.pgh.pa.us
обсуждение исходный текст
Ответ на code example for PQgetCopyData  (Dave Huber <DHuber@letourneautechnologies.com>)
Ответы Re: code example for PQgetCopyData  (Dave Huber <DHuber@letourneautechnologies.com>)
Список pgsql-general
Dave Huber <DHuber@letourneautechnologies.com> writes:
> Does anybody have a snippet where they use PQgetCopyData? I must be calling it wrong as it keep crashing my program.
I'veattached my code below. I am writing this for a Code Interface Node in LabVIEW. 

One thing you're missing is that you should check that the result from
the PQexec actually shows successful entry into COPY_OUT state.
But I think the crash is because you're confused about the indirection
level.  buffer should be char *, not char **, and the argument ought to
be &buffer so that the function can assign to buffer.

            regards, tom lane

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

Предыдущее
От: Scott Felt
Дата:
Сообщение: Re: DB terminating
Следующее
От: Dave Huber
Дата:
Сообщение: Re: code example for PQgetCopyData