Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > Presently you get a million lines of '\N command not recognised' and > various other random things because if a line of the copy fails due to > say a FK constraint, or even if the COPY is run in an aborted > transaction, it tries to execute all the stdin data as actual > statements. >> >> I'd like to see a test case for this in v3 protocol. It was definitely >> a problem before that, but I thought I fixed it.
> This is with 7.4 and it still does it.... Here is an example: Hmm. This error is not coming from "a line of the copy", it is occurring because the COPY command itself fails, and so the server never tells psql to shift into COPY mode. I'm not sure that a reasonable fix for this is possible. As a counterexample, if you misspelled COPY as COPZ, would you expect the software to decide that following lines up to \. should be ignored? If you manually misentered a COPY command and got an error, would you be surprised to have psql ignore everything you typed until you typed \. ? (I can bet we'd get bug reports about that.) regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org