pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Reorder code in pg_dump to dump comments etc in a uniform order.
Date: Mon, 22 Jan 2018 17:37:15 +0000
Message-ID: <E1edg1z-00011y-73@gemulon.postgresql.org> (raw)

Reorder code in pg_dump to dump comments etc in a uniform order.

Most of the code in pg_dump dumps an object's comment, security label,
and ACL auxiliary TOC entries, in that order, immediately after the
object's main TOC entry, and at least dumpComment's API spec says this
isn't optional.  dumpDatabase was significantly violating that when
in binary-upgrade mode, by inserting totally unrelated stuff between.
Also, dumpForeignDataWrapper and dumpForeignServer were being randomly
inconsistent.  Reorder code so everybody does it the same.

This may be future-proofing us against some code growing a requirement for
such auxiliary entries to be adjacent to their main entry.  But for now
it's just neatnik-ism, so I see no need for back-patch.

Discussion: https://postgr.es/m/21714.1516553459@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d6c84667d130f19efdf0f04f7d52a6b37df0f21b

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 150 +++++++++++++++++++++++-----------------------
1 file changed, 75 insertions(+), 75 deletions(-)



Message-ID: <E1edg1z-00011y-73@gemulon.postgresql.org>
Permalink:  ../E1edg1z-00011y-73@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1edg1z-00011y-73@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Reorder code in pg_dump to dump comments etc in a uniform order.
  In-Reply-To: <E1edg1z-00011y-73@gemulon.postgresql.org>
  References: <E1edg1z-00011y-73@gemulon.postgresql.org>

* 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