mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-28 19:11:49 +02:00
48 lines
1.1 KiB
C
48 lines
1.1 KiB
C
/*
|
|
* psql - the PostgreSQL interactive terminal
|
|
*
|
|
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
|
|
*
|
|
* $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.18 2003/11/29 19:52:06 pgsql Exp $
|
|
*/
|
|
#ifndef COMMAND_H
|
|
#define COMMAND_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;
|
|
|
|
|
|
extern backslashResult HandleSlashCmds(const char *line,
|
|
PQExpBuffer query_buf,
|
|
const char **end_of_cmd,
|
|
volatile int *paren_level);
|
|
|
|
extern int process_file(char *filename);
|
|
|
|
extern bool do_pset(const char *param,
|
|
const char *value,
|
|
printQueryOpt *popt,
|
|
bool quiet);
|
|
|
|
extern void SyncVariables(void);
|
|
|
|
extern void UnsyncVariables(void);
|
|
|
|
extern void SyncVerbosityVariable(void);
|
|
|
|
#endif /* COMMAND_H */
|