Header And Logo

PostgreSQL
| The world's most advanced open source database.

pg_backup_utils.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * pg_backup_utils.h
00004  *  Utility routines shared by pg_dump and pg_restore.
00005  *
00006  *
00007  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00008  * Portions Copyright (c) 1994, Regents of the University of California
00009  *
00010  * src/bin/pg_dump/pg_backup_utils.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 
00015 #ifndef PG_BACKUP_UTILS_H
00016 #define PG_BACKUP_UTILS_H
00017 
00018 typedef enum                    /* bits returned by set_dump_section */
00019 {
00020     DUMP_PRE_DATA = 0x01,
00021     DUMP_DATA = 0x02,
00022     DUMP_POST_DATA = 0x04,
00023     DUMP_UNSECTIONED = 0xff
00024 } DumpSections;
00025 
00026 typedef void (*on_exit_nicely_callback) (int code, void *arg);
00027 
00028 extern const char *progname;
00029 
00030 extern void set_dump_section(const char *arg, int *dumpSections);
00031 extern void
00032 write_msg(const char *modulename, const char *fmt,...)
00033 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
00034 extern void
00035 vwrite_msg(const char *modulename, const char *fmt, va_list ap)
00036 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)));
00037 extern void on_exit_nicely(on_exit_nicely_callback function, void *arg);
00038 extern void exit_nicely(int code) __attribute__((noreturn));
00039 
00040 #endif   /* PG_BACKUP_UTILS_H */