Re: pg_dump feature patch to allow selection of rows to - Mailing list pgsql-patches

From Neil Conway
Subject Re: pg_dump feature patch to allow selection of rows to
Date
Msg-id 4325C8FF.3000301@samurai.com
Whole thread Raw
In response to pg_dump feature patch to allow selection of rows to dump via where  (Seth Robertson <in-postgres@baka.org>)
Responses Re: pg_dump feature patch to allow selection of rows to  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Seth Robertson wrote:
> In order to support some automation, I needed the ability to pull out
> subsets of postgres tables in a format which could be loaded into
> other postgres databases.

One alternative would be using CREATE TABLE AS to create a separate
table containing the desired subset, and then using pg_dump to dump that
table.

> Instead of writing a utility to replicate the functionality in
> pg_dump, I created a new flag, --where, which allows you to postpend
> where (or order or limit or whatever) sql fragments at the end of the
> select done by pg_dump.

Neat, but IMHO too much of a kludge for mainline.

-Neil

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: Clarifying Autovacuum docs in the release notes
Next
From: Neil Conway
Date:
Subject: Re: SPI_getbinval() documentation correction