Re: ArchiveEntry optional arguments refactoring

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Chapman Flack <chap@anastigmatix.net>, Amit Khandekar <amitdkhan.pg@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-02-01T11:43:23Z
Lists: pgsql-hackers
On 2019-Feb-01, Alvaro Herrera wrote:

> ... so this code
> 
> 		if (!ropt->noOwner)
> 			sanitized_owner = replace_line_endings(te->owner);
> 		else
> 			sanitized_owner = pg_strdup("-");
> 
> can become
> 		sanitized_owner = replace_line_endings(te->owner, true);

Sorry, there's a silly bug here because I picked the wrong example to
hand-type.  The proposed pattern works fine for the schema cases, not
for this owner case.  The owner case is correctly handled (AFAICT) in
the patch I posted.  (Also for some reason I decided to go with "hyphen"
instead of "dash" in the argument name.  Not sure if anybody cares
strongly about using the right terminology there (I don't know which it
is).

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


Commits

  1. Add ArchiveOpts to pass options to ArchiveEntry

  2. Remove WITH OIDS support, change oid catalog column visibility.