Ah yes, thanks. I did in fact have colors enabled. I've attached a new patch generated by `git format-patch`. Hopefully that's correct.
On Mon, May 21, 2018 at 4:00 PM, Thomas Munro <thomas.mu...@enterprisedb.com > wrote: > On Tue, May 22, 2018 at 4:05 AM, Stephen Frost <sfr...@snowman.net> wrote: > > * Carter Thaxton (carter.thax...@gmail.com) wrote: > >> pg_dump --include-table-data-where=largetable:"created_at >= > >> '2018-05-01'" database_name > > > > I've wanted something similar to this in the past as well, and, as > > you've seen, we have some support for this kind of thing in pg_dump > > already and what you're doing is exposing that. > > +1 > > >> I've prepared a proposed patch for this, which is attached. The code > >> changes are rather straightforward. I did have to add the ability to > carry > >> around an extra pointer-sized object to the simple_list implementation, > in > >> order to allow the filter clause to be associated to the matching oids > of > >> the table pattern. It seemed the best way to augment the existing > >> simple_list implementation, but change as little as possible elsewhere > in > >> the codebase. (Note that SimpleOidList is actually only used by > pg_dump). > >> > >> Feel free to review and propose any amendments. > > > > I've only taken a quick look but I don't see any regression tests, for > > starters, and it's not clear if this can be passed multiple times for > > one pg_dump run (I'd certainly hope that it could be...). > > > > Also, if you haven't already, this should be registered on the > > commitfest app, so we don't lose track of it. > > Thanks for doing that. Unfortunately the patch seems to be corrupted > in some way, maybe ANSI control characters or something... perhaps you > set colour.ui = always in your git config, instead of auto? You might > also consider using git format-patch so you can include a brief commit > message that explains the feature. > > -- > Thomas Munro > http://www.enterprisedb.com >
pgdump-include-table-data-where-v2.patch
Description: Binary data