postgresql/src/bin/pg_dump/pg_backup_utils.h
Bruce Momjian 9d4649ca49 Update copyright for 2018
Backpatch-through: certain files through 9.3
2018-01-02 23:30:12 -05:00

39 lines
1.3 KiB
C

/*-------------------------------------------------------------------------
*
* pg_backup_utils.h
* Utility routines shared by pg_dump and pg_restore.
*
*
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/bin/pg_dump/pg_backup_utils.h
*
*-------------------------------------------------------------------------
*/
#ifndef PG_BACKUP_UTILS_H
#define PG_BACKUP_UTILS_H
typedef enum /* bits returned by set_dump_section */
{
DUMP_PRE_DATA = 0x01,
DUMP_DATA = 0x02,
DUMP_POST_DATA = 0x04,
DUMP_UNSECTIONED = 0xff
} DumpSections;
typedef void (*on_exit_nicely_callback) (int code, void *arg);
extern const char *progname;
extern void set_dump_section(const char *arg, int *dumpSections);
extern void write_msg(const char *modulename, const char *fmt,...) pg_attribute_printf(2, 3);
extern void vwrite_msg(const char *modulename, const char *fmt, va_list ap) pg_attribute_printf(2, 0);
extern void on_exit_nicely(on_exit_nicely_callback function, void *arg);
extern void exit_nicely(int code) pg_attribute_noreturn();
extern void exit_horribly(const char *modulename, const char *fmt,...) pg_attribute_printf(2, 3) pg_attribute_noreturn();
#endif /* PG_BACKUP_UTILS_H */