[GENERAL] COPY and binary data

2011-06-09 Thread Юрий EGO
Hello! I have a code (libpq): char textbuffer[120]; res = PQexec(conn, "COPY table_name(\"serial_column",\"int_column",\"bytea_column\") FROM STDIN"); if(PQresultStatus(res) == PGRES_COPY_IN) { for(int n=0; n < 10; n++) { sprintf(textbuffer, "1\t%i\t'text'\n", n); int copydatares = PQputCopyData

[GENERAL]

2011-06-07 Thread Юрий EGO
Hello! I have a code (libpq): char textbuffer[120]; res = PQexec(conn, "COPY table_name(\"serial_column",\"int_column",\"bytea_column\") FROM STDIN"); if(PQresultStatus(res) == PGRES_COPY_IN) { for(int n=0; n < 10; n++) { sprintf(textbuffer, "1\t%i\t'text'\n", n); int copydatares = PQputCopyData