PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pg_backup_utils.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_backup_utils.h
4  * Utility routines shared by pg_dump and pg_restore.
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/bin/pg_dump/pg_backup_utils.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 
15 #ifndef PG_BACKUP_UTILS_H
16 #define PG_BACKUP_UTILS_H
17 
18 typedef enum /* bits returned by set_dump_section */
19 {
20  DUMP_PRE_DATA = 0x01,
21  DUMP_DATA = 0x02,
24 } DumpSections;
25 
26 typedef void (*on_exit_nicely_callback) (int code, void *arg);
27 
28 extern const char *progname;
29 
30 extern void set_dump_section(const char *arg, int *dumpSections);
31 extern void write_msg(const char *modulename, const char *fmt,...) pg_attribute_printf(2, 3);
32 extern void vwrite_msg(const char *modulename, const char *fmt, va_list ap) pg_attribute_printf(2, 0);
34 extern void exit_nicely(int code) pg_attribute_noreturn();
35 
36 extern void exit_horribly(const char *modulename, const char *fmt,...) pg_attribute_printf(2, 3) pg_attribute_noreturn();
37 
38 #endif /* PG_BACKUP_UTILS_H */
const char * progname
Definition: pg_standby.c:37
static const char * modulename
Definition: compress_io.c:78
void void vwrite_msg(const char *modulename, const char *fmt, va_list ap) pg_attribute_printf(2
void write_msg(const char *modulename, const char *fmt,...) pg_attribute_printf(2
#define pg_attribute_printf(f, a)
Definition: c.h:634
void(* on_exit_nicely_callback)(int code, void *arg)
void exit_nicely(int code) pg_attribute_noreturn()
void set_dump_section(const char *arg, int *dumpSections)
void pg_attribute_noreturn()
DumpSections
on_exit_nicely_callback function
void void void on_exit_nicely(on_exit_nicely_callback function, void *arg)
void * arg
void exit_horribly(const char *modulename, const char *fmt,...) pg_attribute_printf(2