]> granicus.if.org Git - postgresql/blob - src/bin/psql/common.h
ff8888cb65613b226b0deafdfe5bdf819a3aede6
[postgresql] / src / bin / psql / common.h
1 /*
2  * psql - the PostgreSQL interactive terminal
3  *
4  * Copyright 2000 by PostgreSQL Global Development Group
5  *
6  * $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.11 2000/08/27 19:00:36 petere Exp $
7  */
8 #ifndef COMMON_H
9 #define COMMON_H
10
11 #include "postgres.h"
12 #include <signal.h>
13 #include "pqsignal.h"
14 #include "libpq-fe.h"
15
16 char       *xstrdup(const char *string);
17
18 bool            setQFout(const char *fname);
19
20 #ifndef __GNUC__
21 void            psql_error(const char *fmt,...);
22
23 #else
24 /* This checks the format string for consistency. */
25 void            psql_error(const char *fmt,...) __attribute__((format(printf, 1, 2)));
26
27 #endif
28
29 void            NoticeProcessor(void *arg, const char *message);
30
31 char       *simple_prompt(const char *prompt, int maxlen, bool echo);
32
33 extern volatile bool cancel_pressed;
34 extern PGconn *cancelConn;
35
36 #ifndef WIN32
37 void            handle_sigint(int signum);
38
39 #endif   /* not WIN32 */
40
41 PGresult   *PSQLexec(const char *query);
42
43 bool            SendQuery(const char *query);
44
45 #endif   /* COMMON_H */