summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_dump.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-01-11 23:21:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-01-11 23:21:55 +0000
commit0e1a5075fdaec2f42f96cf2a1938c99fcc6b026c (patch)
tree512b09428119c689e738f47a041f0dce1293c8ac /src/bin/pg_dump/pg_dump.h
parent5c2d36c3ddf77de9151e579c358a066c9443762b (diff)
Fix pg_dump to read-lock all tables to be dumped as soon as it's read
their names from pg_class. This considerably reduces the window wherein someone could DROP or ALTER a table that pg_dump is intending to dump. Not a perfect solution, but definitely an improvement. Per complaints from Marc Fournier; patch by Brent Verner with some kibitzing by Tom Lane.
Diffstat (limited to 'src/bin/pg_dump/pg_dump.h')
-rw-r--r--src/bin/pg_dump/pg_dump.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h
index 3a59d5edf16..3af39b8d2e5 100644
--- a/src/bin/pg_dump/pg_dump.h
+++ b/src/bin/pg_dump/pg_dump.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_dump.h,v 1.76 2001/11/05 17:46:30 momjian Exp $
+ * $Id: pg_dump.h,v 1.77 2002/01/11 23:21:55 tgl Exp $
*
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
*
@@ -96,7 +96,9 @@ typedef struct _tableInfo
* constructed manually from rules, and
* rule may ref things created after the
* base table was created. */
- bool sequence;
+ char relkind;
+ bool sequence; /* this is redundant with relkind... */
+ bool hasindex; /* does it have any indexes? */
bool hasoids; /* does it have OIDs? */
int numatts; /* number of attributes */
int *inhAttrs; /* an array of flags, one for each
@@ -254,7 +256,8 @@ extern void clearOprInfo(OprInfo *, int);
extern void clearTypeInfo(TypeInfo *, int);
extern OprInfo *getOperators(int *numOperators);
-extern TableInfo *getTables(int *numTables, FuncInfo *finfo, int numFuncs);
+extern TableInfo *getTables(int *numTables, FuncInfo *finfo, int numFuncs,
+ const char* tablename);
extern InhInfo *getInherits(int *numInherits);
extern void getTableAttrs(TableInfo *tbinfo, int numTables);
extern IndInfo *getIndexes(int *numIndexes);