Re: COPY Hacks (WAS: RE: Postgresql vs SQLserver for this application ?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mischa <mischa(dot)Sandberg(at)telus(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: COPY Hacks (WAS: RE: Postgresql vs SQLserver for this application ?)
Date: 2005-04-06 20:27:13
Message-ID: 5831.1112819233@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mischa <mischa(dot)Sandberg(at)telus(dot)net> writes:
> Using COPY ... FROM STDIN via the Perl DBI (DBD::Pg) interface,
> I accidentally strung together several \n-terminated input lines,
> and sent them to the server with a single "putline".

> To my (happy) surprise, I ended up with exactly that number of rows
> in the target table.

> Is this a bug?

No, it's the way it's supposed to work. "putline" really just sends a
stream of data ... there's no semantic significance to the number of
putline calls you use to send the stream, only to the contents of the
stream. (By the same token, it's unlikely that deliberately aggregating
such calls would be much of a win.)

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-04-06 20:51:30 Re: Plan for relatively simple query seems to be very inefficient
Previous Message Dave Held 2005-04-06 20:06:39 Re: COPY Hacks (WAS: RE: Postgresql vs SQLserver for this application ?)