Re: New COPY commands in libpq

From: reina_ga(at)hotmail(dot)com (Tony Reina)
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: New COPY commands in libpq
Date: 2004-05-01 08:50:03
Message-ID: 272e4be7.0405010050.608912dd@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tony Reina 2004-05-01 09:25:01 Re: New COPY commands in libpq
Previous Message Kaare Rasmussen 2004-05-01 08:27:44 Re: Plan for feature freeze?