Re: pgdump with batch insert - Mailing list pgsql-admin

From Jan Lentfer
Subject Re: pgdump with batch insert
Date
Msg-id 3341486aeec8f791e6bb29e637319273@imap.lan.net
Whole thread Raw
In response to pgdump with batch insert  (Ankur Kaushik <ankurkaushik@gmail.com>)
List pgsql-admin
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



pgsql-admin by date:

Previous
From: Ankur Kaushik
Date:
Subject: pgdump with batch insert
Next
From: Jan Lentfer
Date:
Subject: Re: Maximum Availability Architecture(MAA) for PostgreSQL