sending data with COPY SQL command, libpq and structure of SELECT resulting buffer

Adam Radlowski <[email protected]>
Newsgroups gmane.comp.db.postgresql.interfaces
Message-ID <[email protected]>
 From the docs i understood, that with COPY SQL command we should use 
for synchr. sending:
PQexec
PQResultstatus returns PGRES_COPY_OUT
PQputCopyData
PQputCopyEnd
PQResultstatus returns PGRES_COMMAND_OK

How should look the structure of buffer in
int PQputCopyData(PGconn *conn,const char *buffer,int nbytes);
id for me clear (it should be the same like for example in text dumps of 
tables done with pg_dump).

The question is:
Can I in function:
int PQputCopyData(PGconn *conn,const char *buffer,int nbytes);
use as a result buffer directly given by using PQexec for SELECT SQL 
command ?
In other way:
Is the structure given as result of PQexec with SELECT SQL command 
directly usable as buffer for PQputCopyData ?
Brgds
Adam





---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.