postgres/src/bin/scripts/common.h
Tom Lane 33ab177a56 Don't assume that struct option is available just because we can find a
getopt_long().  This is more or less the same problem as we saw earlier
with getaddrinfo() and struct addrinfo, and for the same reason: random
user-added libraries might contain the subroutine, but there's no
guarantee we will find the matching header files.
2003-08-07 21:11:58 +00:00

30 lines
764 B
C

#include "postgres_fe.h"
#include "libpq-fe.h"
#include "pqexpbuffer.h"
#include "getopt_long.h"
#ifndef HAVE_OPTRESET
int optreset;
#endif
const char *get_user_name(const char *progname);
#define _(x) gettext((x))
void init_nls(void);
typedef void (*help_handler) (const char *);
void handle_help_version_opts(int argc, char *argv[], const char *fixed_progname, help_handler hlp);
extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
PGconn *connectDatabase(const char *dbname, const char *pghost, const char *pgport,
const char *pguser, bool require_password, const char *progname);
PGresult *
executeQuery(PGconn *conn, const char *command, const char *progname, bool echo);
int
check_yesno_response(const char *string);