Skip site navigation (1) Skip section navigation (2)

pg_dump feature patch to allow selection of rows to dump via where

From: Seth Robertson <in-postgres(at)baka(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Subject: pg_dump feature patch to allow selection of rows to dump via where
Date: 2005-09-10 02:31:40
Message-ID: 200509100231.j8A2VeEL020435@not.baka.org (view raw or flat)
Thread:
Lists: pgsql-patches
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.  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.

You must use the --insert option with this so that it will generate
inserts (which is done via select) instead of copy (which is done via
copy).

You almost certain will need to also use the --table option since most
likely the sql fragment will only be valid for one table instead of
all tables.

I find it very useful and hope you do to.  This patch was created with
7.x postgresql, but if it doesn't apply cleanly against 8.x, I can
probably update it for you.

Responses

pgsql-patches by date

Next:From: Neil ConwayDate: 2005-09-11 21:21:40
Subject: docs: config chapter
Previous:From: David FetterDate: 2005-09-09 21:58:26
Subject: Caveat for Domains

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group