PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include <unistd.h>
#include <ctype.h>
#include <limits.h>
#include "access/attnum.h"
#include "access/sysattr.h"
#include "access/transam.h"
#include "catalog/pg_aggregate_d.h"
#include "catalog/pg_am_d.h"
#include "catalog/pg_attribute_d.h"
#include "catalog/pg_authid_d.h"
#include "catalog/pg_cast_d.h"
#include "catalog/pg_class_d.h"
#include "catalog/pg_default_acl_d.h"
#include "catalog/pg_largeobject_d.h"
#include "catalog/pg_largeobject_metadata_d.h"
#include "catalog/pg_proc_d.h"
#include "catalog/pg_subscription.h"
#include "catalog/pg_trigger_d.h"
#include "catalog/pg_type_d.h"
#include "common/connect.h"
#include "common/relpath.h"
#include "compress_io.h"
#include "dumputils.h"
#include "fe_utils/option_utils.h"
#include "fe_utils/string_utils.h"
#include "getopt_long.h"
#include "libpq/libpq-fs.h"
#include "parallel.h"
#include "pg_backup_db.h"
#include "pg_backup_utils.h"
#include "pg_dump.h"
#include "storage/block.h"
Go to the source code of this file.
Data Structures | |
struct | RoleNameItem |
struct | CommentItem |
struct | SecLabelItem |
Macros | |
#define | DUMP_DEFAULT_ROWS_PER_INSERT 1 |
#define | fmtQualifiedDumpable(obj) |
Typedefs | |
typedef enum OidOptions | OidOptions |
Enumerations | |
enum | OidOptions { zeroIsError = 1 , zeroAsStar = 2 , zeroAsNone = 4 } |
Functions | |
static void | help (const char *progname) |
static void | setup_connection (Archive *AH, const char *dumpencoding, const char *dumpsnapshot, char *use_role) |
static ArchiveFormat | parseArchiveFormat (const char *format, ArchiveMode *mode) |
static void | expand_schema_name_patterns (Archive *fout, SimpleStringList *patterns, SimpleOidList *oids, bool strict_names) |
static void | expand_extension_name_patterns (Archive *fout, SimpleStringList *patterns, SimpleOidList *oids, bool strict_names) |
static void | expand_foreign_server_name_patterns (Archive *fout, SimpleStringList *patterns, SimpleOidList *oids) |
static void | expand_table_name_patterns (Archive *fout, SimpleStringList *patterns, SimpleOidList *oids, bool strict_names, bool with_child_tables) |
static void | prohibit_crossdb_refs (PGconn *conn, const char *dbname, const char *pattern) |
static NamespaceInfo * | findNamespace (Oid nsoid) |
static void | dumpTableData (Archive *fout, const TableDataInfo *tdinfo) |
static void | refreshMatViewData (Archive *fout, const TableDataInfo *tdinfo) |
static const char * | getRoleName (const char *roleoid_str) |
static void | collectRoleNames (Archive *fout) |
static void | getAdditionalACLs (Archive *fout) |
static void | dumpCommentExtended (Archive *fout, const char *type, const char *name, const char *namespace, const char *owner, CatalogId catalogId, int subid, DumpId dumpId, const char *initdb_comment) |
static void | dumpComment (Archive *fout, const char *type, const char *name, const char *namespace, const char *owner, CatalogId catalogId, int subid, DumpId dumpId) |
static int | findComments (Oid classoid, Oid objoid, CommentItem **items) |
static void | collectComments (Archive *fout) |
static void | dumpSecLabel (Archive *fout, const char *type, const char *name, const char *namespace, const char *owner, CatalogId catalogId, int subid, DumpId dumpId) |
static int | findSecLabels (Oid classoid, Oid objoid, SecLabelItem **items) |
static void | collectSecLabels (Archive *fout) |
static void | dumpDumpableObject (Archive *fout, DumpableObject *dobj) |
static void | dumpNamespace (Archive *fout, const NamespaceInfo *nspinfo) |
static void | dumpExtension (Archive *fout, const ExtensionInfo *extinfo) |
static void | dumpType (Archive *fout, const TypeInfo *tyinfo) |
static void | dumpBaseType (Archive *fout, const TypeInfo *tyinfo) |
static void | dumpEnumType (Archive *fout, const TypeInfo *tyinfo) |
static void | dumpRangeType (Archive *fout, const TypeInfo *tyinfo) |
static void | dumpUndefinedType (Archive *fout, const TypeInfo *tyinfo) |
static void | dumpDomain (Archive *fout, const TypeInfo *tyinfo) |
static void | dumpCompositeType (Archive *fout, const TypeInfo *tyinfo) |
static void | dumpCompositeTypeColComments (Archive *fout, const TypeInfo *tyinfo, PGresult *res) |
static void | dumpShellType (Archive *fout, const ShellTypeInfo *stinfo) |
static void | dumpProcLang (Archive *fout, const ProcLangInfo *plang) |
static void | dumpFunc (Archive *fout, const FuncInfo *finfo) |
static void | dumpCast (Archive *fout, const CastInfo *cast) |
static void | dumpTransform (Archive *fout, const TransformInfo *transform) |
static void | dumpOpr (Archive *fout, const OprInfo *oprinfo) |
static void | dumpAccessMethod (Archive *fout, const AccessMethodInfo *aminfo) |
static void | dumpOpclass (Archive *fout, const OpclassInfo *opcinfo) |
static void | dumpOpfamily (Archive *fout, const OpfamilyInfo *opfinfo) |
static void | dumpCollation (Archive *fout, const CollInfo *collinfo) |
static void | dumpConversion (Archive *fout, const ConvInfo *convinfo) |
static void | dumpRule (Archive *fout, const RuleInfo *rinfo) |
static void | dumpAgg (Archive *fout, const AggInfo *agginfo) |
static void | dumpTrigger (Archive *fout, const TriggerInfo *tginfo) |
static void | dumpEventTrigger (Archive *fout, const EventTriggerInfo *evtinfo) |
static void | dumpTable (Archive *fout, const TableInfo *tbinfo) |
static void | dumpTableSchema (Archive *fout, const TableInfo *tbinfo) |
static void | dumpTableAttach (Archive *fout, const TableAttachInfo *attachinfo) |
static void | dumpAttrDef (Archive *fout, const AttrDefInfo *adinfo) |
static void | dumpSequence (Archive *fout, const TableInfo *tbinfo) |
static void | dumpSequenceData (Archive *fout, const TableDataInfo *tdinfo) |
static void | dumpIndex (Archive *fout, const IndxInfo *indxinfo) |
static void | dumpIndexAttach (Archive *fout, const IndexAttachInfo *attachinfo) |
static void | dumpStatisticsExt (Archive *fout, const StatsExtInfo *statsextinfo) |
static void | dumpConstraint (Archive *fout, const ConstraintInfo *coninfo) |
static void | dumpTableConstraintComment (Archive *fout, const ConstraintInfo *coninfo) |
static void | dumpTSParser (Archive *fout, const TSParserInfo *prsinfo) |
static void | dumpTSDictionary (Archive *fout, const TSDictInfo *dictinfo) |
static void | dumpTSTemplate (Archive *fout, const TSTemplateInfo *tmplinfo) |
static void | dumpTSConfig (Archive *fout, const TSConfigInfo *cfginfo) |
static void | dumpForeignDataWrapper (Archive *fout, const FdwInfo *fdwinfo) |
static void | dumpForeignServer (Archive *fout, const ForeignServerInfo *srvinfo) |
static void | dumpUserMappings (Archive *fout, const char *servername, const char *namespace, const char *owner, CatalogId catalogId, DumpId dumpId) |
static void | dumpDefaultACL (Archive *fout, const DefaultACLInfo *daclinfo) |
static DumpId | dumpACL (Archive *fout, DumpId objDumpId, DumpId altDumpId, const char *type, const char *name, const char *subname, const char *nspname, const char *owner, const DumpableAcl *dacl) |
static void | getDependencies (Archive *fout) |
static void | BuildArchiveDependencies (Archive *fout) |
static void | findDumpableDependencies (ArchiveHandle *AH, const DumpableObject *dobj, DumpId **dependencies, int *nDeps, int *allocDeps) |
static DumpableObject * | createBoundaryObjects (void) |
static void | addBoundaryDependencies (DumpableObject **dobjs, int numObjs, DumpableObject *boundaryObjs) |
static void | addConstrChildIdxDeps (DumpableObject *dobj, const IndxInfo *refidx) |
static void | getDomainConstraints (Archive *fout, TypeInfo *tyinfo) |
static void | getTableData (DumpOptions *dopt, TableInfo *tblinfo, int numTables, char relkind) |
static void | makeTableDataInfo (DumpOptions *dopt, TableInfo *tbinfo) |
static void | buildMatViewRefreshDependencies (Archive *fout) |
static void | getTableDataFKConstraints (void) |
static char * | format_function_arguments (const FuncInfo *finfo, const char *funcargs, bool is_agg) |
static char * | format_function_signature (Archive *fout, const FuncInfo *finfo, bool honor_quotes) |
static char * | convertRegProcReference (const char *proc) |
static char * | getFormattedOperatorName (const char *oproid) |
static char * | convertTSFunction (Archive *fout, Oid funcOid) |
static const char * | getFormattedTypeName (Archive *fout, Oid oid, OidOptions opts) |
static void | getLOs (Archive *fout) |
static void | dumpLO (Archive *fout, const LoInfo *loinfo) |
static int | dumpLOs (Archive *fout, const void *arg) |
static void | dumpPolicy (Archive *fout, const PolicyInfo *polinfo) |
static void | dumpPublication (Archive *fout, const PublicationInfo *pubinfo) |
static void | dumpPublicationTable (Archive *fout, const PublicationRelInfo *pubrinfo) |
static void | dumpSubscription (Archive *fout, const SubscriptionInfo *subinfo) |
static void | dumpDatabase (Archive *fout) |
static void | dumpDatabaseConfig (Archive *AH, PQExpBuffer outbuf, const char *dbname, Oid dboid) |
static void | dumpEncoding (Archive *AH) |
static void | dumpStdStrings (Archive *AH) |
static void | dumpSearchPath (Archive *AH) |
static void | binary_upgrade_set_type_oids_by_type_oid (Archive *fout, PQExpBuffer upgrade_buffer, Oid pg_type_oid, bool force_array_type, bool include_multirange_type) |
static void | binary_upgrade_set_type_oids_by_rel (Archive *fout, PQExpBuffer upgrade_buffer, const TableInfo *tbinfo) |
static void | binary_upgrade_set_pg_class_oids (Archive *fout, PQExpBuffer upgrade_buffer, Oid pg_class_oid, bool is_index) |
static void | binary_upgrade_extension_member (PQExpBuffer upgrade_buffer, const DumpableObject *dobj, const char *objtype, const char *objname, const char *objnamespace) |
static const char * | getAttrName (int attrnum, const TableInfo *tblInfo) |
static const char * | fmtCopyColumnList (const TableInfo *ti, PQExpBuffer buffer) |
static bool | nonemptyReloptions (const char *reloptions) |
static void | appendReloptionsArrayAH (PQExpBuffer buffer, const char *reloptions, const char *prefix, Archive *fout) |
static char * | get_synchronized_snapshot (Archive *fout) |
static void | setupDumpWorker (Archive *AH) |
static TableInfo * | getRootTableInfo (const TableInfo *tbinfo) |
static bool | forcePartitionRootLoad (const TableInfo *tbinfo) |
int | main (int argc, char **argv) |
static bool | checkExtensionMembership (DumpableObject *dobj, Archive *fout) |
static void | selectDumpableNamespace (NamespaceInfo *nsinfo, Archive *fout) |
static void | selectDumpableTable (TableInfo *tbinfo, Archive *fout) |
static void | selectDumpableType (TypeInfo *tyinfo, Archive *fout) |
static void | selectDumpableDefaultACL (DefaultACLInfo *dinfo, DumpOptions *dopt) |
static void | selectDumpableCast (CastInfo *cast, Archive *fout) |
static void | selectDumpableProcLang (ProcLangInfo *plang, Archive *fout) |
static void | selectDumpableAccessMethod (AccessMethodInfo *method, Archive *fout) |
static void | selectDumpableExtension (ExtensionInfo *extinfo, DumpOptions *dopt) |
static void | selectDumpablePublicationObject (DumpableObject *dobj, Archive *fout) |
static void | selectDumpableObject (DumpableObject *dobj, Archive *fout) |
static int | dumpTableData_copy (Archive *fout, const void *dcontext) |
static int | dumpTableData_insert (Archive *fout, const void *dcontext) |
void | getPolicies (Archive *fout, TableInfo tblinfo[], int numTables) |
PublicationInfo * | getPublications (Archive *fout, int *numPublications) |
void | getPublicationNamespaces (Archive *fout) |
void | getPublicationTables (Archive *fout, TableInfo tblinfo[], int numTables) |
static void | dumpPublicationNamespace (Archive *fout, const PublicationSchemaInfo *pubsinfo) |
static bool | is_superuser (Archive *fout) |
void | getSubscriptions (Archive *fout) |
static void | append_depends_on_extension (Archive *fout, PQExpBuffer create, const DumpableObject *dobj, const char *catalog, const char *keyword, const char *objname) |
static Oid | get_next_possible_free_pg_type_oid (Archive *fout, PQExpBuffer upgrade_query) |
NamespaceInfo * | getNamespaces (Archive *fout, int *numNamespaces) |
ExtensionInfo * | getExtensions (Archive *fout, int *numExtensions) |
TypeInfo * | getTypes (Archive *fout, int *numTypes) |
OprInfo * | getOperators (Archive *fout, int *numOprs) |
CollInfo * | getCollations (Archive *fout, int *numCollations) |
ConvInfo * | getConversions (Archive *fout, int *numConversions) |
AccessMethodInfo * | getAccessMethods (Archive *fout, int *numAccessMethods) |
OpclassInfo * | getOpclasses (Archive *fout, int *numOpclasses) |
OpfamilyInfo * | getOpfamilies (Archive *fout, int *numOpfamilies) |
AggInfo * | getAggregates (Archive *fout, int *numAggs) |
FuncInfo * | getFuncs (Archive *fout, int *numFuncs) |
TableInfo * | getTables (Archive *fout, int *numTables) |
void | getOwnedSeqs (Archive *fout, TableInfo tblinfo[], int numTables) |
InhInfo * | getInherits (Archive *fout, int *numInherits) |
void | getPartitioningInfo (Archive *fout) |
void | getIndexes (Archive *fout, TableInfo tblinfo[], int numTables) |
void | getExtendedStatistics (Archive *fout) |
void | getConstraints (Archive *fout, TableInfo tblinfo[], int numTables) |
RuleInfo * | getRules (Archive *fout, int *numRules) |
void | getTriggers (Archive *fout, TableInfo tblinfo[], int numTables) |
EventTriggerInfo * | getEventTriggers (Archive *fout, int *numEventTriggers) |
ProcLangInfo * | getProcLangs (Archive *fout, int *numProcLangs) |
CastInfo * | getCasts (Archive *fout, int *numCasts) |
static char * | get_language_name (Archive *fout, Oid langid) |
TransformInfo * | getTransforms (Archive *fout, int *numTransforms) |
void | getTableAttrs (Archive *fout, TableInfo *tblinfo, int numTables) |
bool | shouldPrintColumn (const DumpOptions *dopt, const TableInfo *tbinfo, int colno) |
TSParserInfo * | getTSParsers (Archive *fout, int *numTSParsers) |
TSDictInfo * | getTSDictionaries (Archive *fout, int *numTSDicts) |
TSTemplateInfo * | getTSTemplates (Archive *fout, int *numTSTemplates) |
TSConfigInfo * | getTSConfigurations (Archive *fout, int *numTSConfigs) |
FdwInfo * | getForeignDataWrappers (Archive *fout, int *numForeignDataWrappers) |
ForeignServerInfo * | getForeignServers (Archive *fout, int *numForeignServers) |
DefaultACLInfo * | getDefaultACLs (Archive *fout, int *numDefaultACLs) |
static void | dumpTableComment (Archive *fout, const TableInfo *tbinfo, const char *reltypename) |
static char * | format_aggregate_signature (const AggInfo *agginfo, Archive *fout, bool honor_quotes) |
static void | dumpTableSecLabel (Archive *fout, const TableInfo *tbinfo, const char *reltypename) |
static PQExpBuffer | createViewAsClause (Archive *fout, const TableInfo *tbinfo) |
static PQExpBuffer | createDummyViewAsClause (Archive *fout, const TableInfo *tbinfo) |
void | getExtensionMembership (Archive *fout, ExtensionInfo extinfo[], int numExtensions) |
void | processExtensionTables (Archive *fout, ExtensionInfo extinfo[], int numExtensions) |
#define fmtQualifiedDumpable | ( | obj | ) |
typedef enum OidOptions OidOptions |
enum OidOptions |
|
static |
Definition at line 18153 of file pg_dump.c.
References addObjectDependency(), DO_ACCESS_METHOD, DO_AGG, DO_ATTRDEF, DO_CAST, DO_COLLATION, DO_CONSTRAINT, DO_CONVERSION, DO_DEFAULT_ACL, DO_DUMMY_TYPE, DO_EVENT_TRIGGER, DO_EXTENSION, DO_FDW, DO_FK_CONSTRAINT, DO_FOREIGN_SERVER, DO_FUNC, DO_INDEX, DO_INDEX_ATTACH, DO_LARGE_OBJECT, DO_LARGE_OBJECT_DATA, DO_NAMESPACE, DO_OPCLASS, DO_OPERATOR, DO_OPFAMILY, DO_POLICY, DO_POST_DATA_BOUNDARY, DO_PRE_DATA_BOUNDARY, DO_PROCLANG, DO_PUBLICATION, DO_PUBLICATION_REL, DO_PUBLICATION_TABLE_IN_SCHEMA, DO_REFRESH_MATVIEW, DO_RULE, DO_SEQUENCE_SET, DO_SHELL_TYPE, DO_STATSEXT, DO_SUBSCRIPTION, DO_TABLE, DO_TABLE_ATTACH, DO_TABLE_DATA, DO_TRANSFORM, DO_TRIGGER, DO_TSCONFIG, DO_TSDICT, DO_TSPARSER, DO_TSTEMPLATE, DO_TYPE, _dumpableObject::dumpId, i, and _dumpableObject::objType.
Referenced by main().
|
static |
Definition at line 7482 of file pg_dump.c.
References addObjectDependency(), Assert(), DO_FK_CONSTRAINT, _indexAttachInfo::dobj, _dumpableObject::dumpId, SimplePtrList::head, SimplePtrListCell::next, _dumpableObject::objType, _indxInfo::partattaches, _indexAttachInfo::partitionIdx, and SimplePtrListCell::ptr.
Referenced by getConstraints().
|
static |
Definition at line 4834 of file pg_dump.c.
References appendPQExpBuffer(), _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, _dumpableObject::depends_on_ext, destroyPQExpBuffer(), ExecuteSqlQuery(), fmtId(), i, CatalogId::oid, pg_free(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), and res.
Referenced by dumpConstraint(), dumpFunc(), dumpIndex(), dumpTableSchema(), and dumpTrigger().
|
static |
Definition at line 18469 of file pg_dump.c.
References appendReloptionsArray(), Archive::encoding, pg_log_warning, res, and Archive::std_strings.
Referenced by dumpConstraint(), dumpRule(), and dumpTableSchema().
|
static |
Definition at line 5123 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), _dumpableObject::dependencies, DO_EXTENSION, _dumpableObject::ext_member, findObjectByDumpId(), fmtId(), i, _dumpableObject::name, _dumpableObject::nDeps, _dumpableObject::objType, and pg_fatal.
Referenced by dumpAccessMethod(), dumpAgg(), dumpBaseType(), dumpCast(), dumpCollation(), dumpCompositeType(), dumpConversion(), dumpDomain(), dumpEnumType(), dumpEventTrigger(), dumpForeignDataWrapper(), dumpForeignServer(), dumpFunc(), dumpNamespace(), dumpOpclass(), dumpOpfamily(), dumpOpr(), dumpProcLang(), dumpRangeType(), dumpSequence(), dumpTableSchema(), dumpTransform(), dumpTSConfig(), dumpTSDictionary(), dumpTSParser(), dumpTSTemplate(), and dumpUndefinedType().
|
static |
Definition at line 5007 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), atooid, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), ExecuteSqlQueryForSingleRow(), OidIsValid, PQclear(), PQfnumber(), PQgetvalue(), and RelFileNumberIsValid.
Referenced by dumpCompositeType(), dumpConstraint(), dumpIndex(), dumpSequence(), and dumpTableSchema().
|
static |
Definition at line 4995 of file pg_dump.c.
References binary_upgrade_set_type_oids_by_type_oid(), OidIsValid, and _tableInfo::reltype.
Referenced by dumpTableSchema().
|
static |
Definition at line 4910 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), atooid, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), ExecuteSqlQueryForSingleRow(), get_next_possible_free_pg_type_oid(), OidIsValid, PQclear(), PQfnumber(), PQgetvalue(), printfPQExpBuffer(), Archive::remoteVersion, and res.
Referenced by binary_upgrade_set_type_oids_by_rel(), dumpBaseType(), dumpCompositeType(), dumpDomain(), dumpEnumType(), dumpRangeType(), dumpShellType(), and dumpUndefinedType().
|
static |
Definition at line 18268 of file pg_dump.c.
References _tocEntry::dependencies, _tocEntry::dumpId, findDumpableDependencies(), findObjectByDumpId(), free, _tocEntry::nDeps, _dumpableObject::nDeps, _tocEntry::next, pg_malloc(), pg_realloc(), _tocEntry::reqs, and _archiveHandle::toc.
Referenced by main().
|
static |
Definition at line 2772 of file pg_dump.c.
References addObjectDependency(), appendPQExpBufferStr(), Assert(), atooid, CppAsString2, createPQExpBuffer(), PQExpBufferData::data, _tableInfo::dataObj, destroyPQExpBuffer(), DO_REFRESH_MATVIEW, DO_TABLE, _dumpableObject::dumpId, ExecuteSqlQuery(), findObjectByCatalogId(), i, if(), _dumpableObject::objType, CatalogId::oid, PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), _tableInfo::relispopulated, _tableInfo::relkind, Archive::remoteVersion, res, and CatalogId::tableoid.
Referenced by main().
|
static |
Definition at line 1662 of file pg_dump.c.
References addObjectDependency(), _dumpOptions::binary_upgrade, _dumpableObject::catId, _extensionInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_ACL, DUMP_COMPONENT_NONE, DUMP_COMPONENT_POLICY, DUMP_COMPONENT_SECLABEL, _dumpableObject::dump_contains, _dumpableObject::dumpId, _dumpableObject::ext_member, findOwningExtension(), and Archive::remoteVersion.
Referenced by selectDumpableAccessMethod(), selectDumpableCast(), selectDumpableNamespace(), selectDumpableObject(), selectDumpableProcLang(), selectDumpablePublicationObject(), selectDumpableTable(), and selectDumpableType().
|
static |
Definition at line 9981 of file pg_dump.c.
References appendPQExpBufferStr(), atooid, _dumpableObject::catId, CommentItem::classoid, comments, _dumpableObject::components, createPQExpBuffer(), PQExpBufferData::data, CommentItem::descr, destroyPQExpBuffer(), DO_TABLE, _typeInfo::dobj, DUMP_COMPONENT_COMMENT, ExecuteSqlQuery(), findObjectByCatalogId(), findTypeByOid(), i, ncomments, CommentItem::objoid, CommentItem::objsubid, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), res, and CatalogId::tableoid.
Referenced by main().
|
static |
Definition at line 9526 of file pg_dump.c.
References atooid, ExecuteSqlQuery(), i, nrolenames, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQgetvalue(), PQntuples(), res, RoleNameItem::rolename, rolenames, and RoleNameItem::roleoid.
Referenced by main().
|
static |
Definition at line 15058 of file pg_dump.c.
References appendPQExpBufferStr(), atooid, _dumpableObject::catId, SecLabelItem::classoid, _dumpableObject::components, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), DO_TABLE, _typeInfo::dobj, DUMP_COMPONENT_SECLABEL, ExecuteSqlQuery(), findObjectByCatalogId(), findTypeByOid(), i, SecLabelItem::label, nseclabels, SecLabelItem::objoid, SecLabelItem::objsubid, _dumpableObject::objType, CatalogId::oid, pg_malloc(), pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), SecLabelItem::provider, res, seclabels, and CatalogId::tableoid.
Referenced by main().
|
static |
Definition at line 12663 of file pg_dump.c.
References name, and pg_strdup().
Referenced by dumpOpr().
Definition at line 12734 of file pg_dump.c.
References ExecuteSqlQueryForSingleRow(), pg_strdup(), PQclear(), PQgetvalue(), res, and snprintf.
Referenced by dumpTSParser(), and dumpTSTemplate().
|
static |
Definition at line 18129 of file pg_dump.c.
References AssignDumpId(), _dumpableObject::catId, DO_POST_DATA_BOUNDARY, DO_PRE_DATA_BOUNDARY, _dumpableObject::name, nilCatalogId, _dumpableObject::objType, pg_malloc(), and pg_strdup().
Referenced by main().
|
static |
Definition at line 15333 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), _tableInfo::attcollation, _tableInfo::attnames, _tableInfo::atttypnames, createPQExpBuffer(), findCollationByOid(), fmtId(), fmtQualifiedDumpable, j, _tableInfo::numatts, and OidIsValid.
Referenced by dumpRule(), and dumpTableSchema().
|
static |
Definition at line 15284 of file pg_dump.c.
References appendBinaryPQExpBuffer(), appendPQExpBuffer(), Assert(), _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), _tableInfo::dobj, ExecuteSqlQuery(), len, _dumpableObject::name, CatalogId::oid, pg_fatal, PGRES_TUPLES_OK, PQclear(), PQgetlength(), PQgetvalue(), PQntuples(), and res.
Referenced by dumpRule(), and dumpTableSchema().
|
static |
Definition at line 12756 of file pg_dump.c.
References _accessMethodInfo::amhandler, _accessMethodInfo::amtype, appendPQExpBuffer(), appendPQExpBufferStr(), ARCHIVE_OPTS, ArchiveEntry(), _dumpOptions::binary_upgrade, binary_upgrade_extension_member(), _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, _dumpOptions::dataOnly, destroyPQExpBuffer(), _accessMethodInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_COMMENT, DUMP_COMPONENT_DEFINITION, dumpComment(), _dumpableObject::dumpId, fmtId(), free, _dumpableObject::name, pg_log_warning, pg_strdup(), and SECTION_PRE_DATA.
Referenced by dumpDumpableObject().
|
static |
Definition at line 14691 of file pg_dump.c.
References _dumpableAcl::acl, acldefault(), _dumpableAcl::acldefault, _dumpOptions::aclsSkip, appendPQExpBuffer(), appendPQExpBufferStr(), ARCHIVE_OPTS, ArchiveEntry(), _dumpOptions::binary_upgrade, buildACLCommands(), createDumpId(), createPQExpBuffer(), PQExpBufferData::data, _dumpOptions::dataOnly, destroyPQExpBuffer(), Archive::dopt, _dumpableAcl::initprivs, InvalidDumpId, PQExpBufferData::len, name, nilCatalogId, pg_fatal, _dumpableAcl::privtype, Archive::remoteVersion, SECTION_NONE, subname, and generate_unaccent_rules::type.
Referenced by dumpAgg(), dumpBaseType(), dumpCompositeType(), dumpDatabase(), dumpDomain(), dumpEnumType(), dumpForeignDataWrapper(), dumpForeignServer(), dumpFunc(), dumpLO(), dumpNamespace(), dumpProcLang(), dumpRangeType(), dumpTable(), and dumpUndefinedType().
Definition at line 13658 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), appendStringLiteralAH, ARCHIVE_OPTS, ArchiveEntry(), _dumpOptions::binary_upgrade, binary_upgrade_extension_member(), createPQExpBuffer(), PQExpBufferData::data, _dumpOptions::dataOnly, destroyPQExpBuffer(), Archive::dopt, DUMP_COMPONENT_ACL, DUMP_COMPONENT_COMMENT, DUMP_COMPONENT_DEFINITION, DUMP_COMPONENT_SECLABEL, dumpACL(), dumpComment(), dumpSecLabel(), ExecuteSqlQueryForSingleRow(), ExecuteSqlStatement(), fmtId(), format_aggregate_signature(), format_function_arguments(), format_function_signature(), free, getFormattedOperatorName(), InvalidDumpId, Archive::is_prepared, pg_fatal, PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PREPQUERY_DUMPAGG, printfPQExpBuffer(), Archive::remoteVersion, res, and SECTION_PRE_DATA.
Referenced by dumpDumpableObject().
|
static |
Definition at line 16239 of file pg_dump.c.
References _attrDefInfo::adef_expr, _attrDefInfo::adnum, _attrDefInfo::adtable, appendPQExpBuffer(), ARCHIVE_OPTS, ArchiveEntry(), _tableInfo::attnames, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, _dumpOptions::dataOnly, destroyPQExpBuffer(), _tableInfo::dobj, _attrDefInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_DEFINITION, _dumpableObject::dumpId, fmtId(), fmtQualifiedDumpable, free, _dumpableObject::name, pg_strdup(), psprintf(), _tableInfo::relkind, _tableInfo::rolname, SECTION_PRE_DATA, and _attrDefInfo::separate.
Referenced by dumpDumpableObject().
Definition at line 10848 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), appendStringLiteralAH, ARCHIVE_OPTS, ArchiveEntry(), atooid, _dumpOptions::binary_upgrade, binary_upgrade_extension_member(), binary_upgrade_set_type_oids_by_type_oid(), _dumpableObject::catId, createPQExpBuffer(), _typeInfo::dacl, PQExpBufferData::data, destroyPQExpBuffer(), _typeInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_ACL, DUMP_COMPONENT_COMMENT, DUMP_COMPONENT_DEFINITION, DUMP_COMPONENT_SECLABEL, dumpACL(), dumpComment(), _dumpableObject::dumpId, dumpSecLabel(), ExecuteSqlQueryForSingleRow(), ExecuteSqlStatement(), fmtId(), fmtQualifiedDumpable, free, getFormattedTypeName(), InvalidDumpId, Archive::is_prepared, _dumpableObject::name, CatalogId::oid, OidIsValid, pg_strdup(), PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PREPQUERY_DUMPBASETYPE, printfPQExpBuffer(), Archive::remoteVersion, res, _typeInfo::rolname, SECTION_PRE_DATA, typalign, _typeInfo::typelem, and zeroIsError.
Referenced by dumpType().
Definition at line 12210 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), ARCHIVE_OPTS, ArchiveEntry(), _dumpOptions::binary_upgrade, binary_upgrade_extension_member(), _castInfo::castcontext, _castInfo::castfunc, _castInfo::castmethod, _castInfo::castsource, _castInfo::casttarget, _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, _dumpOptions::dataOnly, destroyPQExpBuffer(), _funcInfo::dobj, _castInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_COMMENT, DUMP_COMPONENT_DEFINITION, dumpComment(), _dumpableObject::dumpId, findFuncByOid(), fmtId(), format_function_signature(), free, getFormattedTypeName(), _dumpableObject::name, OidIsValid, pg_fatal, pg_log_warning, SECTION_PRE_DATA, and zeroAsNone.
Referenced by dumpDumpableObject().
Definition at line 13324 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), appendStringLiteralAH, ARCHIVE_OPTS, ArchiveEntry(), Assert(), _dumpOptions::binary_upgrade, binary_upgrade_extension_member(), _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, _dumpOptions::dataOnly, destroyPQExpBuffer(), _collInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_COMMENT, DUMP_COMPONENT_DEFINITION, dumpComment(), _dumpableObject::dumpId, ExecuteSqlQueryForSingleRow(), fmtId(), fmtQualifiedDumpable, free, _dumpableObject::name, CatalogId::oid, pg_fatal, pg_strdup(), PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), Archive::remoteVersion, res, _collInfo::rolname, and SECTION_PRE_DATA.
Referenced by dumpDumpableObject().
|
inlinestatic |
Definition at line 9790 of file pg_dump.c.
References dumpCommentExtended(), name, and generate_unaccent_rules::type.
Referenced by dumpAccessMethod(), dumpAgg(), dumpBaseType(), dumpCast(), dumpCollation(), dumpCompositeType(), dumpConversion(), dumpDomain(), dumpEnumType(), dumpEventTrigger(), dumpExtension(), dumpForeignDataWrapper(), dumpForeignServer(), dumpFunc(), dumpIndex(), dumpLO(), dumpOpclass(), dumpOpfamily(), dumpOpr(), dumpPolicy(), dumpProcLang(), dumpPublication(), dumpRangeType(), dumpRule(), dumpSequence(), dumpStatisticsExt(), dumpSubscription(), dumpTableConstraintComment(), dumpTransform(), dumpTrigger(), dumpTSConfig(), dumpTSDictionary(), dumpTSParser(), dumpTSTemplate(), and dumpUndefinedType().
|
static |
Definition at line 9690 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), appendStringLiteralAH, ARCHIVE_OPTS, ArchiveEntry(), _dumpOptions::binary_upgrade, comments, createDumpId(), createPQExpBuffer(), PQExpBufferData::data, _dumpOptions::dataOnly, CommentItem::descr, destroyPQExpBuffer(), Archive::dopt, findComments(), fmtId(), name, ncomments, nilCatalogId, _dumpOptions::no_comments, CommentItem::objsubid, CatalogId::oid, _dumpOptions::schemaOnly, SECTION_NONE, CatalogId::tableoid, and generate_unaccent_rules::type.
Referenced by dumpComment(), and dumpNamespace().
Definition at line 11270 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), appendStringLiteralAH, ARCHIVE_OPTS, ArchiveEntry(), atooid, attalign, attlen, attname, _dumpOptions::binary_upgrade, binary_upgrade_extension_member(), binary_upgrade_set_pg_class_oids(), binary_upgrade_set_type_oids_by_type_oid(), _dumpableObject::catId, createPQExpBuffer(), _typeInfo::dacl, PQExpBufferData::data, destroyPQExpBuffer(), _typeInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_ACL, DUMP_COMPONENT_COMMENT, DUMP_COMPONENT_DEFINITION, DUMP_COMPONENT_SECLABEL, dumpACL(), dumpComment(), dumpCompositeTypeColComments(), _dumpableObject::dumpId, dumpSecLabel(), ExecuteSqlQuery(), ExecuteSqlStatement(), findCollationByOid(), fmtId(), fmtQualifiedDumpable, free, i, InvalidDumpId, Archive::is_prepared, _dumpableObject::name, CatalogId::oid, OidIsValid, pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetvalue(), PQntuples(), PREPQUERY_DUMPCOMPOSITETYPE, printfPQExpBuffer(), res, _typeInfo::rolname, SECTION_PRE_DATA, and _typeInfo::typrelid.
Referenced by dumpType().
|
static |
Definition at line 11476 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), appendStringLiteralAH, ARCHIVE_OPTS, ArchiveEntry(), attname, comments, createDumpId(), createPQExpBuffer(), PQExpBufferData::data, CommentItem::descr, destroyPQExpBuffer(), _typeInfo::dobj, Archive::dopt, _dumpableObject::dumpId, findComments(), fmtId(), fmtQualifiedDumpable, i, _dumpableObject::name, ncomments, nilCatalogId, _dumpOptions::no_comments, CommentItem::objsubid, PQfnumber(), PQgetvalue(), PQntuples(), res, resetPQExpBuffer(), _typeInfo::rolname, SECTION_NONE, and _typeInfo::typrelid.
Referenced by dumpCompositeType().
|
static |
Definition at line 16587 of file pg_dump.c.
References append_depends_on_extension(), appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), appendReloptionsArrayAH(), ARCHIVE_OPTS, ArchiveEntry(), attname, _dumpOptions::binary_upgrade, binary_upgrade_set_pg_class_oids(), _dumpableObject::catId, _constraintInfo::condef, _constraintInfo::condeferrable, _constraintInfo::condeferred, _constraintInfo::condomain, _constraintInfo::conindex, _constraintInfo::conislocal, _constraintInfo::contable, _constraintInfo::contype, createPQExpBuffer(), PQExpBufferData::data, _dumpOptions::dataOnly, destroyPQExpBuffer(), _typeInfo::dobj, _tableInfo::dobj, _indxInfo::dobj, _constraintInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_COMMENT, DUMP_COMPONENT_DEFINITION, _dumpableObject::dumpId, dumpTableConstraintComment(), findObjectByDumpId(), fmtId(), fmtQualifiedDumpable, free, getAttrName(), if(), _indxInfo::indisclustered, _indxInfo::indisreplident, _indxInfo::indkeys, _indxInfo::indnattrs, _indxInfo::indnkeyattrs, _indxInfo::indnullsnotdistinct, _indxInfo::indreloptions, InvalidAttrNumber, _dumpableObject::name, nonemptyReloptions(), CatalogId::oid, pg_fatal, psprintf(), _tableInfo::relkind, _typeInfo::rolname, _tableInfo::rolname, SECTION_POST_DATA, _constraintInfo::separate, and _indxInfo::tablespace.
Referenced by dumpDumpableObject().
Definition at line 13530 of file pg_dump.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), appendStringLiteralAH, ARCHIVE_OPTS, ArchiveEntry(), _dumpOptions::binary_upgrade, binary_upgrade_extension_member(), _dumpableObject::catId, createPQExpBuffer(), PQExpBufferData::data, _dumpOptions::dataOnly, destroyPQExpBuffer(), _convInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_COMMENT, DUMP_COMPONENT_DEFINITION, dumpComment(), _dumpableObject::dumpId, ExecuteSqlQueryForSingleRow(), fmtId(), fmtQualifiedDumpable, free, _dumpableObject::name, CatalogId::oid, pg_strdup(), PQclear(), PQfnumber(), PQgetvalue(), res, _convInfo::rolname, and SECTION_PRE_DATA.
Referenced by dumpDumpableObject().
|
static |
Definition at line 2928 of file pg_dump.c.
References _dumpableAcl::acl, _dumpableAcl::acldefault, appendPQExpBuffer(), appendPQExpBufferStr(), appendStringLiteralAH, ARCHIVE_OPTS, ArchiveEntry(), atooid, _dumpOptions::binary_upgrade, buildShSecLabelQuery(), comment, conn, createDumpId(), createPQExpBuffer(), PQExpBufferData::data, datconnlimit, datistemplate, datlocprovider, datname, destroyPQExpBuffer(), Archive::dopt, dumpACL(), dumpDatabaseConfig(), emitShSecLabels(), encoding, ExecuteSqlQuery(), ExecuteSqlQueryForSingleRow(), fmtId(), free, GetConnection(), getRoleName(), i, _dumpableAcl::initprivs, InvalidDumpId, PQExpBufferData::len, nilCatalogId, _dumpOptions::no_comments, _dumpOptions::no_security_labels, CatalogId::oid, _dumpOptions::outputNoTablespaces, pg_fatal, pg_log_info, pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQfnumber(), PQgetisnull(), PQgetvalue(), PQntuples(), _dumpableAcl::privtype, Archive::remoteVersion, res, resetPQExpBuffer(), SECTION_NONE, SECTION_PRE_DATA, CatalogId::tableoid, and tablespace.
Referenced by main().
|
static |
Definition at line 3380 of file pg_dump.c.
References buf, conn, createPQExpBuffer(), dbname, destroyPQExpBuffer(), ExecuteSqlQuery(), GetConnection(), i, makeAlterConfigCommand(), PGRES_TUPLES_OK, PQclear(), PQgetvalue(), PQntuples(), printfPQExpBuffer(), and res.
Referenced by dumpDatabase().
|
static |
Definition at line 14604 of file pg_dump.c.
References _dumpableAcl::acl, _dumpableAcl::acldefault, _dumpOptions::aclsSkip, appendPQExpBuffer(), ARCHIVE_OPTS, ArchiveEntry(), buildDefaultACLCommands(), _dumpableObject::catId, createPQExpBuffer(), _defaultACLInfo::dacl, PQExpBufferData::data, _dumpOptions::dataOnly, _defaultACLInfo::defaclobjtype, _defaultACLInfo::defaclrole, destroyPQExpBuffer(), _defaultACLInfo::dobj, Archive::dopt, _dumpableObject::dump, DUMP_COMPONENT_ACL, _dumpableObject::dumpId, _dumpableObject::name, pg_fatal, Archive::remoteVersion, SECTION_POST_DATA, and generate_unaccent_rules::type.
Referenced by dumpDumpableObject().