Re: pg_dump multi VALUES INSERT - Mailing list pgsql-hackers

From David Rowley
Subject Re: pg_dump multi VALUES INSERT
Date
Msg-id CAKJS1f9i9acpes7Q7rWKnfSjjwh81RmkxaH_tGsTd_2kgbLo1w@mail.gmail.com
Whole thread Raw
In response to Re: pg_dump multi VALUES INSERT  (Surafel Temesgen <surafel3000@gmail.com>)
Responses Re: pg_dump multi VALUES INSERT  (Surafel Temesgen <surafel3000@gmail.com>)
List pgsql-hackers
On Thu, 3 Jan 2019 at 01:50, Surafel Temesgen <surafel3000@gmail.com> wrote:
> 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.

> The attach patch contain a fix for it

+ /* if it is zero-column table then we're done */
+ if (nfields == 0)
+ {
+ archputs(insertStmt->data, fout);
+ continue;
+ }

So looks like you're falling back on one INSERT per row for this case.
Given that this function is meant to be doing 'dump_inserts_multiple'
INSERTs per row, I think the comment should give some details of why
we can't do multi-inserts, and explain the reason for it. "we're done"
is just not enough detail.

I've not looked at the rest of the patch.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is MinMaxExpr really leakproof?
Next
From: Alexey Bashtanov
Date:
Subject: Re: log bind parameter values on error