pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mischa <mischa.Sandberg@telus.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: COPY Hacks (WAS: RE: Postgresql vs SQLserver for this application ?)
Date: Wed, 06 Apr 2005 16:27:13 -0400
Message-ID: <5831.1112819233@sss.pgh.pa.us> (raw)
In-Reply-To: <1112813199.42542e8f17b4d@webmail.telus.net>
References: <OF9F44D17F.4458ADD0-ONC1256FDB.0027AF25-C1256FDB.002792BB@beauchamp.loxane.fr>
	<33c6269f05040608377dfc9272@mail.gmail.com>
	<1112813199.42542e8f17b4d@webmail.telus.net>

Mischa <mischa.Sandberg@telus.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



view thread (6+ messages)  latest in thread

Message-ID: <5831.1112819233@sss.pgh.pa.us>
Permalink:  ../5831.1112819233@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5831.1112819233@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mischa.Sandberg@telus.net
  Subject: Re: COPY Hacks (WAS: RE: Postgresql vs SQLserver for this application ?)
  In-Reply-To: <5831.1112819233@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox