pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Surafel Temesgen <surafel3000@gmail.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pg_dump multi VALUES INSERT
Date: Thu, 7 Mar 2019 09:46:54 -0300
Message-ID: <20190307124653.GA13913@alvherre.pgsql> (raw)
In-Reply-To: <CAKJS1f8+K8SuhZ_DtKx98CQ=TZs6cqQFURka8=L5MgBoW37xKw@mail.gmail.com>

Pushed, thanks!

If anyone is feeling inspired, one additional test we could use is
--rows-per-insert together with --on-conflict-do-nothing.

I made a couple of edits to v17 before pushing,

* rename strtol endptr variable so that it can be used by other strtol
calls, if we ever have them

* use pre-increment in if() test rather than separate line with
post-increment; reduces line count by 2.

* reworded --help output to: "number of rows per INSERT; implies --inserts"

* added one row-ending archputs(")") which makes the repeated
statement-ending archputs() match exactly.  (Negligible slowdown, I
expect)

* moved DUMP_DEFAULT_ROWS_PER_INSERT to pg_dump.c from pg_dump.h

* there was a space-before-comma in an error message, even immortalized
in the test expected output.

* remove the rows_per_insert_zero_col dump output file; the test can be
done by adding the table to the rows_per_insert file.  Add one more row
to that zero-column table, so that the INSERT .. DEFAULT VALUES test
verifies the case with more than one row.

* changed the rows_per_insert to use 4 rows per insert rather than
three; that improves coverage (table had 9 rows so it was always hitting
the case where a full statement is emitted.)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (66+ messages)  latest in thread

Message-ID: <20190307124653.GA13913@alvherre.pgsql>
Permalink:  ../20190307124653.GA13913@alvherre.pgsql/
Also on:    postgresql.org/message-id/20190307124653.GA13913@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, david.rowley@2ndquadrant.com, coelho@cri.ensmp.fr, surafel3000@gmail.com, 9erthalion6@gmail.com
  Subject: Re: pg_dump multi VALUES INSERT
  In-Reply-To: <20190307124653.GA13913@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox