Re: pg_dump refactor patch to remove global variables - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pg_dump refactor patch to remove global variables
Date
Msg-id 20141008030539.GR7043@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: pg_dump refactor patch to remove global variables  (Joachim Wieland <joe@mcknight.de>)
List pgsql-hackers
Here's a rebased patch for this (I also pgindented it).

One thing I find a bit odd is the fact that we copy
RestoreOptions->superuser into DumpOptions->outputSuperuser (a char *
pointer) without pstrdup or similar.  We're already doing the inverse
elsewhere, and the uses of the routine where this is done are pretty
limited, so it seems harmless.  Still, it's pretty weird.  (Really,
the whole dumpOptionsFromRestoreOptions() business is odd.)

I'm not real happy with the forward struct declare in pg_backup.h, but I
think this is just general messiness in this code structure and not this
patch' fault.

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

Attachment

pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: PL/pgSQL 2
Next
From: Josh Berkus
Date:
Subject: Re: pgaudit - an auditing extension for PostgreSQL