Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfp98-0001up-FC for pgsql-admin@arkaria.postgresql.org; Wed, 08 Apr 2015 12:31:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yfp97-0005Lm-V5 for pgsql-admin@arkaria.postgresql.org; Wed, 08 Apr 2015 12:31:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yfp97-0005LR-5d for pgsql-admin@postgresql.org; Wed, 08 Apr 2015 12:31:53 +0000 Received: from mout.web.de ([212.227.17.11]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfp93-0005DF-Be for pgsql-admin@postgresql.org; Wed, 08 Apr 2015 12:31:51 +0000 Received: from vm-mailsrv.lan.net ([87.155.107.165]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0M09ZI-1ZXuhi3D6y-00uLjf for ; Wed, 08 Apr 2015 14:31:46 +0200 Received: from localhost (localhost [127.0.0.1]) by vm-mailsrv.lan.net (Postfix) with ESMTP id C4944730 for ; Wed, 8 Apr 2015 14:31:45 +0200 (CEST) X-Spam-Flag: NO X-Spam-Score: -2.898 X-Spam-Level: X-Spam-Status: No, score=-2.898 tagged_above=-99.9 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, FREEMAIL_FROM=0.001, URIBL_BLOCKED=0.001] autolearn=ham Received: from vm-mailsrv.lan.net ([127.0.0.1]) by localhost (vm-mailsrv.lan.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pjcbzRloC_2l for ; Wed, 8 Apr 2015 14:31:39 +0200 (CEST) Received: from neslonek.homeunix.org (vm-webapp-ext.dmz-lan.net [192.168.0.100]) by vm-mailsrv.lan.net (Postfix) with ESMTP id 017E471F for ; Wed, 8 Apr 2015 14:31:39 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 08 Apr 2015 14:31:38 +0200 From: Jan Lentfer To: Subject: Re: pgdump with batch insert In-Reply-To: References: Message-ID: <3341486aeec8f791e6bb29e637319273@imap.lan.net> X-Sender: Jan.Lentfer@web.de User-Agent: Roundcube Webmail/0.7.2 X-Provags-ID: V03:K0:he97gVnihJJPHME9wHpPsw3H2PFsCFd2j9Rx5nR/aYlwJSiAQMq m5XT4ZEzucssRyD/HvUDRKoYke5ER0WcVfvZUgafPRF8fAibStCpsKBNvdnod78vM55fsDp xRLH7jdAfkAS1dHagDtbKuqMWynoGyxe1CR4+tanOHmfM8fI5divooJ59hYlayHpv21xC1e 0AsOSnXgImSmljd3vRqmg== X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Am 2015-04-08 14:02, schrieb Ankur Kaushik: > Is there possibility in pgdump to get insert statement in batch > insert > into tablename value(),(),(),; > > as well as We can use replace keyword or insert ignore . Have you read the documentation for pg_dump? http://www.postgresql.org/docs/9.3/static/app-pgdump.html --inserts Dump data as INSERT commands (rather than COPY). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non-PostgreSQL databases. However, since this option generates a separate command for each row, an error in reloading a row causes only that row to be lost rather than the entire table contents. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safe against column order changes, though even slower. Regards Jan -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin