aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-09-21 19:58:02 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-09-21 19:58:02 +0000
commitdbf952860e798133e2edc22a6caaf31f53b3e096 (patch)
treea6a9cca8a027fb61ab9625c8ba2252d2df49f6a3 /src
parentbc9d4ec9a117bb4cb6f1a137ad26d3f02055b96a (diff)
downloadpostgresql-dbf952860e798133e2edc22a6caaf31f53b3e096.tar.gz
postgresql-dbf952860e798133e2edc22a6caaf31f53b3e096.zip
Suppress database dump item when --table and/or --schema switch was
given, per gripe from Michael Fuhr.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index cc4a3eef4ba..c08999642fe 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -12,7 +12,7 @@
* by PostgreSQL
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.420 2005/09/05 23:50:48 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.421 2005/09/21 19:58:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -617,8 +617,8 @@ main(int argc, char **argv)
/* First the special encoding entry. */
dumpEncoding(g_fout);
- /* The database item is always second. */
- if (!dataOnly)
+ /* The database item is always second, unless we don't want it at all */
+ if (!dataOnly && selectTableName == NULL && selectSchemaName == NULL)
dumpDatabase(g_fout);
/* Now the rearrangeable objects. */