Re: psql \copy command runs as a transcation? - Mailing list pgsql-general

From Tom Lane
Subject Re: psql \copy command runs as a transcation?
Date
Msg-id 9811.1188254461@sss.pgh.pa.us
Whole thread Raw
In response to psql \copy command runs as a transcation?  (Ow Mun Heng <Ow.Mun.Heng@wdc.com>)
Responses Re: psql \copy command runs as a transcation?  (Ow Mun Heng <Ow.Mun.Heng@wdc.com>)
List pgsql-general
Ow Mun Heng <Ow.Mun.Heng@wdc.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

pgsql-general by date:

Previous
From: Jessie
Date:
Subject: Npgsql GUI problem C#.net
Next
From: Sanjay
Date:
Subject: Creating indices on foreign keys