Re: psql \copy command runs as a transcation?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: psql \copy command runs as a transcation?
Date: 2007-08-27 22:41:01
Message-ID: 9811.1188254461@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-08-27 22:48:58 Re: Tables dissapearing
Previous Message Tom Lane 2007-08-27 22:38:29 Re: EXPLAIN ANALYZE not considering primary and unique indices!