* more likely to break across PostgreSQL releases than code that uses
* only the official API.
*
- * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
+ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-int.h,v 1.24 2000/05/27 03:39:33 momjian Exp $
+ * $Id: libpq-int.h,v 1.35 2001/07/06 19:04:23 petere Exp $
*
*-------------------------------------------------------------------------
*/
#define LIBPQ_INT_H
/* We assume libpq-fe.h has already been included. */
+#include "postgres_fe.h"
/* include stuff common to fe and be */
#include "libpq/pqcomm.h"
* numbers-and-dots notation. Takes
* precedence over above. */
char *pgport; /* the server's communication port */
+ char *pgunixsocket; /* the Unix-domain socket that the server
+ * is listening on; if NULL, uses a
+ * default constructed from pgport */
char *pgtty; /* tty on which the backend messages is
* displayed (NOT ACTUALLY USED???) */
char *pgoptions; /* options to start the backend with */
#ifdef USE_SSL
bool allow_ssl_try; /* Allowed to try SSL negotiation */
+ bool require_ssl; /* Require SSL to make connection */
SSL *ssl; /* SSL status, if have SSL connection */
#endif
* necessarily any error.
*/
extern int pqGetc(char *result, PGconn *conn);
+extern int pqPutc(char c, PGconn *conn);
extern int pqGets(PQExpBuffer buf, PGconn *conn);
extern int pqPuts(const char *s, PGconn *conn);
extern int pqGetnchar(char *s, size_t len, PGconn *conn);
#define DefaultAuthtype ""
#define DefaultPassword ""
-/* supply an implementation of strerror() macro if system doesn't have it */
-#ifndef strerror
-#if defined(sun) && defined(__sparc__) && !defined(__SVR4)
-extern char *sys_errlist[];
-
-#define strerror(A) (sys_errlist[(A)])
-#endif /* sunos4 */
-#endif /* !strerror */
-
/*
* this is so that we can check is a connection is non-blocking internally
* without the overhead of a function call
*/
-#define pqIsnonblocking(conn) (conn->nonblocking)
+#define pqIsnonblocking(conn) ((conn)->nonblocking)
#endif /* LIBPQ_INT_H */