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

From reina_ga@hotmail.com (Tony Reina)
Subject Re: New COPY commands in libpq
Date
Msg-id 272e4be7.0405010050.608912dd@posting.google.com
Whole thread Raw
In response to New COPY commands in libpq  (reina_ga@hotmail.com (Tony Reina))
List pgsql-hackers
> 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);

Yes, I've had several people mention this and that did the trick.
Thanks to all that replied. Looks like a simple strlen() works fine,
but I'll have to look into the UNICODE concerns that some people had
about Windows and MFC.

As I was looking into finding some sample code, I found that
/src/bin/psql/copy.c uses the older, deprecated commands of PQputline
and PQendcopy.

-Tony


pgsql-hackers by date:

Previous
From: Kaare Rasmussen
Date:
Subject: Re: Plan for feature freeze?
Next
From: Fabien COELHO
Date:
Subject: Re: pg ANY/SOME ambiguity wrt sql standard?