Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com> writes:
> Does the psql's \copy command run as a transaction?
Certainly.
> I think it does, but
> somehow when I cancel (in a script) a running import, "seems" (I can't
> seem to duplicate it on the cli though) like a few lines/rows gets
> inserted anyway..
Hmm. Some client-side software is written to split an import into
multiple short copy commands, but I don't believe there's any such thing
in psql. Are you sure those rows didn't come from someplace else?
regards, tom lane