Re: New COPY commands in libpq - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New COPY commands in libpq
Date
Msg-id 26303.1083342659@sss.pgh.pa.us
Whole thread Raw
In response to New COPY commands in libpq  (reina_ga@hotmail.com (Tony Reina))
List pgsql-hackers
reina_ga@hotmail.com (Tony Reina) writes:
> *    PQputCopyData(conn, cmd, sizeof(cmd));

I'm a bit rusty on C++ string mashing, but surely sizeof() is not the
correct way to determine the number of bytes presently stored in a
variable-length string?

> *       PQputCopyEnd(conn, msg);

You want to pass NULL for the second argument.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pg ANY/SOME ambiguity wrt sql standard?
Next
From: Bruce Momjian
Date:
Subject: Re: Current CVS tip segfaulting