Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVOxq-0002eq-GC for pgsql-general@arkaria.postgresql.org; Tue, 19 Jun 2018 22:19:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fVOxo-00048k-EW for pgsql-general@arkaria.postgresql.org; Tue, 19 Jun 2018 22:19:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVOvq-0007oc-8o for pgsql-general@lists.postgresql.org; Tue, 19 Jun 2018 22:16:59 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVOvk-0006ik-DN for pgsql-general@lists.postgresql.org; Tue, 19 Jun 2018 22:16:57 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id CF92221B89; Tue, 19 Jun 2018 18:16:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 19 Jun 2018 18:16:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=TW3dhOa3tOGJ/FlV2eRV8uuoPlaxN 0yYGaXPZYJqb5I=; b=feUmjMeBHH02X/pq+tfRIsTpWNkNVKFWnvJJWhpOtDoc8 V8aBSJs27SkH7GV60DwuQm1lwE06Xl9MqmRixsLKDp1AwTMs9vykdLgpwlNRLGbd k9ywVn9DDElGfB54yS0FaK24tFV6L0jgWvn3HbKCNAzhVfJ0HzLH6PWk0LYSZur7 BLUfxIcU5odDi9JxdjXQlMLGlq/bIYgFyf5Ym8ycFp1/zs4kFzsPPnWs/u/+g5d6 BwB7tLIedSKQ9pZhOI621Vf/OQ6xu4MIQ6PukHML4JwS2tr8PJS3onR/BSCmYeGZ GnoY4RVpCx0a8OWj+8xWn1JeSQg4D/59dGdMjZ8nQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=TW3dhO a3tOGJ/FlV2eRV8uuoPlaxN0yYGaXPZYJqb5I=; b=h4OPDswvObvOL7auNNrhXI Q/+EJvXHhea3UypJ61EAMb6KDcSBtm4MTOWcmslzxYiob0h8+b1FOhx8SKg4yrHW b9YLVCQi/FFlnfHX4vjJiLOV2i1dAcaGc6DDx8ck264iDF/Vvqn5k3HtdQYJ9hwV pWu7kzahMu/WldobZKGmahXMzJ2sypYbEVyh3zDu1Mq4XUoJKOwrJersY+ZyuQjE ANhzKyRQ2bKsnPc7hw6nPgdOmuj/rrgLNiuL4ZISgCQC94Q4Uh4K7hS8t9BPzlRl IZm6CK8oG5ojgXxglpnYZINdipUhTVexE3vx9EIO2GAMhhTP/8TTHXSQ6ZhWTmPQ == X-ME-Proxy: X-ME-Sender: Received: from ranger.suse (50-197-80-2-static.hfc.comcastbusiness.net [50.197.80.2]) by mail.messagingengine.com (Postfix) with ESMTPA id 94FDD10261; Tue, 19 Jun 2018 18:16:48 -0400 (EDT) Subject: Re: Load data from a csv file without using COPY To: Asif Ali , James Keener , "pgsql-general@lists.postgresql.org" , Alban Hertroys , Ravi Krishna References: <2C52E1C6-DBEB-4DAE-9945-69A75FFFA3AE@jimkeener.com> From: Adrian Klaver Message-ID: Date: Tue, 19 Jun 2018 15:16:47 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 06/19/2018 03:13 PM, Asif Ali wrote: > please just tell me the site i will do it right away and i have marked > it junked so many times , i will keep spamming it until my email address > is removed from the list https://lists.postgresql.org/unsubscribe/ > > Bye > > ------------------------------------------------------------------------ > *From:* James Keener > *Sent:* Wednesday, June 20, 2018 3:11 AM > *To:* pgsql-general@lists.postgresql.org; Asif Ali; Alban Hertroys; Ravi > Krishna > *Cc:* PG mailing List > *Subject:* Re: Load data from a csv file without using COPY > Seriously, stop spamming the list and stop cursing and acting like a > petulant child. Go to the site and unsubscribe or use a mail client that > understands the standard list headers. > > On June 19, 2018 6:06:59 PM EDT, Asif Ali wrote: > > how the fuck i unsubscribe to this mailing list , i get more than > 100 emails a day > > Bye > > ------------------------------------------------------------------------ > *From:* Alban Hertroys > *Sent:* Wednesday, June 20, 2018 2:10 AM > *To:* Ravi Krishna > *Cc:* PG mailing List > *Subject:* Re: Load data from a csv file without using COPY > > > On 19 Jun 2018, at 22:16, Ravi Krishna wrote: > > > > In order to test a real life scenario (and use it for benchmarking) I want to load large number of data from csv files. > > The requirement is that the load should happen like an application writing to the database ( that is, no COPY command). > > Is there a tool which can do the job.  Basically parse the csv file and insert it to the database row by row. > > > > thanks > > I think an easy approach would be to COPY the CSV files into a > separate database using psql's \copy command and then pg_dump that > as separate insert statements with pg_dump —inserts. > > Alban Hertroys > -- > If you can't see the forest for the trees, > cut the trees and you'll find there is no forest. > > > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. -- Adrian Klaver adrian.klaver@aklaver.com