diff options
| author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-10-14 15:00:55 -0300 |
|---|---|---|
| committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-10-14 15:00:55 -0300 |
| commit | 0eea8047bf0e15b402b951e383e39236bdfe57d5 (patch) | |
| tree | 450b0761bb6d674de42e9018ac38c1d5f40e11f3 /src/bin/pg_dump/pg_backup_db.h | |
| parent | e0d97d77bf0875e4d5cc7dedfe701d9999bf678c (diff) | |
| download | postgresql-0eea8047bf0e15b402b951e383e39236bdfe57d5.tar.gz | |
pg_dump: Reduce use of global variables
Most pg_dump.c global variables, which were passed down individually to
dumping routines, are now grouped as members of the new DumpOptions
struct, which is used as a local variable and passed down into routines
that need it. This helps future development efforts; in particular it
is said to enable a mode in which a parallel pg_dump run can output
multiple streams, and have them restored in parallel.
Also take the opportunity to clean up the pg_dump header files somewhat,
to avoid circularity.
Author: Joachim Wieland, revised by Álvaro Herrera
Reviewed by Peter Eisentraut
Diffstat (limited to 'src/bin/pg_dump/pg_backup_db.h')
| -rw-r--r-- | src/bin/pg_dump/pg_backup_db.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_backup_db.h b/src/bin/pg_dump/pg_backup_db.h index 2eea1c33eb..6408f144ea 100644 --- a/src/bin/pg_dump/pg_backup_db.h +++ b/src/bin/pg_dump/pg_backup_db.h @@ -8,17 +8,18 @@ #ifndef PG_BACKUP_DB_H #define PG_BACKUP_DB_H -#include "pg_backup_archiver.h" +#include "pg_backup.h" -extern int ExecuteSqlCommandBuf(ArchiveHandle *AH, const char *buf, size_t bufLen); + +extern int ExecuteSqlCommandBuf(Archive *AHX, const char *buf, size_t bufLen); extern void ExecuteSqlStatement(Archive *AHX, const char *query); extern PGresult *ExecuteSqlQuery(Archive *AHX, const char *query, ExecStatusType status); -extern void EndDBCopyMode(ArchiveHandle *AH, struct _tocEntry * te); +extern void EndDBCopyMode(Archive *AHX, const char *tocEntryTag); -extern void StartTransaction(ArchiveHandle *AH); -extern void CommitTransaction(ArchiveHandle *AH); +extern void StartTransaction(Archive *AHX); +extern void CommitTransaction(Archive *AHX); #endif |
