Search Postgresql Archives

Re: code example for PQgetCopyData

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave Huber <DHuber@xxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
> Does anybody have a snippet where they use PQgetCopyData? I must be calling it wrong as it keep crashing my program. I've attached 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux