Re: psql \copy command runs as a transcation?

From: Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: psql \copy command runs as a transcation?
Date: 2007-08-30 02:28:34
Message-ID: 1188440914.18203.12.camel@neuromancer.home.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2007-08-27 at 18:41 -0400, Tom Lane wrote:
> 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?

nope.. the software is actually a perl script which does a system('psql
-U -d -c "\copy"') command.

Again... I've not been able to duplicate it yet.. so I was just asking
here to confirm correct behaviour of \copy.

Thanks

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2007-08-30 03:38:35 Re: Reliable and fast money transaction design
Previous Message Hiroshi Saito 2007-08-30 00:57:55 Re: Npgsql GUI problem C#.net