/usr/include/postgres-xc/server/gtm/libpq-fe.h is in postgres-xc-server-dev 1.1-2ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | /*-------------------------------------------------------------------------
*
* libpq-fe.h
* This file contains definitions for structures and
* externs for functions used by frontend postgres applications.
*
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 2010-2012 Postgres-XC Development Group
*
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.145 2009/01/01 17:24:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef LIBPQ_FE_H
#define LIBPQ_FE_H
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdio.h>
/*
* postgres_ext.h defines the backend's externally visible types,
* such as Oid.
*/
#include "gtm/gtm_ext.h"
/*
* Option flags for PQcopyResult
*/
#define PG_COPYRES_ATTRS 0x01
#define PG_COPYRES_TUPLES 0x02 /* Implies PG_COPYRES_ATTRS */
#define PG_COPYRES_EVENTS 0x04
#define PG_COPYRES_NOTICEHOOKS 0x08
/* Application-visible enum types */
typedef enum
{
/*
* Although it is okay to add to this list, values which become unused
* should never be removed, nor should constants be redefined - that would
* break compatibility with existing code.
*/
CONNECTION_OK,
CONNECTION_BAD,
/* Non-blocking mode only below here */
/*
* The existence of these should never be relied upon - they should only
* be used for user feedback or similar purposes.
*/
CONNECTION_STARTED, /* Waiting for connection to be made. */
CONNECTION_MADE, /* Connection OK; waiting to send. */
CONNECTION_AWAITING_RESPONSE, /* Waiting for a response from the
* postmaster. */
CONNECTION_AUTH_OK, /* Received authentication; waiting for
* backend startup. */
CONNECTION_SETENV, /* Negotiating environment. */
CONNECTION_SSL_STARTUP, /* Negotiating SSL. */
CONNECTION_NEEDED /* Internal state: connect() needed */
} ConnStatusType;
typedef enum
{
PGRES_POLLING_FAILED = 0,
PGRES_POLLING_READING, /* These two indicate that one may */
PGRES_POLLING_WRITING, /* use select before polling again. */
PGRES_POLLING_OK,
PGRES_POLLING_ACTIVE /* unused; keep for awhile for backwards
* compatibility */
} GTMClientPollingStatusType;
/* ----------------
* Structure for the conninfo parameter definitions returned by PQconndefaults
* or GTMPQconninfoParse.
*
* All fields except "val" point at static strings which must not be altered.
* "val" is either NULL or a malloc'd current-value string. GTMPQconninfoFree()
* will release both the val strings and the GTMPQconninfoOption array itself.
* ----------------
*/
typedef struct _GTMPQconninfoOption
{
char *keyword; /* The keyword of the option */
char *val; /* Option's current value, or NULL */
} GTMPQconninfoOption;
typedef struct gtm_conn GTM_Conn;
/* ----------------
* Exported functions of libpq
* ----------------
*/
/* === in fe-connect.c === */
/* make a new client connection to the backend */
/* Asynchronous (non-blocking) */
extern GTM_Conn *PQconnectGTMStart(const char *conninfo);
extern GTMClientPollingStatusType GTMPQconnectPoll(GTM_Conn *conn);
/* Synchronous (blocking) */
extern GTM_Conn *PQconnectGTM(const char *conninfo);
/* close the current connection and free the GTM_Conn data structure */
extern void GTMPQfinish(GTM_Conn *conn);
/* parse connection options in same way as PQconnectGTM */
extern GTMPQconninfoOption *GTMPQconninfoParse(const char *conninfo, char **errmsg);
/* free the data structure returned by PQconndefaults() or GTMPQconninfoParse() */
extern void GTMPQconninfoFree(GTMPQconninfoOption *connOptions);
extern char *GTMPQhost(const GTM_Conn *conn);
extern char *GTMPQport(const GTM_Conn *conn);
extern ConnStatusType GTMPQstatus(const GTM_Conn *conn);
extern int GTMPQispostmaster(const GTM_Conn *conn);
extern char *GTMPQerrorMessage(const GTM_Conn *conn);
extern int GTMPQsocket(const GTM_Conn *conn);
/* Enable/disable tracing */
extern void GTMPQtrace(GTM_Conn *conn, FILE *debug_port);
extern void GTMPQuntrace(GTM_Conn *conn);
/* Force the write buffer to be written (or at least try) */
extern int PQflush(GTM_Conn *conn);
#define libpq_gettext(x) x
#ifdef __cplusplus
}
#endif
#endif /* LIBPQ_FE_H */
|