diff options
author | Bruce Momjian <bruce@momjian.us> | 1999-11-04 21:56:02 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1999-11-04 21:56:02 +0000 |
commit | a45195a191eec367a4f305bb71ab541d17a3b9f9 (patch) | |
tree | 99b815a93f6175b0db76c2da0da39e95a0ee6b8d /src/bin/psql/command.h | |
parent | 2ea3b6d63addeaf07267e2390597645cbf013c36 (diff) |
Major psql overhaul by Peter Eisentraut.
Diffstat (limited to 'src/bin/psql/command.h')
-rw-r--r-- | src/bin/psql/command.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/bin/psql/command.h b/src/bin/psql/command.h new file mode 100644 index 00000000000..eeaf0859ba0 --- /dev/null +++ b/src/bin/psql/command.h @@ -0,0 +1,49 @@ +#ifndef COMMAND_H +#define COMMAND_H + +#include <config.h> +#include <c.h> + +#include <pqexpbuffer.h> + +#include "settings.h" +#include "print.h" + + + +typedef enum _backslashResult { + CMD_UNKNOWN = 0, /* not done parsing yet (internal only) */ + CMD_SEND, /* query complete; send off */ + CMD_SKIP_LINE, /* keep building query */ + CMD_TERMINATE, /* quit program */ + CMD_NEWEDIT, /* query buffer was changed (e.g., via \e) */ + CMD_ERROR /* the execution of the backslash command resulted + in an error */ +} backslashResult; + + + +backslashResult +HandleSlashCmds(PsqlSettings *pset, + const char *line, + PQExpBuffer query_buf, + const char ** end_of_cmd); + +bool +do_connect(const char *new_dbname, + const char *new_user, + PsqlSettings *pset); + +bool +process_file(const char *filename, + PsqlSettings *pset); + + +bool +do_pset(const char * param, + const char * value, + printQueryOpt * popt, + bool quiet); + + +#endif |