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 1fVNwu-0006eR-1I for pgsql-general@arkaria.postgresql.org; Tue, 19 Jun 2018 21:14:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fVNws-0007bN-PH for pgsql-general@arkaria.postgresql.org; Tue, 19 Jun 2018 21:13:58 +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 1fVNtC-0002Dh-6V for pgsql-general@lists.postgresql.org; Tue, 19 Jun 2018 21:10:10 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fVNt9-00057e-DD for pgsql-general@lists.postgresql.org; Tue, 19 Jun 2018 21:10:09 +0000 Received: by mail-wm0-x243.google.com with SMTP id 69-v6so2940912wmf.3 for ; Tue, 19 Jun 2018 14:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=k5X4MCI3U2UfXOMPT9QCrUisZAx6reF4NPaK0SpjbOw=; b=EJOQpYEPEdpmgC5y+skQmkSBc/nNKXE6qGWw7NuKG90gVRGA5IJPzLIVaWI0WyP9qb t8ecX4oQccv76amN9ebnmahxJ331dE9qjZTTUJr/zvkinT8QH4g284DcvNGVSwfeejSZ 5T9dyV/3Nkw5xuHaGGsKy8wBnNFDfZzFmoAWBgcY+GekIVthZwFBgS7laK7uxcdzimI1 ejqhU6qyTgjGILjnBOGPDAxFZthSiEcl5dXrUTZ2Ma53YeasFvTnbXhJU/3/DZVp9C6d pCJKn1Z6L9cJQLS5qmfn4IzFgSx1BjK71/Xk7+sdOUCALU2nsz2NVuIiQg48lrSYU/vp ucNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=k5X4MCI3U2UfXOMPT9QCrUisZAx6reF4NPaK0SpjbOw=; b=XZUSgh4AVUTPcfQpLMfbmePSF1uE4HOhbEsmoiWCg/K4HrTQglJwb51oX0h5PA8Oco jRoXhI8SG/Oa/v+De9UOyJZagHrIosdW8YENo91pMcwYNptQ6DIZcrNaZu1V5/5LV/ty AFgsNW7H6GCvhq0YJtrnfpZNzQTXBj9D2oF63Vyg16O7NTgmct9dfq2hG8OUk4C2qVbs BOgVQtk1NBzMKT/1yiXI0M6tcvEH6G5bnY76TeA8I6dXX2A2TjPuVoP6+/DN9llh/gBp TrZY1/URK021eCjCTCXRG2GmClx3DnO3TLTBL70eVCCKEZ43EfY/ECOg414lpBi7gPfD 26WQ== X-Gm-Message-State: APt69E3QNhOE8aL51sjREPIl58mJnm1m4KsAsM+wphZ98r+oKrQIMgVt Sjg9CxdoKtf74Mp+os441l8= X-Google-Smtp-Source: ADUXVKK5CnWEjhRkeEMJYvkq9IzZSMJNOvGU5Oz3F1tUhBl2WPTT6e9stcpKPygaXy5NqJyhgcmk+A== X-Received: by 2002:a50:aec8:: with SMTP id f8-v6mr16007812edd.72.1529442606623; Tue, 19 Jun 2018 14:10:06 -0700 (PDT) Received: from hollewijn.internal (84-245-13-9.dsl.cambrium.nl. [84.245.13.9]) by smtp.gmail.com with ESMTPSA id s21-v6sm355671edr.62.2018.06.19.14.10.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jun 2018 14:10:05 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: Load data from a csv file without using COPY From: Alban Hertroys In-Reply-To: Date: Tue, 19 Jun 2018 23:10:04 +0200 Cc: PG mailing List Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Ravi Krishna X-Mailer: Apple Mail (2.3445.8.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On 19 Jun 2018, at 22:16, Ravi Krishna wrote: >=20 > In order to test a real life scenario (and use it for benchmarking) I = want to load large number of data from csv files. =20 > The requirement is that the load should happen like an application = writing to the database ( that is, no COPY command).=20 > Is there a tool which can do the job. Basically parse the csv file = and insert it to the database row by row. >=20 > 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 =E2=80=94inserts. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest.