X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6597553A90 for ; Wed, 6 Apr 2005 21:28:19 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89972-05 for ; Wed, 6 Apr 2005 20:28:07 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C1A7B53AF9 for ; Wed, 6 Apr 2005 21:27:11 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j36KRDYV005832; Wed, 6 Apr 2005 16:27:13 -0400 (EDT) To: Mischa Cc: pgsql-performance@postgresql.org Subject: Re: COPY Hacks (WAS: RE: Postgresql vs SQLserver for this application ?) In-reply-to: <1112813199.42542e8f17b4d@webmail.telus.net> References: <33c6269f05040608377dfc9272@mail.gmail.com> <1112813199.42542e8f17b4d@webmail.telus.net> Comments: In-reply-to Mischa message dated "Wed, 06 Apr 2005 11:46:39 -0700" Date: Wed, 06 Apr 2005 16:27:13 -0400 Message-ID: <5831.1112819233@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/123 X-Sequence-Number: 11520 Mischa 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