postgresql/src/bin/psql/command.h

47 lines
1017 B
C
Raw Normal View History

2000-01-19 00:30:24 +01:00
/*
* psql - the PostgreSQL interactive terminal
*
* Copyright 2000 by PostgreSQL Global Development Group
2000-01-19 00:30:24 +01:00
*
* $Header: /cvsroot/pgsql/src/bin/psql/command.h,v 1.9 2000/02/20 14:28:20 petere Exp $
2000-01-19 00:30:24 +01:00
*/
#ifndef COMMAND_H
#define COMMAND_H
2000-02-16 14:15:26 +01:00
#include "pqexpbuffer.h"
#include "settings.h"
#include "print.h"
1999-11-05 00:14:30 +01:00
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(const char *line,
1999-11-05 00:14:30 +01:00
PQExpBuffer query_buf,
2000-01-19 00:30:24 +01:00
const char **end_of_cmd);
1999-11-05 00:14:30 +01:00
int
2000-01-19 00:30:24 +01:00
process_file(char *filename);
1999-11-05 00:14:30 +01:00
bool
test_superuser(const char * username);
bool
do_pset(const char *param,
1999-11-05 00:14:30 +01:00
const char *value,
printQueryOpt * popt,
bool quiet);
2000-01-19 00:30:24 +01:00
#endif /* COMMAND_H */