typedefenum _teSection
{
SECTION_NONE = 1, /* comments, ACLs, etc; can be anywhere */
SECTION_PRE_DATA, /* stuff to be processed before data */
SECTION_DATA, /* table data, large objects, LO comments */
SECTION_POST_DATA, /* stuff to be processed after data */
} teSection;
/* We need one enum entry per prepared query in pg_dump */ enum _dumpPreparedQueries
{
PREPQUERY_DUMPAGG,
PREPQUERY_DUMPBASETYPE,
PREPQUERY_DUMPCOMPOSITETYPE,
PREPQUERY_DUMPDOMAIN,
PREPQUERY_DUMPENUMTYPE,
PREPQUERY_DUMPFUNC,
PREPQUERY_DUMPOPR,
PREPQUERY_DUMPRANGETYPE,
PREPQUERY_DUMPTABLEATTACH,
PREPQUERY_GETATTRIBUTESTATS,
PREPQUERY_GETCOLUMNACLS,
PREPQUERY_GETDOMAINCONSTRAINTS,
};
/* Parameters needed by ConnectDatabase; same for dump and restore */ typedefstruct _connParams
{ /* These fields record the actual command line parameters */ char *dbname; /* this may be a connstring! */ char *pgport; char *pghost; char *username;
trivalue promptPassword; /* If not NULL, this overrides the dbname obtained from command line */ /* (but *only* the DB name, not anything else in the connstring) */ char *override_dbname;
} ConnParams;
typedefstruct _restoreOptions
{ int createDB; /* Issue commands to create the database */ int noOwner; /* Don't try to match original object owner */ int noTableAm; /* Don't issue table-AM-related commands */ int noTablespace; /* Don't issue tablespace-related commands */ int disable_triggers; /* disable triggers during data-only
* restore */ int use_setsessauth; /* Use SET SESSION AUTHORIZATION commands
* instead of OWNER TO */ char *superuser; /* Username to use as superuser */ char *use_role; /* Issue SET ROLE to this */ int dropSchema; int disable_dollar_quoting; int dump_inserts; /* 0 = COPY, otherwise rows per INSERT */ int column_inserts; int if_exists; int no_comments; /* Skip comments */ int no_policies; /* Skip row security policies */ int no_publications; /* Skip publication entries */ int no_security_labels; /* Skip security label entries */ int no_subscriptions; /* Skip subscription entries */ int strict_names;
constchar *filename; int dumpSections; int verbose; int aclsSkip; constchar *lockWaitTimeout; int include_everything;
int tocSummary; char *tocFile; int format; char *formatName;
int selTypes; int selIndex; int selFunction; int selTrigger; int selTable;
SimpleStringList indexNames;
SimpleStringList functionNames;
SimpleStringList schemaNames;
SimpleStringList schemaExcludeNames;
SimpleStringList triggerNames;
SimpleStringList tableNames;
int useDB;
ConnParams cparams; /* parameters to use if useDB */
int noDataForFailedTables; int exit_on_error;
pg_compress_specification compression_spec; /* Specification for
* compression */ int suppressDumpWarnings; /* Suppress output of WARNING entries
* to stderr */
bool single_txn; /* restore all TOCs in one transaction */ int txn_size; /* restore this many TOCs per txn, if > 0 */
bool *idWanted; /* array showing which dump IDs to emit */ int enable_row_security; int sequence_data; /* dump sequence data even in schema-only mode */ int binary_upgrade;
/* flags derived from the user-settable flags */ bool dumpSchema; bool dumpData; bool dumpStatistics;
char *restrict_key;
} RestoreOptions;
typedefstruct _dumpOptions
{
ConnParams cparams;
int binary_upgrade;
/* various user-settable parameters */ int dumpSections; /* bitmask of chosen sections */ bool aclsSkip; constchar *lockWaitTimeout; int dump_inserts; /* 0 = COPY, otherwise rows per INSERT */
/* flags for various command-line long options */ int disable_dollar_quoting; int column_inserts; int if_exists; int no_comments; int no_policies; /* Skip row security policies */ int no_publications; int no_security_labels; int no_subscriptions; int no_toast_compression; int no_unlogged_table_data; int serializable_deferrable; int disable_triggers; int outputNoTableAm; int outputNoTablespaces; int use_setsessauth; int enable_row_security; int load_via_partition_root;
/* default, if no "inclusion" switches appear, is to dump everything */ bool include_everything;
int outputClean; int outputCreateDB; bool outputLOs; bool dontOutputLOs; int outputNoOwner; char *outputSuperuser;
int sequence_data; /* dump sequence data even in schema-only mode */ int do_nothing;
/* flags derived from the user-settable flags */ bool dumpSchema; bool dumpData; bool dumpStatistics;
int verbose; char *remoteVersionStr; /* server's version string */ int remoteVersion; /* same in numeric form */ bool isStandby; /* is server a standby node */
int minRemoteVersion; /* allowable range */ int maxRemoteVersion;
int numWorkers; /* number of parallel processes */ char *sync_snapshot_id; /* sync snapshot id for parallel operation */
/* info needed for string escaping */ int encoding; /* libpq code for client_encoding */ bool std_strings; /* standard_conforming_strings */
/* other important stuff */ char *searchpath; /* search_path to set during restore */ char *use_role; /* Issue SET ROLE to this */
/* error handling */ bool exit_on_error; /* whether to exit on SQL errors... */ int n_errors; /* number of errors (if no die) */
/* prepared-query status */ bool *is_prepared; /* indexed by enum _dumpPreparedQueries */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.