Since I can't use ECPG COPY, I'm trying to use libpq PQputCopyData. Not
realizing I had to use CSV format to include column header names, I used:
PQexec(conn, "COPY detail FROM stdin")
I sent the column headers as the first line of the input. While this I now
know this is wrong, the problem here is that I got no error response back.
In the postmaster log, I see:
ERROR: invalid input syntax for type numeric: "messageid"
CONTEXT: COPY detail, line 1, column messagesize: "messageid"
However, every call to PQputCopyData, as well as PQputCopyEnd returned a
result of 1.
Ok, so I fixed the above error, but any other data load errors are only
showing up in the postgres log file. I tried defining
PQsetNoticeReceiver(conn, &pgsqlNoticeReceiver, (void *) &dummy);
For testing, pgsqlNoticeReceiver just writes a message and aborts. However,
pgsqlNoticeReceiver is never called.
What am I missing? I need to abort the transaction on any errors in the
COPY.
Wes
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly