Eneboo - Documentación para desarrolladores
Clases | 'defines' | 'typedefs' | Enumeraciones | Funciones
Referencia del Archivo src/libpq/libpq-fe.h
#include <stdio.h>
#include "postgres_ext.h"

Ir al código fuente de este archivo.

Clases

struct  pgNotify
struct  _PQprintOpt
struct  _PQconninfoOption
struct  PQArgBlock

'defines'

#define PQsetdb(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME)   PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL)
#define PQfreeNotify(ptr)   PQfreemem(ptr)
#define PQnoPasswordSupplied   "fe_sendauth: no password supplied\n"

'typedefs'

typedef struct pg_conn PGconn
typedef struct pg_result PGresult
typedef struct pg_cancel PGcancel
typedef struct pgNotify PGnotify
typedef void(* PQnoticeReceiver )(void *arg, const PGresult *res)
typedef void(* PQnoticeProcessor )(void *arg, const char *message)
typedef char pqbool
typedef struct _PQprintOpt PQprintOpt
typedef struct _PQconninfoOption PQconninfoOption
typedef void(* pgthreadlock_t )(int acquire)

Enumeraciones

enum  ConnStatusType {
  CONNECTION_OK, CONNECTION_BAD, CONNECTION_STARTED, CONNECTION_MADE,
  CONNECTION_AWAITING_RESPONSE, CONNECTION_AUTH_OK, CONNECTION_SETENV, CONNECTION_SSL_STARTUP,
  CONNECTION_NEEDED
}
enum  PostgresPollingStatusType {
  PGRES_POLLING_FAILED = 0, PGRES_POLLING_READING, PGRES_POLLING_WRITING, PGRES_POLLING_OK,
  PGRES_POLLING_ACTIVE
}
enum  ExecStatusType {
  PGRES_EMPTY_QUERY = 0, PGRES_COMMAND_OK, PGRES_TUPLES_OK, PGRES_COPY_OUT,
  PGRES_COPY_IN, PGRES_BAD_RESPONSE, PGRES_NONFATAL_ERROR, PGRES_FATAL_ERROR
}
enum  PGTransactionStatusType {
  PQTRANS_IDLE, PQTRANS_ACTIVE, PQTRANS_INTRANS, PQTRANS_INERROR,
  PQTRANS_UNKNOWN
}
enum  PGVerbosity { PQERRORS_TERSE, PQERRORS_DEFAULT, PQERRORS_VERBOSE }

Funciones

PGconnPQconnectStart (const char *conninfo)
PostgresPollingStatusType PQconnectPoll (PGconn *conn)
PGconnPQconnectdb (const char *conninfo)
PGconnPQsetdbLogin (const char *pghost, const char *pgport, const char *pgoptions, const char *pgtty, const char *dbName, const char *login, const char *pwd)
void PQfinish (PGconn *conn)
PQconninfoOptionPQconndefaults (void)
void PQconninfoFree (PQconninfoOption *connOptions)
int PQresetStart (PGconn *conn)
PostgresPollingStatusType PQresetPoll (PGconn *conn)
void PQreset (PGconn *conn)
PGcancelPQgetCancel (PGconn *conn)
void PQfreeCancel (PGcancel *cancel)
int PQcancel (PGcancel *cancel, char *errbuf, int errbufsize)
int PQrequestCancel (PGconn *conn)
char * PQdb (const PGconn *conn)
char * PQuser (const PGconn *conn)
char * PQpass (const PGconn *conn)
char * PQhost (const PGconn *conn)
char * PQport (const PGconn *conn)
char * PQtty (const PGconn *conn)
char * PQoptions (const PGconn *conn)
ConnStatusType PQstatus (const PGconn *conn)
PGTransactionStatusType PQtransactionStatus (const PGconn *conn)
const char * PQparameterStatus (const PGconn *conn, const char *paramName)
int PQprotocolVersion (const PGconn *conn)
int PQserverVersion (const PGconn *conn)
char * PQerrorMessage (const PGconn *conn)
int PQsocket (const PGconn *conn)
int PQbackendPID (const PGconn *conn)
int PQclientEncoding (const PGconn *conn)
int PQsetClientEncoding (PGconn *conn, const char *encoding)
void * PQgetssl (PGconn *conn)
void PQinitSSL (int do_init)
PGVerbosity PQsetErrorVerbosity (PGconn *conn, PGVerbosity verbosity)
void PQtrace (PGconn *conn, FILE *debug_port)
void PQuntrace (PGconn *conn)
PQnoticeReceiver PQsetNoticeReceiver (PGconn *conn, PQnoticeReceiver proc, void *arg)
PQnoticeProcessor PQsetNoticeProcessor (PGconn *conn, PQnoticeProcessor proc, void *arg)
pgthreadlock_t PQregisterThreadLock (pgthreadlock_t newhandler)
PGresultPQexec (PGconn *conn, const char *query)
PGresultPQexecParams (PGconn *conn, const char *command, int nParams, const Oid *paramTypes, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat)
PGresultPQprepare (PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes)
PGresultPQexecPrepared (PGconn *conn, const char *stmtName, int nParams, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat)
int PQsendQuery (PGconn *conn, const char *query)
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 PQsendPrepare (PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes)
int PQsendQueryPrepared (PGconn *conn, const char *stmtName, int nParams, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat)
PGresultPQgetResult (PGconn *conn)
int PQisBusy (PGconn *conn)
int PQconsumeInput (PGconn *conn)
PGnotifyPQnotifies (PGconn *conn)
int PQputCopyData (PGconn *conn, const char *buffer, int nbytes)
int PQputCopyEnd (PGconn *conn, const char *errormsg)
int PQgetCopyData (PGconn *conn, char **buffer, int async)
int PQgetline (PGconn *conn, char *string, int length)
int PQputline (PGconn *conn, const char *string)
int PQgetlineAsync (PGconn *conn, char *buffer, int bufsize)
int PQputnbytes (PGconn *conn, const char *buffer, int nbytes)
int PQendcopy (PGconn *conn)
int PQsetnonblocking (PGconn *conn, int arg)
int PQisnonblocking (const PGconn *conn)
int PQflush (PGconn *conn)
PGresultPQfn (PGconn *conn, int fnid, int *result_buf, int *result_len, int result_is_int, const PQArgBlock *args, int nargs)
ExecStatusType PQresultStatus (const PGresult *res)
char * PQresStatus (ExecStatusType status)
char * PQresultErrorMessage (const PGresult *res)
char * PQresultErrorField (const PGresult *res, int fieldcode)
int PQntuples (const PGresult *res)
int PQnfields (const PGresult *res)
int PQbinaryTuples (const PGresult *res)
char * PQfname (const PGresult *res, int field_num)
int PQfnumber (const PGresult *res, const char *field_name)
Oid PQftable (const PGresult *res, int field_num)
int PQftablecol (const PGresult *res, int field_num)
int PQfformat (const PGresult *res, int field_num)
Oid PQftype (const PGresult *res, int field_num)
int PQfsize (const PGresult *res, int field_num)
int PQfmod (const PGresult *res, int field_num)
char * PQcmdStatus (PGresult *res)
char * PQoidStatus (const PGresult *res)
Oid PQoidValue (const PGresult *res)
char * PQcmdTuples (PGresult *res)
char * PQgetvalue (const PGresult *res, int tup_num, int field_num)
int PQgetlength (const PGresult *res, int tup_num, int field_num)
int PQgetisnull (const PGresult *res, int tup_num, int field_num)
void PQclear (PGresult *res)
void PQfreemem (void *ptr)
PGresultPQmakeEmptyPGresult (PGconn *conn, ExecStatusType status)
size_t PQescapeStringConn (PGconn *conn, char *to, const char *from, size_t length, int *error)
unsigned char * PQescapeByteaConn (PGconn *conn, const unsigned char *from, size_t from_length, size_t *to_length)
unsigned char * PQunescapeBytea (const unsigned char *strtext, size_t *retbuflen)
size_t PQescapeString (char *to, const char *from, size_t length)
unsigned char * PQescapeBytea (const unsigned char *from, size_t from_length, size_t *to_length)
void PQprint (FILE *fout, const PGresult *res, const PQprintOpt *ps)
void PQdisplayTuples (const PGresult *res, FILE *fp, int fillAlign, const char *fieldSep, int printHeader, int quiet)
void PQprintTuples (const PGresult *res, FILE *fout, int printAttName, int terseOutput, int width)
int lo_open (PGconn *conn, Oid lobjId, int mode)
int lo_close (PGconn *conn, int fd)
int lo_read (PGconn *conn, int fd, char *buf, size_t len)
int lo_write (PGconn *conn, int fd, char *buf, size_t len)
int lo_lseek (PGconn *conn, int fd, int offset, int whence)
Oid lo_creat (PGconn *conn, int mode)
Oid lo_create (PGconn *conn, Oid lobjId)
int lo_tell (PGconn *conn, int fd)
int lo_unlink (PGconn *conn, Oid lobjId)
Oid lo_import (PGconn *conn, const char *filename)
int lo_export (PGconn *conn, Oid lobjId, const char *filename)
int PQmblen (const char *s, int encoding)
int PQdsplen (const char *s, int encoding)
int PQenv2encoding (void)

Documentación de los 'defines'

#define PQfreeNotify (   ptr)    PQfreemem(ptr)
#define PQnoPasswordSupplied   "fe_sendauth: no password supplied\n"
#define PQsetdb (   M_PGHOST,
  M_PGPORT,
  M_PGOPT,
  M_PGTTY,
  M_DBNAME 
)    PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL)

Documentación de los 'typedefs'

typedef struct pg_cancel PGcancel
typedef struct pg_conn PGconn
typedef struct pgNotify PGnotify
typedef struct pg_result PGresult
typedef void(* pgthreadlock_t)(int acquire)
typedef char pqbool
typedef void(* PQnoticeProcessor)(void *arg, const char *message)
typedef void(* PQnoticeReceiver)(void *arg, const PGresult *res)
typedef struct _PQprintOpt PQprintOpt

Documentación de las enumeraciones

Valores de enumeraciones:
CONNECTION_OK 
CONNECTION_BAD 
CONNECTION_STARTED 
CONNECTION_MADE 
CONNECTION_AWAITING_RESPONSE 
CONNECTION_AUTH_OK 
CONNECTION_SETENV 
CONNECTION_SSL_STARTUP 
CONNECTION_NEEDED 
Valores de enumeraciones:
PGRES_EMPTY_QUERY 
PGRES_COMMAND_OK 
PGRES_TUPLES_OK 
PGRES_COPY_OUT 
PGRES_COPY_IN 
PGRES_BAD_RESPONSE 
PGRES_NONFATAL_ERROR 
PGRES_FATAL_ERROR 
Valores de enumeraciones:
PQTRANS_IDLE 
PQTRANS_ACTIVE 
PQTRANS_INTRANS 
PQTRANS_INERROR 
PQTRANS_UNKNOWN 
Valores de enumeraciones:
PQERRORS_TERSE 
PQERRORS_DEFAULT 
PQERRORS_VERBOSE 
Valores de enumeraciones:
PGRES_POLLING_FAILED 
PGRES_POLLING_READING 
PGRES_POLLING_WRITING 
PGRES_POLLING_OK 
PGRES_POLLING_ACTIVE 

Documentación de las funciones

int lo_close ( PGconn conn,
int  fd 
)
Oid lo_creat ( PGconn conn,
int  mode 
)
Oid lo_create ( PGconn conn,
Oid  lobjId 
)
int lo_export ( PGconn conn,
Oid  lobjId,
const char *  filename 
)
Oid lo_import ( PGconn conn,
const char *  filename 
)
int lo_lseek ( PGconn conn,
int  fd,
int  offset,
int  whence 
)
int lo_open ( PGconn conn,
Oid  lobjId,
int  mode 
)
int lo_read ( PGconn conn,
int  fd,
char *  buf,
size_t  len 
)
int lo_tell ( PGconn conn,
int  fd 
)
int lo_unlink ( PGconn conn,
Oid  lobjId 
)
int lo_write ( PGconn conn,
int  fd,
char *  buf,
size_t  len 
)
int PQbackendPID ( const PGconn conn)
int PQbinaryTuples ( const PGresult res)
int PQcancel ( PGcancel cancel,
char *  errbuf,
int  errbufsize 
)
void PQclear ( PGresult res)
int PQclientEncoding ( const PGconn conn)
char* PQcmdStatus ( PGresult res)
char* PQcmdTuples ( PGresult res)
PQconninfoOption* PQconndefaults ( void  )
PGconn* PQconnectdb ( const char *  conninfo)
PostgresPollingStatusType PQconnectPoll ( PGconn conn)
PGconn* PQconnectStart ( const char *  conninfo)
void PQconninfoFree ( PQconninfoOption connOptions)
int PQconsumeInput ( PGconn conn)
char* PQdb ( const PGconn conn)
void PQdisplayTuples ( const PGresult res,
FILE *  fp,
int  fillAlign,
const char *  fieldSep,
int  printHeader,
int  quiet 
)
int PQdsplen ( const char *  s,
int  encoding 
)
int PQendcopy ( PGconn conn)
int PQenv2encoding ( void  )
char* PQerrorMessage ( const PGconn conn)
unsigned char* PQescapeBytea ( const unsigned char *  from,
size_t  from_length,
size_t to_length 
)
unsigned char* PQescapeByteaConn ( PGconn conn,
const unsigned char *  from,
size_t  from_length,
size_t to_length 
)
size_t PQescapeString ( char *  to,
const char *  from,
size_t  length 
)
size_t PQescapeStringConn ( PGconn conn,
char *  to,
const char *  from,
size_t  length,
int error 
)
PGresult* PQexec ( PGconn conn,
const char *  query 
)
PGresult* PQexecParams ( PGconn conn,
const char *  command,
int  nParams,
const Oid paramTypes,
const char *const *  paramValues,
const int paramLengths,
const int paramFormats,
int  resultFormat 
)
PGresult* PQexecPrepared ( PGconn conn,
const char *  stmtName,
int  nParams,
const char *const *  paramValues,
const int paramLengths,
const int paramFormats,
int  resultFormat 
)
int PQfformat ( const PGresult res,
int  field_num 
)
void PQfinish ( PGconn conn)
int PQflush ( PGconn conn)
int PQfmod ( const PGresult res,
int  field_num 
)
PGresult* PQfn ( PGconn conn,
int  fnid,
int result_buf,
int result_len,
int  result_is_int,
const PQArgBlock args,
int  nargs 
)
char* PQfname ( const PGresult res,
int  field_num 
)
int PQfnumber ( const PGresult res,
const char *  field_name 
)
void PQfreeCancel ( PGcancel cancel)
void PQfreemem ( void *  ptr)
int PQfsize ( const PGresult res,
int  field_num 
)
Oid PQftable ( const PGresult res,
int  field_num 
)
int PQftablecol ( const PGresult res,
int  field_num 
)
Oid PQftype ( const PGresult res,
int  field_num 
)
PGcancel* PQgetCancel ( PGconn conn)
int PQgetCopyData ( PGconn conn,
char **  buffer,
int  async 
)
int PQgetisnull ( const PGresult res,
int  tup_num,
int  field_num 
)
int PQgetlength ( const PGresult res,
int  tup_num,
int  field_num 
)
int PQgetline ( PGconn conn,
char *  string,
int  length 
)
int PQgetlineAsync ( PGconn conn,
char *  buffer,
int  bufsize 
)
PGresult* PQgetResult ( PGconn conn)
void* PQgetssl ( PGconn conn)
char* PQgetvalue ( const PGresult res,
int  tup_num,
int  field_num 
)
char* PQhost ( const PGconn conn)
void PQinitSSL ( int  do_init)
int PQisBusy ( PGconn conn)
int PQisnonblocking ( const PGconn conn)
PGresult* PQmakeEmptyPGresult ( PGconn conn,
ExecStatusType  status 
)
int PQmblen ( const char *  s,
int  encoding 
)
int PQnfields ( const PGresult res)
PGnotify* PQnotifies ( PGconn conn)
int PQntuples ( const PGresult res)
char* PQoidStatus ( const PGresult res)
Oid PQoidValue ( const PGresult res)
char* PQoptions ( const PGconn conn)
const char* PQparameterStatus ( const PGconn conn,
const char *  paramName 
)
char* PQpass ( const PGconn conn)
char* PQport ( const PGconn conn)
PGresult* PQprepare ( PGconn conn,
const char *  stmtName,
const char *  query,
int  nParams,
const Oid paramTypes 
)
void PQprint ( FILE *  fout,
const PGresult res,
const PQprintOpt ps 
)
void PQprintTuples ( const PGresult res,
FILE *  fout,
int  printAttName,
int  terseOutput,
int  width 
)
int PQprotocolVersion ( const PGconn conn)
int PQputCopyData ( PGconn conn,
const char *  buffer,
int  nbytes 
)
int PQputCopyEnd ( PGconn conn,
const char *  errormsg 
)
int PQputline ( PGconn conn,
const char *  string 
)
int PQputnbytes ( PGconn conn,
const char *  buffer,
int  nbytes 
)
pgthreadlock_t PQregisterThreadLock ( pgthreadlock_t  newhandler)
int PQrequestCancel ( PGconn conn)
void PQreset ( PGconn conn)
PostgresPollingStatusType PQresetPoll ( PGconn conn)
int PQresetStart ( PGconn conn)
char* PQresStatus ( ExecStatusType  status)
char* PQresultErrorField ( const PGresult res,
int  fieldcode 
)
char* PQresultErrorMessage ( const PGresult res)
ExecStatusType PQresultStatus ( const PGresult res)
int PQsendPrepare ( PGconn conn,
const char *  stmtName,
const char *  query,
int  nParams,
const Oid paramTypes 
)
int PQsendQuery ( PGconn conn,
const char *  query 
)
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 PQsendQueryPrepared ( PGconn conn,
const char *  stmtName,
int  nParams,
const char *const *  paramValues,
const int paramLengths,
const int paramFormats,
int  resultFormat 
)
int PQserverVersion ( const PGconn conn)
int PQsetClientEncoding ( PGconn conn,
const char *  encoding 
)
PGconn* PQsetdbLogin ( const char *  pghost,
const char *  pgport,
const char *  pgoptions,
const char *  pgtty,
const char *  dbName,
const char *  login,
const char *  pwd 
)
PGVerbosity PQsetErrorVerbosity ( PGconn conn,
PGVerbosity  verbosity 
)
int PQsetnonblocking ( PGconn conn,
int  arg 
)
PQnoticeProcessor PQsetNoticeProcessor ( PGconn conn,
PQnoticeProcessor  proc,
void *  arg 
)
PQnoticeReceiver PQsetNoticeReceiver ( PGconn conn,
PQnoticeReceiver  proc,
void *  arg 
)
int PQsocket ( const PGconn conn)
ConnStatusType PQstatus ( const PGconn conn)
void PQtrace ( PGconn conn,
FILE *  debug_port 
)
PGTransactionStatusType PQtransactionStatus ( const PGconn conn)
char* PQtty ( const PGconn conn)
unsigned char* PQunescapeBytea ( const unsigned char *  strtext,
size_t retbuflen 
)
void PQuntrace ( PGconn conn)
char* PQuser ( const PGconn conn)
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'