1/*-------------------------------------------------------------------------
4 * This file contains definitions for structures and
5 * externs for functions used by frontend postgres applications.
7 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/interfaces/libpq/libpq-fe.h
12 *-------------------------------------------------------------------------
27 * postgres_ext.h defines the backend's externally visible types,
33 * These symbols may be used in compile-time #ifdef tests for the availability
34 * of v14-and-newer libpq features.
36/* Features added in PostgreSQL v14: */
37/* Indicates presence of PQenterPipelineMode and friends */
38 #define LIBPQ_HAS_PIPELINING 1
39/* Indicates presence of PQsetTraceFlags; also new PQtrace output format */
40 #define LIBPQ_HAS_TRACE_FLAGS 1
42/* Features added in PostgreSQL v15: */
43/* Indicates that PQsslAttribute(NULL, "library") is useful */
44 #define LIBPQ_HAS_SSL_LIBRARY_DETECTION 1
46/* Features added in PostgreSQL v17: */
47/* Indicates presence of PGcancelConn typedef and associated routines */
48 #define LIBPQ_HAS_ASYNC_CANCEL 1
49/* Indicates presence of PQchangePassword */
50 #define LIBPQ_HAS_CHANGE_PASSWORD 1
51/* Indicates presence of PQsetChunkedRowsMode, PGRES_TUPLES_CHUNK */
52 #define LIBPQ_HAS_CHUNK_MODE 1
53/* Indicates presence of PQclosePrepared, PQclosePortal, etc */
54 #define LIBPQ_HAS_CLOSE_PREPARED 1
55/* Indicates presence of PQsendPipelineSync */
56 #define LIBPQ_HAS_SEND_PIPELINE_SYNC 1
57/* Indicates presence of PQsocketPoll, PQgetCurrentTimeUSec */
58 #define LIBPQ_HAS_SOCKET_POLL 1
60/* Features added in PostgreSQL v18: */
61/* Indicates presence of PQfullProtocolVersion */
62 #define LIBPQ_HAS_FULL_PROTOCOL_VERSION 1
63/* Indicates presence of the PQAUTHDATA_PROMPT_OAUTH_DEVICE authdata hook */
64 #define LIBPQ_HAS_PROMPT_OAUTH_DEVICE 1
67 * Option flags for PQcopyResult
69 #define PG_COPYRES_ATTRS 0x01
70 #define PG_COPYRES_TUPLES 0x02 /* Implies PG_COPYRES_ATTRS */
71 #define PG_COPYRES_EVENTS 0x04
72 #define PG_COPYRES_NOTICEHOOKS 0x08
74/* Application-visible enum types */
77 * Although it is okay to add to these lists, values which become unused
78 * should never be removed, nor should constants be redefined - that would
79 * break compatibility with existing code.
86 /* Non-blocking mode only below here */
89 * The existence of these should never be relied upon - they should only
90 * be used for user feedback or similar purposes.
110 * external system. */
126 * anything was executed properly by the
129 * executed properly by the backend, PGresult
130 * contains the result tuples */
141 * earlier in a pipeline */
170 * PGPing - The ordering of this enum should not be altered because the
171 * values are exposed externally via pg_isready.
183 * PGpipelineStatus - Current status of pipeline mode
199/* PGconn encapsulates a connection to the backend.
200 * The contents of this struct are not supposed to be known to applications.
204/* PGcancelConn encapsulates a cancel connection to the backend.
205 * The contents of this struct are not supposed to be known to applications.
209/* PGresult encapsulates the result of a query (or more precisely, of a single
210 * SQL command --- a query string given to PQsendQuery can contain multiple
211 * commands and thus return multiple PGresult objects).
212 * The contents of this struct are not supposed to be known to applications.
216/* PGcancel encapsulates the information needed to cancel a running
217 * query on an existing connection.
218 * The contents of this struct are not supposed to be known to applications.
222/* PGnotify represents the occurrence of a NOTIFY message.
223 * Ideally this would be an opaque typedef, but it's so simple that it's
224 * unlikely to change.
225 * NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's,
226 * whereas in earlier versions it was always your own backend's PID.
230 char *
relname;
/* notification condition name */
231 int be_pid;
/* process ID of notifying server process */
232 char *
extra;
/* notification parameter */
233 /* Fields below here are private to libpq; apps should not use 'em */
237/* pg_usec_time_t is like time_t, but with microsecond resolution */
240/* Function types for notice-handling callbacks */
244/* Print options for PQprint() */
258 char **
fieldName;
/* null terminated array of replacement field
263 * Structure for the conninfo parameter definitions returned by PQconndefaults
264 * or PQconninfoParse.
266 * All fields except "val" point at static strings which must not be altered.
267 * "val" is either NULL or a malloc'd current-value string. PQconninfoFree()
268 * will release both the val strings and the PQconninfoOption array itself.
273 char *
keyword;
/* The keyword of the option */
274 char *
envvar;
/* Fallback environment variable name */
275 char *
compiled;
/* Fallback compiled in default value */
276 char *
val;
/* Option's current value, or NULL */
277 char *
label;
/* Label for field in connect dialog */
278 char *
dispchar;
/* Indicates how to display this field in a
279 * connect dialog. Values are: "" Display
280 * entered value as is "*" Password field -
281 * hide value "D" Debug option - don't show
283 int dispsize;
/* Field size in characters for dialog */
287 * PQArgBlock -- structure for PQfn() arguments
296 int *
ptr;
/* can't use void (dec compiler barfs) */
302 * PGresAttDesc -- Data about a single attribute (column) of a query result
310 int format;
/* format code for value (text/binary) */
317 * Exported functions of libpq
321/* === in fe-connect.c === */
323/* make a new client connection to the backend */
324/* Asynchronous (non-blocking) */
327 const char *
const *
values,
int expand_dbname);
330/* Synchronous (blocking) */
333 const char *
const *
values,
int expand_dbname);
335 const char *pgoptions,
const char *pgtty,
337 const char *login,
const char *pwd);
339 #define PQsetdb(M_PGHOST,M_PGPORT,M_PGOPT,M_PGTTY,M_DBNAME) \
340 PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL)
342/* close the current connection and free the PGconn data structure */
345/* get info about connection options known to PQconnectdb */
348/* parse connection options in same way as PQconnectdb */
351/* return the connection options used by a live connection */
354/* free the data structure returned by PQconndefaults() or PQconninfoParse() */
358 * close the current connection and reestablish a new one with the same
361/* Asynchronous (non-blocking) */
365/* Synchronous (blocking) */
368/* Create a PGcancelConn that's used to cancel a query on the given PGconn */
371/* issue a cancel request in a non-blocking manner */
374/* issue a blocking cancel request */
377/* poll a non-blocking cancel request */
386/* request a cancel structure */
389/* free a cancel structure */
392/* deprecated version of PQcancelBlocking, but one which is signal-safe */
395/* deprecated version of PQcancel; not thread-safe */
398/* Accessor functions for PGconn objects */
410 const char *paramName);
424/* SSL information functions */
430/* Get the OpenSSL structure associated with a connection. Returns NULL for
431 * unencrypted connections or if any other TLS library is in use. */
434/* Tell libpq whether it needs to initialize OpenSSL */
437/* More detailed way to tell libpq whether it needs to initialize OpenSSL */
440/* Return true if GSSAPI encryption is in use */
443/* Returns GSSAPI context if GSSAPI is in use */
446/* Set verbosity for PQerrorMessage and PQresultErrorMessage */
449/* Set CONTEXT visibility for PQerrorMessage and PQresultErrorMessage */
453/* Override default notice handling routines */
462 * Used to set callback that prevents concurrent access to
463 * non-thread safe functions that libpq needs.
464 * The default implementation uses a libpq internal mutex.
465 * Only required for multithreaded apps that use kerberos
466 * both within their app and for postgresql connections.
472/* === in fe-trace.c === */
476/* flags controlling trace output: */
477/* omit timestamps from each line */
478 #define PQTRACE_SUPPRESS_TIMESTAMPS (1<<0)
479/* redact portions of some messages, for testing frameworks */
480 #define PQTRACE_REGRESS_MODE (1<<1)
483/* === in fe-exec.c === */
485/* Simple synchronous query */
490 const Oid *paramTypes,
491 const char *
const *paramValues,
492 const int *paramLengths,
493 const int *paramFormats,
496 const char *query,
int nParams,
497 const Oid *paramTypes);
499 const char *stmtName,
501 const char *
const *paramValues,
502 const int *paramLengths,
503 const int *paramFormats,
506/* Interface for multiple-result or asynchronous queries */
507 #define PQ_QUERY_PARAM_MAX_LIMIT 65535
513 const Oid *paramTypes,
514 const char *
const *paramValues,
515 const int *paramLengths,
516 const int *paramFormats,
519 const char *query,
int nParams,
520 const Oid *paramTypes);
522 const char *stmtName,
524 const char *
const *paramValues,
525 const int *paramLengths,
526 const int *paramFormats,
532/* Routines for managing an asynchronous query */
536/* Routines for pipeline mode management */
543/* LISTEN/NOTIFY support */
546/* Routines for copy in/out */
551/* Deprecated routines for copy in/out */
558/* Set blocking/nonblocking connection to the backend */
564 const char *
const *
values,
int expand_dbname);
566/* Force the write buffer to be written (or at least try) */
570 * "Fast path" interface --- not really recommended for application
581/* Accessor functions for PGresult objects */
610/* Describe prepared statements and portals */
616/* Close prepared statements and portals */
622/* Delete a PGresult */
625/* For freeing other alloc'd results, such as PGnotify structs */
628/* Exists for backward compatibility. bjm 2003年03月24日 */
629 #define PQfreeNotify(ptr) PQfreemem(ptr)
631/* Error when no password was given. */
632/* Note: depending on this is deprecated; use PQconnectionNeedsPassword(). */
633 #define PQnoPasswordSupplied "fe_sendauth: no password supplied\n"
635/* Create and manipulate PGresults */
643/* Quoting strings before inclusion in queries. */
645 char *to,
const char *from,
size_t length,
650 const unsigned char *from,
size_t from_length,
655/* These forms are deprecated! */
656extern size_t PQescapeString(
char *to,
const char *from,
size_t length);
657extern unsigned char *
PQescapeBytea(
const unsigned char *from,
size_t from_length,
662/* === in fe-print.c === */
664extern void PQprint(FILE *fout,
/* output stream */
669 * really old printing routines
672 FILE *fp,
/* where to send the output */
673 int fillAlign,
/* pad the fields with spaces */
674 const char *fieldSep,
/* field separator */
675 int printHeader,
/* display headers? */
679 FILE *fout,
/* output stream */
680 int PrintAttNames,
/* print attribute names */
681 int TerseOutput,
/* delimiter bars */
682 int colWidth);
/* width of column, if 0, use
686/* === in fe-lobj.c === */
688/* Large-object access routines */
706/* === in fe-misc.c === */
708/* Get the version of the libpq library in use */
711/* Poll a socket for reading and/or writing with an optional timeout */
712extern int PQsocketPoll(
int sock,
int forRead,
int forWrite,
715/* Get current time in the form PQsocketPoll wants */
718/* Determine length of multibyte encoded char at *s */
721/* Same, but not more than the distance to the end of string s */
724/* Determine display length of multibyte encoded char at *s */
727/* Get encoding id from environment variable PGCLIENTENCODING */
730/* === in fe-auth.c === */
741/* for PGoauthBearerRequest.async() */
743#define SOCKTYPE uintptr_t /* avoids depending on winsock2.h for SOCKET */
750 /* Hook inputs (constant across all calls) */
752 const char *
scope;
/* required scope(s), or NULL */
757 * Callback implementing a custom asynchronous OAuth flow.
759 * The callback may return
760 * - PGRES_POLLING_READING/WRITING, to indicate that a socket descriptor
761 * has been stored in *altsock and libpq should wait until it is
762 * readable or writable before calling back;
763 * - PGRES_POLLING_OK, to indicate that the flow is complete and
764 * request->token has been set; or
765 * - PGRES_POLLING_FAILED, to indicate that token retrieval has failed.
767 * This callback is optional. If the token can be obtained without
768 * blocking during the original call to the PQAUTHDATA_OAUTH_BEARER_TOKEN
769 * hook, it may be returned directly, but one of request->async or
770 * request->token must be set by the hook.
777 * Callback to clean up custom allocations. A hook implementation may use
778 * this to free request->token and any resources in request->user.
780 * This is technically optional, but highly recommended, because there is
781 * no other indication as to when it is safe to free the token.
786 * The hook should set this to the Bearer token contents for the
787 * connection, once the flow is completed. The token contents must remain
788 * available to libpq until the hook's cleanup callback is called.
793 * Hook-defined data. libpq will not modify this pointer across calls to
794 * the async callback, so it can be used to keep track of
795 * application-specific state. Resources allocated here should be freed by
796 * the cleanup callback.
812/* === in encnames.c === */
818/* === in fe-secure-openssl.c === */
820/* Support for overriding sslpassword handling with a callback */
830#endif /* LIBPQ_FE_H */
static Datum values[MAXATTR]
static PGcancel *volatile cancelConn
int errmsg(const char *fmt,...)
static const JsonPathKeyword keywords[]
@ CONNECTION_AUTHENTICATING
@ CONNECTION_CHECK_STANDBY
@ CONNECTION_AWAITING_RESPONSE
@ CONNECTION_CHECK_WRITABLE
@ CONNECTION_CHECK_TARGET
int PQserverVersion(const PGconn *conn)
char * PQencryptPasswordConn(PGconn *conn, const char *passwd, const char *user, const char *algorithm)
int PQprotocolVersion(const PGconn *conn)
int PQresetStart(PGconn *conn)
int PQsendQueryParams(PGconn *conn, const char *command, int nParams, const Oid *paramTypes, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat)
int PQgetlength(const PGresult *res, int tup_num, int field_num)
int PQsetSingleRowMode(PGconn *conn)
void PQsetAuthDataHook(PQauthDataHook_type hook)
char * PQoptions(const PGconn *conn)
int PQbinaryTuples(const PGresult *res)
int PQflush(PGconn *conn)
PGresult * PQcopyResult(const PGresult *src, int flags)
void PQfreemem(void *ptr)
void PQdisplayTuples(const PGresult *res, FILE *fp, int fillAlign, const char *fieldSep, int printHeader, int quiet)
int PQgetline(PGconn *conn, char *buffer, int length)
int(* PQauthDataHook_type)(PGauthData type, PGconn *conn, void *data)
char * PQdb(const PGconn *conn)
void PQinitSSL(int do_init)
Oid PQftype(const PGresult *res, int field_num)
PGresult * PQchangePassword(PGconn *conn, const char *user, const char *passwd)
void(* pgthreadlock_t)(int acquire)
int lo_tell(PGconn *conn, int fd)
void * PQgetssl(PGconn *conn)
char * PQresultVerboseErrorMessage(const PGresult *res, PGVerbosity verbosity, PGContextVisibility show_context)
struct PGoauthBearerRequest PGoauthBearerRequest
PGresult * PQdescribePrepared(PGconn *conn, const char *stmt)
PGresult * PQexecParams(PGconn *conn, const char *command, int nParams, const Oid *paramTypes, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat)
int PQexitPipelineMode(PGconn *conn)
PGresult * PQexecPrepared(PGconn *conn, const char *stmtName, int nParams, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat)
int PQsendClosePortal(PGconn *conn, const char *portal)
PGcancel * PQgetCancel(PGconn *conn)
int PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs)
void PQcancelReset(PGcancelConn *cancelConn)
int lo_close(PGconn *conn, int fd)
struct _PQconninfoOption PQconninfoOption
unsigned char * PQunescapeBytea(const unsigned char *strtext, size_t *retbuflen)
const char * pg_encoding_to_char(int encoding)
PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook_OpenSSL(void)
void * PQsslStruct(PGconn *conn, const char *struct_name)
int PQfullProtocolVersion(const PGconn *conn)
void PQreset(PGconn *conn)
int PQenterPipelineMode(PGconn *conn)
int PQsocketPoll(int sock, int forRead, int forWrite, pg_usec_time_t end_time)
int lo_truncate64(PGconn *conn, int fd, int64_t len)
size_t PQescapeStringConn(PGconn *conn, char *to, const char *from, size_t length, int *error)
void PQtrace(PGconn *conn, FILE *debug_port)
char * PQport(const PGconn *conn)
PGresult * PQclosePrepared(PGconn *conn, const char *stmt)
PGTransactionStatusType PQtransactionStatus(const PGconn *conn)
PGcancelConn * PQcancelCreate(PGconn *conn)
PQauthDataHook_type PQgetAuthDataHook(void)
char * PQgetvalue(const PGresult *res, int tup_num, int field_num)
void * PQgetgssctx(PGconn *conn)
PGresult * PQclosePortal(PGconn *conn, const char *portal)
PGresult * PQgetResult(PGconn *conn)
ExecStatusType PQresultStatus(const PGresult *res)
Oid PQparamtype(const PGresult *res, int param_num)
PGconn * PQconnectdb(const char *conninfo)
char * PQhost(const PGconn *conn)
int PQnparams(const PGresult *res)
int PQdefaultSSLKeyPassHook_OpenSSL(char *buf, int size, PGconn *conn)
int pg_char_to_encoding(const char *name)
void PQprintTuples(const PGresult *res, FILE *fout, int PrintAttNames, int TerseOutput, int colWidth)
void PQclear(PGresult *res)
int PQsendClosePrepared(PGconn *conn, const char *stmt)
char * PQcmdTuples(PGresult *res)
struct _PQprintOpt PQprintOpt
int PQconnectionUsedPassword(const PGconn *conn)
PQconninfoOption * PQconninfo(PGconn *conn)
int PQfformat(const PGresult *res, int field_num)
void(* PQnoticeReceiver)(void *arg, const PGresult *res)
void(* PQnoticeProcessor)(void *arg, const char *message)
int PQendcopy(PGconn *conn)
int PQgssEncInUse(PGconn *conn)
PostgresPollingStatusType PQconnectPoll(PGconn *conn)
int PQdefaultAuthDataHook(PGauthData type, PGconn *conn, void *data)
int PQputCopyEnd(PGconn *conn, const char *errormsg)
void PQconninfoFree(PQconninfoOption *connOptions)
Oid lo_creat(PGconn *conn, int mode)
int PQsendPipelineSync(PGconn *conn)
int(* PQsslKeyPassHook_OpenSSL_type)(char *buf, int size, PGconn *conn)
int lo_read(PGconn *conn, int fd, char *buf, size_t len)
int lo_lseek(PGconn *conn, int fd, int offset, int whence)
int PQntuples(const PGresult *res)
int PQputnbytes(PGconn *conn, const char *buffer, int nbytes)
void PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po)
int pg_valid_server_encoding_id(int encoding)
int PQmblen(const char *s, int encoding)
int PQputline(PGconn *conn, const char *string)
int PQgetlineAsync(PGconn *conn, char *buffer, int bufsize)
int lo_open(PGconn *conn, Oid lobjId, int mode)
PostgresPollingStatusType
char * PQtty(const PGconn *conn)
int PQputCopyData(PGconn *conn, const char *buffer, int nbytes)
PQconninfoOption * PQconninfoParse(const char *conninfo, char **errmsg)
const char * PQparameterStatus(const PGconn *conn, const char *paramName)
PGresult * PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status)
ConnStatusType PQcancelStatus(const PGcancelConn *cancelConn)
int64_t lo_lseek64(PGconn *conn, int fd, int64_t offset, int whence)
PGresult * PQprepare(PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes)
int64_t lo_tell64(PGconn *conn, int fd)
int lo_write(PGconn *conn, int fd, const char *buf, size_t len)
int PQconnectionNeedsPassword(const PGconn *conn)
char * PQresultErrorMessage(const PGresult *res)
char * PQencryptPassword(const char *passwd, const char *user)
char * PQpass(const PGconn *conn)
void PQinitOpenSSL(int do_ssl, int do_crypto)
int PQcancelBlocking(PGcancelConn *cancelConn)
int lo_truncate(PGconn *conn, int fd, size_t len)
int PQsendDescribePrepared(PGconn *conn, const char *stmt)
char * PQfname(const PGresult *res, int field_num)
Oid lo_create(PGconn *conn, Oid lobjId)
PostgresPollingStatusType PQresetPoll(PGconn *conn)
int PQsslInUse(PGconn *conn)
int PQconnectionUsedGSSAPI(const PGconn *conn)
size_t PQescapeString(char *to, const char *from, size_t length)
int PQconsumeInput(PGconn *conn)
int PQcancel(PGcancel *cancel, char *errbuf, int errbufsize)
@ PQAUTHDATA_PROMPT_OAUTH_DEVICE
@ PQAUTHDATA_OAUTH_BEARER_TOKEN
ConnStatusType PQstatus(const PGconn *conn)
PGconn * PQconnectStart(const char *conninfo)
Oid PQftable(const PGresult *res, int field_num)
int PQfnumber(const PGresult *res, const char *field_name)
unsigned char * PQescapeBytea(const unsigned char *from, size_t from_length, size_t *to_length)
int PQsetnonblocking(PGconn *conn, int arg)
int PQclientEncoding(const PGconn *conn)
PGconn * PQconnectStartParams(const char *const *keywords, const char *const *values, int expand_dbname)
char * PQescapeLiteral(PGconn *conn, const char *str, size_t len)
void PQfinish(PGconn *conn)
PGresult * PQfn(PGconn *conn, int fnid, int *result_buf, int *result_len, int result_is_int, const PQArgBlock *args, int nargs)
PGPing PQping(const char *conninfo)
int PQsendPrepare(PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes)
PGresult * PQdescribePortal(PGconn *conn, const char *portal)
int PQfmod(const PGresult *res, int field_num)
PGContextVisibility PQsetErrorContextVisibility(PGconn *conn, PGContextVisibility show_context)
int PQdsplen(const char *s, int encoding)
int PQgetisnull(const PGresult *res, int tup_num, int field_num)
int PQftablecol(const PGresult *res, int field_num)
int PQsetChunkedRowsMode(PGconn *conn, int chunkSize)
const char * PQsslAttribute(PGconn *conn, const char *attribute_name)
char * PQresultErrorField(const PGresult *res, int fieldcode)
int PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len)
int PQsendQuery(PGconn *conn, const char *query)
char * PQcmdStatus(PGresult *res)
int PQpipelineSync(PGconn *conn)
PostgresPollingStatusType PQcancelPoll(PGcancelConn *cancelConn)
char * PQoidStatus(const PGresult *res)
PQnoticeReceiver PQsetNoticeReceiver(PGconn *conn, PQnoticeReceiver proc, void *arg)
int PQsendDescribePortal(PGconn *conn, const char *portal)
void PQcancelFinish(PGcancelConn *cancelConn)
PGconn * PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions, const char *pgtty, const char *dbName, const char *login, const char *pwd)
struct _PGpromptOAuthDevice PGpromptOAuthDevice
void PQsetTraceFlags(PGconn *conn, int flags)
char * PQhostaddr(const PGconn *conn)
char * PQresStatus(ExecStatusType status)
size_t PQresultMemorySize(const PGresult *res)
int PQbackendPID(const PGconn *conn)
void * PQresultAlloc(PGresult *res, size_t nBytes)
PQconninfoOption * PQconndefaults(void)
int PQisBusy(PGconn *conn)
PGresult * PQexec(PGconn *conn, const char *query)
pg_usec_time_t PQgetCurrentTimeUSec(void)
unsigned char * PQescapeByteaConn(PGconn *conn, const unsigned char *from, size_t from_length, size_t *to_length)
int PQsendQueryPrepared(PGconn *conn, const char *stmtName, int nParams, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat)
char * PQescapeIdentifier(PGconn *conn, const char *str, size_t len)
int PQsendFlushRequest(PGconn *conn)
int PQrequestCancel(PGconn *conn)
void PQfreeCancel(PGcancel *cancel)
char * PQuser(const PGconn *conn)
int PQcancelSocket(const PGcancelConn *cancelConn)
PGpipelineStatus PQpipelineStatus(const PGconn *conn)
int lo_unlink(PGconn *conn, Oid lobjId)
int PQisnonblocking(const PGconn *conn)
void PQuntrace(PGconn *conn)
PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity)
PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn, PQnoticeProcessor proc, void *arg)
char * PQcancelErrorMessage(const PGcancelConn *cancelConn)
Oid lo_import(PGconn *conn, const char *filename)
Oid PQoidValue(const PGresult *res)
int PQmblenBounded(const char *s, int encoding)
int lo_export(PGconn *conn, Oid lobjId, const char *filename)
const char *const * PQsslAttributeNames(PGconn *conn)
int PQcancelStart(PGcancelConn *cancelConn)
int PQnfields(const PGresult *res)
char * PQerrorMessage(const PGconn *conn)
Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId)
void PQsetSSLKeyPassHook_OpenSSL(PQsslKeyPassHook_OpenSSL_type hook)
PGPing PQpingParams(const char *const *keywords, const char *const *values, int expand_dbname)
int PQsocket(const PGconn *conn)
int PQfsize(const PGresult *res, int field_num)
PGnotify * PQnotifies(PGconn *conn)
int PQsetClientEncoding(PGconn *conn, const char *encoding)
PGconn * PQconnectdbParams(const char *const *keywords, const char *const *values, int expand_dbname)
struct pgresAttDesc PGresAttDesc
pgthreadlock_t PQregisterThreadLock(pgthreadlock_t newhandler)
int PQgetCopyData(PGconn *conn, char **buffer, int async)
static PgChecksumMode mode
static void do_init(void)
static const char * pghost
static const char * pgport
static const char * dbName
static int fd(const char *x, int i)
void(* cleanup)(PGconn *conn, struct PGoauthBearerRequest *request)
const char * openid_configuration
PostgresPollingStatusType(* async)(PGconn *conn, struct PGoauthBearerRequest *request, SOCKTYPE *altsock)
const char * verification_uri_complete
const char * verification_uri