Re: pg_dump multi VALUES INSERT

Surafel Temsgen <surafel3000@gmail.com>

From: Surafel Temesgen <surafel3000@gmail.com>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>, Dmitry Dolgov <9erthalion6@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-01-02T12:50:24Z
Lists: pgsql-hackers

Attachments

Hi,
Thank you for looking at it
On Mon, Dec 31, 2018 at 12:38 PM David Rowley <david.rowley@2ndquadrant.com>
wrote:

> Just looking at the v5 patch, it seems not to handle 0 column tables
> correctly.
>
> For example:
>
> # create table t();
> # insert into t default values;
> # insert into t default values;
>
> $ pg_dump --table t --inserts --insert-multi=100 postgres > dump.sql
>
> # \i dump.sql
> [...]
> INSERT 0 1
> psql:dump.sql:35: ERROR:  syntax error at or near ")"
> LINE 1: );
>         ^
>

The attach patch contain a fix for it
Regards
Surafel

Commits

  1. Add pg_dumpall --rows-per-insert

  2. pg_dump: allow multiple rows per insert