In pg_dump, don't dump a stats object unless dumping underlying table.
[pgsql.git] / src / bin / pg_dump / pg_dump.h
blobc678f053e87201fb9eba3f846ec33556c19b8a3c
1 /*-------------------------------------------------------------------------
3 * pg_dump.h
4 * Common header file for the pg_dump utility
6 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/bin/pg_dump/pg_dump.h
11 *-------------------------------------------------------------------------
14 #ifndef PG_DUMP_H
15 #define PG_DUMP_H
17 #include "pg_backup.h"
20 #define oidcmp(x,y) ( ((x) < (y) ? -1 : ((x) > (y)) ? 1 : 0) )
21 #define oideq(x,y) ( (x) == (y) )
22 #define oidle(x,y) ( (x) <= (y) )
23 #define oidge(x,y) ( (x) >= (y) )
24 #define oidzero(x) ( (x) == 0 )
27 * The data structures used to store system catalog information. Every
28 * dumpable object is a subclass of DumpableObject.
30 * NOTE: the structures described here live for the entire pg_dump run;
31 * and in most cases we make a struct for every object we can find in the
32 * catalogs, not only those we are actually going to dump. Hence, it's
33 * best to store a minimal amount of per-object info in these structs,
34 * and retrieve additional per-object info when and if we dump a specific
35 * object. In particular, try to avoid retrieving expensive-to-compute
36 * information until it's known to be needed. We do, however, have to
37 * store enough info to determine whether an object should be dumped and
38 * what order to dump in.
41 typedef enum
43 /* When modifying this enum, update priority tables in pg_dump_sort.c! */
44 DO_NAMESPACE,
45 DO_EXTENSION,
46 DO_TYPE,
47 DO_SHELL_TYPE,
48 DO_FUNC,
49 DO_AGG,
50 DO_OPERATOR,
51 DO_ACCESS_METHOD,
52 DO_OPCLASS,
53 DO_OPFAMILY,
54 DO_COLLATION,
55 DO_CONVERSION,
56 DO_TABLE,
57 DO_ATTRDEF,
58 DO_INDEX,
59 DO_INDEX_ATTACH,
60 DO_STATSEXT,
61 DO_RULE,
62 DO_TRIGGER,
63 DO_CONSTRAINT,
64 DO_FK_CONSTRAINT, /* see note for ConstraintInfo */
65 DO_PROCLANG,
66 DO_CAST,
67 DO_TABLE_DATA,
68 DO_SEQUENCE_SET,
69 DO_DUMMY_TYPE,
70 DO_TSPARSER,
71 DO_TSDICT,
72 DO_TSTEMPLATE,
73 DO_TSCONFIG,
74 DO_FDW,
75 DO_FOREIGN_SERVER,
76 DO_DEFAULT_ACL,
77 DO_TRANSFORM,
78 DO_BLOB,
79 DO_BLOB_DATA,
80 DO_PRE_DATA_BOUNDARY,
81 DO_POST_DATA_BOUNDARY,
82 DO_EVENT_TRIGGER,
83 DO_REFRESH_MATVIEW,
84 DO_POLICY,
85 DO_PUBLICATION,
86 DO_PUBLICATION_REL,
87 DO_SUBSCRIPTION
88 } DumpableObjectType;
90 /* component types of an object which can be selected for dumping */
91 typedef uint32 DumpComponents; /* a bitmask of dump object components */
92 #define DUMP_COMPONENT_NONE (0)
93 #define DUMP_COMPONENT_DEFINITION (1 << 0)
94 #define DUMP_COMPONENT_DATA (1 << 1)
95 #define DUMP_COMPONENT_COMMENT (1 << 2)
96 #define DUMP_COMPONENT_SECLABEL (1 << 3)
97 #define DUMP_COMPONENT_ACL (1 << 4)
98 #define DUMP_COMPONENT_POLICY (1 << 5)
99 #define DUMP_COMPONENT_USERMAP (1 << 6)
100 #define DUMP_COMPONENT_ALL (0xFFFF)
103 * component types which require us to obtain a lock on the table
105 * Note that some components only require looking at the information
106 * in the pg_catalog tables and, for those components, we do not need
107 * to lock the table. Be careful here though- some components use
108 * server-side functions which pull the latest information from
109 * SysCache and in those cases we *do* need to lock the table.
111 * We do not need locks for the COMMENT and SECLABEL components as
112 * those simply query their associated tables without using any
113 * server-side functions. We do not need locks for the ACL component
114 * as we pull that information from pg_class without using any
115 * server-side functions that use SysCache. The USERMAP component
116 * is only relevant for FOREIGN SERVERs and not tables, so no sense
117 * locking a table for that either (that can happen if we are going
118 * to dump "ALL" components for a table).
120 * We DO need locks for DEFINITION, due to various server-side
121 * functions that are used and POLICY due to pg_get_expr(). We set
122 * this up to grab the lock except in the cases we know to be safe.
124 #define DUMP_COMPONENTS_REQUIRING_LOCK (\
125 DUMP_COMPONENT_DEFINITION |\
126 DUMP_COMPONENT_DATA |\
127 DUMP_COMPONENT_POLICY)
129 typedef struct _dumpableObject
131 DumpableObjectType objType;
132 CatalogId catId; /* zero if not a cataloged object */
133 DumpId dumpId; /* assigned by AssignDumpId() */
134 char *name; /* object name (should never be NULL) */
135 struct _namespaceInfo *namespace; /* containing namespace, or NULL */
136 DumpComponents dump; /* bitmask of components to dump */
137 DumpComponents dump_contains; /* as above, but for contained objects */
138 bool ext_member; /* true if object is member of extension */
139 bool depends_on_ext; /* true if object depends on an extension */
140 DumpId *dependencies; /* dumpIds of objects this one depends on */
141 int nDeps; /* number of valid dependencies */
142 int allocDeps; /* allocated size of dependencies[] */
143 } DumpableObject;
145 typedef struct _namespaceInfo
147 DumpableObject dobj;
148 char *rolname; /* name of owner, or empty string */
149 char *nspacl;
150 char *rnspacl;
151 char *initnspacl;
152 char *initrnspacl;
153 } NamespaceInfo;
155 typedef struct _extensionInfo
157 DumpableObject dobj;
158 char *namespace; /* schema containing extension's objects */
159 bool relocatable;
160 char *extversion;
161 char *extconfig; /* info about configuration tables */
162 char *extcondition;
163 } ExtensionInfo;
165 typedef struct _typeInfo
167 DumpableObject dobj;
170 * Note: dobj.name is the raw pg_type.typname entry. ftypname is the
171 * result of format_type(), which will be quoted if needed, and might be
172 * schema-qualified too.
174 char *ftypname;
175 char *rolname; /* name of owner, or empty string */
176 char *typacl;
177 char *rtypacl;
178 char *inittypacl;
179 char *initrtypacl;
180 Oid typelem;
181 Oid typrelid;
182 char typrelkind; /* 'r', 'v', 'c', etc */
183 char typtype; /* 'b', 'c', etc */
184 bool isArray; /* true if auto-generated array type */
185 bool isDefined; /* true if typisdefined */
186 /* If needed, we'll create a "shell type" entry for it; link that here: */
187 struct _shellTypeInfo *shellType; /* shell-type entry, or NULL */
188 /* If it's a domain, we store links to its constraints here: */
189 int nDomChecks;
190 struct _constraintInfo *domChecks;
191 } TypeInfo;
193 typedef struct _shellTypeInfo
195 DumpableObject dobj;
197 TypeInfo *baseType; /* back link to associated base type */
198 } ShellTypeInfo;
200 typedef struct _funcInfo
202 DumpableObject dobj;
203 char *rolname; /* name of owner, or empty string */
204 Oid lang;
205 int nargs;
206 Oid *argtypes;
207 Oid prorettype;
208 char *proacl;
209 char *rproacl;
210 char *initproacl;
211 char *initrproacl;
212 } FuncInfo;
214 /* AggInfo is a superset of FuncInfo */
215 typedef struct _aggInfo
217 FuncInfo aggfn;
218 /* we don't require any other fields at the moment */
219 } AggInfo;
221 typedef struct _oprInfo
223 DumpableObject dobj;
224 char *rolname;
225 char oprkind;
226 Oid oprcode;
227 } OprInfo;
229 typedef struct _accessMethodInfo
231 DumpableObject dobj;
232 char amtype;
233 char *amhandler;
234 } AccessMethodInfo;
236 typedef struct _opclassInfo
238 DumpableObject dobj;
239 char *rolname;
240 } OpclassInfo;
242 typedef struct _opfamilyInfo
244 DumpableObject dobj;
245 char *rolname;
246 } OpfamilyInfo;
248 typedef struct _collInfo
250 DumpableObject dobj;
251 char *rolname;
252 } CollInfo;
254 typedef struct _convInfo
256 DumpableObject dobj;
257 char *rolname;
258 } ConvInfo;
260 typedef struct _tableInfo
263 * These fields are collected for every table in the database.
265 DumpableObject dobj;
266 char *rolname; /* name of owner, or empty string */
267 char *relacl;
268 char *rrelacl;
269 char *initrelacl;
270 char *initrrelacl;
271 char relkind;
272 char relpersistence; /* relation persistence */
273 bool relispopulated; /* relation is populated */
274 char relreplident; /* replica identifier */
275 char *reltablespace; /* relation tablespace */
276 char *reloptions; /* options specified by WITH (...) */
277 char *checkoption; /* WITH CHECK OPTION, if any */
278 char *toast_reloptions; /* WITH options for the TOAST table */
279 bool hasindex; /* does it have any indexes? */
280 bool hasrules; /* does it have any rules? */
281 bool hastriggers; /* does it have any triggers? */
282 bool rowsec; /* is row security enabled? */
283 bool forcerowsec; /* is row security forced? */
284 bool hasoids; /* does it have OIDs? */
285 uint32 frozenxid; /* table's relfrozenxid */
286 uint32 minmxid; /* table's relminmxid */
287 Oid toast_oid; /* toast table's OID, or 0 if none */
288 uint32 toast_frozenxid; /* toast table's relfrozenxid, if any */
289 uint32 toast_minmxid; /* toast table's relminmxid */
290 int ncheck; /* # of CHECK expressions */
291 Oid reloftype; /* underlying type for typed table */
292 /* these two are set only if table is a sequence owned by a column: */
293 Oid owning_tab; /* OID of table owning sequence */
294 int owning_col; /* attr # of column owning sequence */
295 bool is_identity_sequence;
296 int relpages; /* table's size in pages (from pg_class) */
298 bool interesting; /* true if need to collect more data */
299 bool dummy_view; /* view's real definition must be postponed */
300 bool postponed_def; /* matview must be postponed into post-data */
301 bool ispartition; /* is table a partition? */
302 bool unsafe_partitions; /* is it an unsafe partitioned table? */
305 * These fields are computed only if we decide the table is interesting
306 * (it's either a table to dump, or a direct parent of a dumpable table).
308 int numatts; /* number of attributes */
309 char **attnames; /* the attribute names */
310 char **atttypnames; /* attribute type names */
311 int *atttypmod; /* type-specific type modifiers */
312 int *attstattarget; /* attribute statistics targets */
313 char *attstorage; /* attribute storage scheme */
314 char *typstorage; /* type storage scheme */
315 bool *attisdropped; /* true if attr is dropped; don't dump it */
316 char *attidentity;
317 char *attgenerated;
318 int *attlen; /* attribute length, used by binary_upgrade */
319 char *attalign; /* attribute align, used by binary_upgrade */
320 bool *attislocal; /* true if attr has local definition */
321 char **attoptions; /* per-attribute options */
322 Oid *attcollation; /* per-attribute collation selection */
323 char **attfdwoptions; /* per-attribute fdw options */
324 char **attmissingval; /* per attribute missing value */
325 bool *notnull; /* NOT NULL constraints on attributes */
326 bool *inhNotNull; /* true if NOT NULL is inherited */
327 struct _attrDefInfo **attrdefs; /* DEFAULT expressions */
328 struct _constraintInfo *checkexprs; /* CHECK constraints */
329 bool needs_override; /* has GENERATED ALWAYS AS IDENTITY */
330 char *amname; /* relation access method */
333 * Stuff computed only for dumpable tables.
335 int numParents; /* number of (immediate) parent tables */
336 struct _tableInfo **parents; /* TableInfos of immediate parents */
337 int numIndexes; /* number of indexes */
338 struct _indxInfo *indexes; /* indexes */
339 struct _tableDataInfo *dataObj; /* TableDataInfo, if dumping its data */
340 int numTriggers; /* number of triggers for table */
341 struct _triggerInfo *triggers; /* array of TriggerInfo structs */
342 } TableInfo;
344 typedef struct _attrDefInfo
346 DumpableObject dobj; /* note: dobj.name is name of table */
347 TableInfo *adtable; /* link to table of attribute */
348 int adnum;
349 char *adef_expr; /* decompiled DEFAULT expression */
350 bool separate; /* true if must dump as separate item */
351 } AttrDefInfo;
353 typedef struct _tableDataInfo
355 DumpableObject dobj;
356 TableInfo *tdtable; /* link to table to dump */
357 char *filtercond; /* WHERE condition to limit rows dumped */
358 } TableDataInfo;
360 typedef struct _indxInfo
362 DumpableObject dobj;
363 TableInfo *indextable; /* link to table the index is for */
364 char *indexdef;
365 char *tablespace; /* tablespace in which index is stored */
366 char *indreloptions; /* options specified by WITH (...) */
367 char *indstatcols; /* column numbers with statistics */
368 char *indstatvals; /* statistic values for columns */
369 int indnkeyattrs; /* number of index key attributes */
370 int indnattrs; /* total number of index attributes */
371 Oid *indkeys; /* In spite of the name 'indkeys' this field
372 * contains both key and nonkey attributes */
373 bool indisclustered;
374 bool indisreplident;
375 Oid parentidx; /* if a partition, parent index OID */
376 SimplePtrList partattaches; /* if partitioned, partition attach objects */
378 /* if there is an associated constraint object, its dumpId: */
379 DumpId indexconstraint;
380 } IndxInfo;
382 typedef struct _indexAttachInfo
384 DumpableObject dobj;
385 IndxInfo *parentIdx; /* link to index on partitioned table */
386 IndxInfo *partitionIdx; /* link to index on partition */
387 } IndexAttachInfo;
389 typedef struct _statsExtInfo
391 DumpableObject dobj;
392 char *rolname; /* name of owner, or empty string */
393 TableInfo *stattable; /* link to table the stats are for */
394 } StatsExtInfo;
396 typedef struct _ruleInfo
398 DumpableObject dobj;
399 TableInfo *ruletable; /* link to table the rule is for */
400 char ev_type;
401 bool is_instead;
402 char ev_enabled;
403 bool separate; /* true if must dump as separate item */
404 /* separate is always true for non-ON SELECT rules */
405 } RuleInfo;
407 typedef struct _triggerInfo
409 DumpableObject dobj;
410 TableInfo *tgtable; /* link to table the trigger is for */
411 char *tgfname;
412 int tgtype;
413 int tgnargs;
414 char *tgargs;
415 bool tgisconstraint;
416 char *tgconstrname;
417 Oid tgconstrrelid;
418 char *tgconstrrelname;
419 char tgenabled;
420 bool tgisinternal;
421 bool tgdeferrable;
422 bool tginitdeferred;
423 char *tgdef;
424 } TriggerInfo;
426 typedef struct _evttriggerInfo
428 DumpableObject dobj;
429 char *evtname;
430 char *evtevent;
431 char *evtowner;
432 char *evttags;
433 char *evtfname;
434 char evtenabled;
435 } EventTriggerInfo;
438 * struct ConstraintInfo is used for all constraint types. However we
439 * use a different objType for foreign key constraints, to make it easier
440 * to sort them the way we want.
442 * Note: condeferrable and condeferred are currently only valid for
443 * unique/primary-key constraints. Otherwise that info is in condef.
445 typedef struct _constraintInfo
447 DumpableObject dobj;
448 TableInfo *contable; /* NULL if domain constraint */
449 TypeInfo *condomain; /* NULL if table constraint */
450 char contype;
451 char *condef; /* definition, if CHECK or FOREIGN KEY */
452 Oid confrelid; /* referenced table, if FOREIGN KEY */
453 DumpId conindex; /* identifies associated index if any */
454 bool condeferrable; /* true if constraint is DEFERRABLE */
455 bool condeferred; /* true if constraint is INITIALLY DEFERRED */
456 bool conislocal; /* true if constraint has local definition */
457 bool separate; /* true if must dump as separate item */
458 } ConstraintInfo;
460 typedef struct _procLangInfo
462 DumpableObject dobj;
463 bool lanpltrusted;
464 Oid lanplcallfoid;
465 Oid laninline;
466 Oid lanvalidator;
467 char *lanacl;
468 char *rlanacl;
469 char *initlanacl;
470 char *initrlanacl;
471 char *lanowner; /* name of owner, or empty string */
472 } ProcLangInfo;
474 typedef struct _castInfo
476 DumpableObject dobj;
477 Oid castsource;
478 Oid casttarget;
479 Oid castfunc;
480 char castcontext;
481 char castmethod;
482 } CastInfo;
484 typedef struct _transformInfo
486 DumpableObject dobj;
487 Oid trftype;
488 Oid trflang;
489 Oid trffromsql;
490 Oid trftosql;
491 } TransformInfo;
493 /* InhInfo isn't a DumpableObject, just temporary state */
494 typedef struct _inhInfo
496 Oid inhrelid; /* OID of a child table */
497 Oid inhparent; /* OID of its parent */
498 } InhInfo;
500 typedef struct _prsInfo
502 DumpableObject dobj;
503 Oid prsstart;
504 Oid prstoken;
505 Oid prsend;
506 Oid prsheadline;
507 Oid prslextype;
508 } TSParserInfo;
510 typedef struct _dictInfo
512 DumpableObject dobj;
513 char *rolname;
514 Oid dicttemplate;
515 char *dictinitoption;
516 } TSDictInfo;
518 typedef struct _tmplInfo
520 DumpableObject dobj;
521 Oid tmplinit;
522 Oid tmpllexize;
523 } TSTemplateInfo;
525 typedef struct _cfgInfo
527 DumpableObject dobj;
528 char *rolname;
529 Oid cfgparser;
530 } TSConfigInfo;
532 typedef struct _fdwInfo
534 DumpableObject dobj;
535 char *rolname;
536 char *fdwhandler;
537 char *fdwvalidator;
538 char *fdwoptions;
539 char *fdwacl;
540 char *rfdwacl;
541 char *initfdwacl;
542 char *initrfdwacl;
543 } FdwInfo;
545 typedef struct _foreignServerInfo
547 DumpableObject dobj;
548 char *rolname;
549 Oid srvfdw;
550 char *srvtype;
551 char *srvversion;
552 char *srvacl;
553 char *rsrvacl;
554 char *initsrvacl;
555 char *initrsrvacl;
556 char *srvoptions;
557 } ForeignServerInfo;
559 typedef struct _defaultACLInfo
561 DumpableObject dobj;
562 char *defaclrole;
563 char defaclobjtype;
564 char *defaclacl;
565 char *rdefaclacl;
566 char *initdefaclacl;
567 char *initrdefaclacl;
568 } DefaultACLInfo;
570 typedef struct _blobInfo
572 DumpableObject dobj;
573 char *rolname;
574 char *blobacl;
575 char *rblobacl;
576 char *initblobacl;
577 char *initrblobacl;
578 } BlobInfo;
581 * The PolicyInfo struct is used to represent policies on a table and
582 * to indicate if a table has RLS enabled (ENABLE ROW SECURITY). If
583 * polname is NULL, then the record indicates ENABLE ROW SECURITY, while if
584 * it's non-NULL then this is a regular policy definition.
586 typedef struct _policyInfo
588 DumpableObject dobj;
589 TableInfo *poltable;
590 char *polname; /* null indicates RLS is enabled on rel */
591 char polcmd;
592 bool polpermissive;
593 char *polroles;
594 char *polqual;
595 char *polwithcheck;
596 } PolicyInfo;
599 * The PublicationInfo struct is used to represent publications.
601 typedef struct _PublicationInfo
603 DumpableObject dobj;
604 char *rolname;
605 bool puballtables;
606 bool pubinsert;
607 bool pubupdate;
608 bool pubdelete;
609 bool pubtruncate;
610 } PublicationInfo;
613 * The PublicationRelInfo struct is used to represent publication table
614 * mapping.
616 typedef struct _PublicationRelInfo
618 DumpableObject dobj;
619 PublicationInfo *publication;
620 TableInfo *pubtable;
621 } PublicationRelInfo;
624 * The SubscriptionInfo struct is used to represent subscription.
626 typedef struct _SubscriptionInfo
628 DumpableObject dobj;
629 char *rolname;
630 char *subconninfo;
631 char *subslotname;
632 char *subsynccommit;
633 char *subpublications;
634 } SubscriptionInfo;
637 * We build an array of these with an entry for each object that is an
638 * extension member according to pg_depend.
640 typedef struct _extensionMemberId
642 CatalogId catId; /* tableoid+oid of some member object */
643 ExtensionInfo *ext; /* owning extension */
644 } ExtensionMemberId;
646 /* global decls */
647 extern bool force_quotes; /* double-quotes for identifiers flag */
649 /* placeholders for comment starting and ending delimiters */
650 extern char g_comment_start[10];
651 extern char g_comment_end[10];
653 extern char g_opaque_type[10]; /* name for the opaque type */
656 * common utility functions
659 extern TableInfo *getSchemaData(Archive *fout, int *numTablesPtr);
661 extern void AssignDumpId(DumpableObject *dobj);
662 extern DumpId createDumpId(void);
663 extern DumpId getMaxDumpId(void);
664 extern DumpableObject *findObjectByDumpId(DumpId dumpId);
665 extern DumpableObject *findObjectByCatalogId(CatalogId catalogId);
666 extern void getDumpableObjects(DumpableObject ***objs, int *numObjs);
668 extern void addObjectDependency(DumpableObject *dobj, DumpId refId);
669 extern void removeObjectDependency(DumpableObject *dobj, DumpId refId);
671 extern TableInfo *findTableByOid(Oid oid);
672 extern TypeInfo *findTypeByOid(Oid oid);
673 extern FuncInfo *findFuncByOid(Oid oid);
674 extern OprInfo *findOprByOid(Oid oid);
675 extern CollInfo *findCollationByOid(Oid oid);
676 extern NamespaceInfo *findNamespaceByOid(Oid oid);
677 extern ExtensionInfo *findExtensionByOid(Oid oid);
678 extern PublicationInfo *findPublicationByOid(Oid oid);
680 extern void setExtensionMembership(ExtensionMemberId *extmems, int nextmems);
681 extern ExtensionInfo *findOwningExtension(CatalogId catalogId);
683 extern void parseOidArray(const char *str, Oid *array, int arraysize);
685 extern void sortDumpableObjects(DumpableObject **objs, int numObjs,
686 DumpId preBoundaryId, DumpId postBoundaryId);
687 extern void sortDumpableObjectsByTypeName(DumpableObject **objs, int numObjs);
690 * version specific routines
692 extern NamespaceInfo *getNamespaces(Archive *fout, int *numNamespaces);
693 extern ExtensionInfo *getExtensions(Archive *fout, int *numExtensions);
694 extern TypeInfo *getTypes(Archive *fout, int *numTypes);
695 extern FuncInfo *getFuncs(Archive *fout, int *numFuncs);
696 extern AggInfo *getAggregates(Archive *fout, int *numAggregates);
697 extern OprInfo *getOperators(Archive *fout, int *numOperators);
698 extern AccessMethodInfo *getAccessMethods(Archive *fout, int *numAccessMethods);
699 extern OpclassInfo *getOpclasses(Archive *fout, int *numOpclasses);
700 extern OpfamilyInfo *getOpfamilies(Archive *fout, int *numOpfamilies);
701 extern CollInfo *getCollations(Archive *fout, int *numCollations);
702 extern ConvInfo *getConversions(Archive *fout, int *numConversions);
703 extern TableInfo *getTables(Archive *fout, int *numTables);
704 extern void getOwnedSeqs(Archive *fout, TableInfo tblinfo[], int numTables);
705 extern InhInfo *getInherits(Archive *fout, int *numInherits);
706 extern void getPartitioningInfo(Archive *fout);
707 extern void getIndexes(Archive *fout, TableInfo tblinfo[], int numTables);
708 extern void getExtendedStatistics(Archive *fout);
709 extern void getConstraints(Archive *fout, TableInfo tblinfo[], int numTables);
710 extern RuleInfo *getRules(Archive *fout, int *numRules);
711 extern void getTriggers(Archive *fout, TableInfo tblinfo[], int numTables);
712 extern ProcLangInfo *getProcLangs(Archive *fout, int *numProcLangs);
713 extern CastInfo *getCasts(Archive *fout, int *numCasts);
714 extern TransformInfo *getTransforms(Archive *fout, int *numTransforms);
715 extern void getTableAttrs(Archive *fout, TableInfo *tbinfo, int numTables);
716 extern bool shouldPrintColumn(DumpOptions *dopt, TableInfo *tbinfo, int colno);
717 extern TSParserInfo *getTSParsers(Archive *fout, int *numTSParsers);
718 extern TSDictInfo *getTSDictionaries(Archive *fout, int *numTSDicts);
719 extern TSTemplateInfo *getTSTemplates(Archive *fout, int *numTSTemplates);
720 extern TSConfigInfo *getTSConfigurations(Archive *fout, int *numTSConfigs);
721 extern FdwInfo *getForeignDataWrappers(Archive *fout,
722 int *numForeignDataWrappers);
723 extern ForeignServerInfo *getForeignServers(Archive *fout,
724 int *numForeignServers);
725 extern DefaultACLInfo *getDefaultACLs(Archive *fout, int *numDefaultACLs);
726 extern void getExtensionMembership(Archive *fout, ExtensionInfo extinfo[],
727 int numExtensions);
728 extern void processExtensionTables(Archive *fout, ExtensionInfo extinfo[],
729 int numExtensions);
730 extern EventTriggerInfo *getEventTriggers(Archive *fout, int *numEventTriggers);
731 extern void getPolicies(Archive *fout, TableInfo tblinfo[], int numTables);
732 extern PublicationInfo *getPublications(Archive *fout,
733 int *numPublications);
734 extern void getPublicationTables(Archive *fout, TableInfo tblinfo[],
735 int numTables);
736 extern void getSubscriptions(Archive *fout);
738 #endif /* PG_DUMP_H */