typedefstruct _dumpableObject
{
DumpableObjectType objType;
CatalogId catId; /* zero if not a cataloged object */
DumpId dumpId; /* assigned by AssignDumpId() */ char *name; /* object name (should never be NULL) */ struct _namespaceInfo *namespace; /* containing namespace, or NULL */
DumpComponents dump; /* bitmask of components requested to dump */
DumpComponents dump_contains; /* as above, but for contained objects */
DumpComponents components; /* bitmask of components available to dump */ bool ext_member; /* true if object is member of extension */ bool depends_on_ext; /* true if object depends on an extension */
DumpId *dependencies; /* dumpIds of objects this one depends on */ int nDeps; /* number of valid dependencies */ int allocDeps; /* allocated size of dependencies[] */
} DumpableObject;
/* *ObjecttypesthathaveACLsmuststoretheminaDumpableAclsub-struct, *whichmustimmediatelyfollowtheDumpableObjectbasestruct.
*/ typedefstruct _dumpableAcl
{ char *acl; /* the object's actual ACL string */ char *acldefault; /* default ACL for the object's type & owner */ /* these fields come from the object's pg_init_privs entry, if any: */ char privtype; /* entry type, 'i' or 'e'; 0 if no entry */ char *initprivs; /* the object's initial ACL string, or NULL */
} DumpableAcl;
/* Generic struct that can be used to access any object type having an ACL */ typedefstruct _dumpableObjectWithAcl
{
DumpableObject dobj;
DumpableAcl dacl;
} DumpableObjectWithAcl;
typedefstruct _namespaceInfo
{
DumpableObject dobj;
DumpableAcl dacl; bool create; /* CREATE SCHEMA, or just set owner? */
Oid nspowner; /* OID of owner */ constchar *rolname; /* name of owner */
} NamespaceInfo;
/* *Note:dobj.nameistherawpg_type.typnameentry.ftypnameisthe *resultofformat_type(),whichwillbequotedifneeded,andmightbe *schema-qualifiedtoo.
*/ char *ftypname; constchar *rolname;
Oid typelem;
Oid typrelid;
Oid typarray; char typrelkind; /* 'r', 'v', 'c', etc */ char typtype; /* 'b', 'c', etc */ bool isArray; /* true if auto-generated array type */ bool isMultirange; /* true if auto-generated multirange type */ bool isDefined; /* true if typisdefined */ /* If needed, we'll create a "shell type" entry for it; link that here: */ struct _shellTypeInfo *shellType; /* shell-type entry, or NULL */ /* If it's a domain, its not-null constraint is here: */ struct _constraintInfo *notnull; /* If it's a domain, we store links to its CHECK constraints here: */ int nDomChecks; struct _constraintInfo *domChecks;
} TypeInfo;
TypeInfo *baseType; /* back link to associated base type */
} ShellTypeInfo;
typedefstruct _funcInfo
{
DumpableObject dobj;
DumpableAcl dacl; constchar *rolname;
Oid lang; int nargs;
Oid *argtypes;
Oid prorettype; bool postponed_def; /* function must be postponed into post-data */
} FuncInfo;
/* AggInfo is a superset of FuncInfo */ typedefstruct _aggInfo
{
FuncInfo aggfn; /* we don't require any other fields at the moment */
} AggInfo;
typedefstruct _oprInfo
{
DumpableObject dobj; constchar *rolname; char oprkind;
Oid oprleft;
Oid oprright;
Oid oprcode;
} OprInfo;
typedefstruct _tableInfo
{ /* *Thesefieldsarecollectedforeverytableinthedatabase.
*/
DumpableObject dobj;
DumpableAcl dacl; constchar *rolname; char relkind; char relpersistence; /* relation persistence */ bool relispopulated; /* relation is populated */ char relreplident; /* replica identifier */ char *reltablespace; /* relation tablespace */ char *reloptions; /* options specified by WITH (...) */ char *checkoption; /* WITH CHECK OPTION, if any */ char *toast_reloptions; /* WITH options for the TOAST table */ bool hasindex; /* does it have any indexes? */ bool hasrules; /* does it have any rules? */ bool hastriggers; /* does it have any triggers? */ bool hascolumnACLs; /* do any columns have non-default ACLs? */ bool rowsec; /* is row security enabled? */ bool forcerowsec; /* is row security forced? */ bool hasoids; /* does it have OIDs? */
uint32 frozenxid; /* table's relfrozenxid */
uint32 minmxid; /* table's relminmxid */
Oid toast_oid; /* toast table's OID, or 0 if none */
uint32 toast_frozenxid; /* toast table's relfrozenxid, if any */
uint32 toast_minmxid; /* toast table's relminmxid */ int ncheck; /* # of CHECK expressions */
Oid reltype; /* OID of table's composite type, if any */
Oid reloftype; /* underlying type for typed table */
Oid foreign_server; /* foreign server oid, if applicable */ /* these two are set only if table is a sequence owned by a column: */
Oid owning_tab; /* OID of table owning sequence */ int owning_col; /* attr # of column owning sequence */ bool is_identity_sequence;
int32 relpages; /* table's size in pages (from pg_class) */ int toastpages; /* toast table's size in pages, if any */
bool interesting; /* true if need to collect more data */ bool dummy_view; /* view's real definition must be postponed */ bool postponed_def; /* matview must be postponed into post-data */ bool ispartition; /* is table a partition? */ bool unsafe_partitions; /* is it an unsafe partitioned table? */
int numParents; /* number of (immediate) parent tables */ struct _tableInfo **parents; /* TableInfos of immediate parents */
/* *Thesefieldsarecomputedonlyifwedecidethetableisinteresting *(it'seitheratabletodump,oradirectparentofadumpabletable).
*/ int numatts; /* number of attributes */ char **attnames; /* the attribute names */ char **atttypnames; /* attribute type names */ int *attstattarget; /* attribute statistics targets */ char *attstorage; /* attribute storage scheme */ char *typstorage; /* type storage scheme */ bool *attisdropped; /* true if attr is dropped; don't dump it */ char *attidentity; char *attgenerated; int *attlen; /* attribute length, used by binary_upgrade */ char *attalign; /* attribute align, used by binary_upgrade */ bool *attislocal; /* true if attr has local definition */ char **attoptions; /* per-attribute options */
Oid *attcollation; /* per-attribute collation selection */ char *attcompression; /* per-attribute compression method */ char **attfdwoptions; /* per-attribute fdw options */ char **attmissingval; /* per attribute missing value */ char **notnull_constrs; /* NOT NULL constraint names. If null, *thereisn'toneonthiscolumn.If *emptystring,unnamedconstraint
* (pre-v17) */ char **notnull_comment; /* comment thereof */ bool *notnull_invalid; /* true for NOT NULL NOT VALID */ bool *notnull_noinh; /* NOT NULL is NO INHERIT */ bool *notnull_islocal; /* true if NOT NULL has local definition */ struct _attrDefInfo **attrdefs; /* DEFAULT expressions */ struct _constraintInfo *checkexprs; /* CHECK constraints */ struct _relStatsInfo *stats; /* only set for matviews */ bool needs_override; /* has GENERATED ALWAYS AS IDENTITY */ char *amname; /* relation access method */
/* *Stuffcomputedonlyfordumpabletables.
*/ int numIndexes; /* number of indexes */ struct _indxInfo *indexes; /* indexes */ struct _tableDataInfo *dataObj; /* TableDataInfo, if dumping its data */ int numTriggers; /* number of triggers for table */ struct _triggerInfo *triggers; /* array of TriggerInfo structs */
} TableInfo;
typedefstruct _tableAttachInfo
{
DumpableObject dobj;
TableInfo *parentTbl; /* link to partitioned table */
TableInfo *partitionTbl; /* link to partition */
} TableAttachInfo;
typedefstruct _attrDefInfo
{
DumpableObject dobj; /* note: dobj.name is name of table */
TableInfo *adtable; /* link to table of attribute */ int adnum; char *adef_expr; /* decompiled DEFAULT expression */ bool separate; /* true if must dump as separate item */
} AttrDefInfo;
typedefstruct _tableDataInfo
{
DumpableObject dobj;
TableInfo *tdtable; /* link to table to dump */ char *filtercond; /* WHERE condition to limit rows dumped */
} TableDataInfo;
typedefstruct _indxInfo
{
DumpableObject dobj;
TableInfo *indextable; /* link to table the index is for */ char *indexdef; char *tablespace; /* tablespace in which index is stored */ char *indreloptions; /* options specified by WITH (...) */ char *indstatcols; /* column numbers with statistics */ char *indstatvals; /* statistic values for columns */ int indnkeyattrs; /* number of index key attributes */ int indnattrs; /* total number of index attributes */
Oid *indkeys; /* In spite of the name 'indkeys' this field
* contains both key and nonkey attributes */ bool indisclustered; bool indisreplident; bool indnullsnotdistinct;
Oid parentidx; /* if a partition, parent index OID */
SimplePtrList partattaches; /* if partitioned, partition attach objects */
/* if there is an associated constraint object, its dumpId: */
DumpId indexconstraint;
} IndxInfo;
typedefstruct _indexAttachInfo
{
DumpableObject dobj;
IndxInfo *parentIdx; /* link to index on partitioned table */
IndxInfo *partitionIdx; /* link to index on partition */
} IndexAttachInfo;
/* *indAttNames/nindAttNamesarepopulatedonlyiftherelationisanindex *withatleastoneexpressioncolumn;wedon'tneedthemotherwise.
*/ char **indAttNames; /* attnames of the index, in order */
int32 nindAttNames; /* number of attnames stored (can be 0) */
teSection section; /* stats may appear in data or post-data */
} RelStatsInfo;
typedefstruct _statsExtInfo
{
DumpableObject dobj; constchar *rolname; /* owner */
TableInfo *stattable; /* link to table the stats are for */ int stattarget; /* statistics target */
} StatsExtInfo;
typedefstruct _ruleInfo
{
DumpableObject dobj;
TableInfo *ruletable; /* link to table the rule is for */ char ev_type; bool is_instead; char ev_enabled; bool separate; /* true if must dump as separate item */ /* separate is always true for non-ON SELECT rules */
} RuleInfo;
typedefstruct _triggerInfo
{
DumpableObject dobj;
TableInfo *tgtable; /* link to table the trigger is for */ char tgenabled; bool tgispartition; char *tgdef;
} TriggerInfo;
/* *structConstraintInfoisusedforallconstrainttypes.Howeverwe *useadifferentobjTypeforforeignkeyconstraints,tomakeiteasier *tosortthemthewaywewant. * *Not-nullconstraintsdon'tneedthis,unlesstheyareNOTVALID. * *Note:condeferrableandcondeferredarecurrentlyonlyvalidfor *unique/primary-keyconstraints.Otherwisethatinfoisincondef.
*/ typedefstruct _constraintInfo
{
DumpableObject dobj;
TableInfo *contable; /* NULL if domain constraint */
TypeInfo *condomain; /* NULL if table constraint */ char contype; char *condef; /* definition, if CHECK or FOREIGN KEY */
Oid confrelid; /* referenced table, if FOREIGN KEY */
DumpId conindex; /* identifies associated index if any */ bool condeferrable; /* true if constraint is DEFERRABLE */ bool condeferred; /* true if constraint is INITIALLY DEFERRED */ bool conperiod; /* true if the constraint is WITHOUT OVERLAPS */ bool conislocal; /* true if constraint has local definition */ bool separate; /* true if must dump as separate item */
} ConstraintInfo;
typedefstruct _procLangInfo
{
DumpableObject dobj;
DumpableAcl dacl; bool lanpltrusted;
Oid lanplcallfoid;
Oid laninline;
Oid lanvalidator; constchar *lanowner;
} ProcLangInfo;
typedefstruct _castInfo
{
DumpableObject dobj;
Oid castsource;
Oid casttarget;
Oid castfunc; char castcontext; char castmethod;
} CastInfo;
typedefstruct _transformInfo
{
DumpableObject dobj;
Oid trftype;
Oid trflang;
Oid trffromsql;
Oid trftosql;
} TransformInfo;
/* InhInfo isn't a DumpableObject, just temporary state */ typedefstruct _inhInfo
{
Oid inhrelid; /* OID of a child table */
Oid inhparent; /* OID of its parent */
} InhInfo;
typedefstruct _prsInfo
{
DumpableObject dobj;
Oid prsstart;
Oid prstoken;
Oid prsend;
Oid prsheadline;
Oid prslextype;
} TSParserInfo;
¤ 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.0.21Bemerkung:
(vorverarbeitet am 2026-08-08)
¤
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.