mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Phase 2 pgindent run for v12.
Switch to 2.1 version of pg_bsd_indent. This formats multiline function declarations "correctly", that is with additional lines of parameter declarations indented to match where the first line's left parenthesis is. Discussion: https://postgr.es/m/CAEepm=0P3FeTXRcU5B2W3jv3PgRVZ-kGUXLGfd42FFhUROO3ug@mail.gmail.com
This commit is contained in:
@ -177,9 +177,9 @@ extern struct var_list *ivlist;
|
||||
|
||||
bool ecpg_add_mem(void *ptr, int lineno);
|
||||
|
||||
bool ecpg_get_data(const PGresult *, int, int, int, enum ECPGttype type,
|
||||
enum ECPGttype, char *, char *, long, long, long,
|
||||
enum ARRAY_TYPE, enum COMPAT_MODE, bool);
|
||||
bool ecpg_get_data(const PGresult *, int, int, int, enum ECPGttype type,
|
||||
enum ECPGttype, char *, char *, long, long, long,
|
||||
enum ARRAY_TYPE, enum COMPAT_MODE, bool);
|
||||
|
||||
#ifdef ENABLE_THREAD_SAFETY
|
||||
void ecpg_pthreads_init(void);
|
||||
@ -202,27 +202,27 @@ struct descriptor *ecpggetdescp(int, char *);
|
||||
struct descriptor *ecpg_find_desc(int line, const char *name);
|
||||
|
||||
struct prepared_statement *ecpg_find_prepared_statement(const char *,
|
||||
struct connection *, struct prepared_statement **);
|
||||
struct connection *, struct prepared_statement **);
|
||||
|
||||
void ecpg_update_declare_statement(const char *, const char *, const int);
|
||||
char *ecpg_get_con_name_by_declared_name(const char *);
|
||||
const char *ecpg_get_con_name_by_cursor_name(const char *);
|
||||
void ecpg_release_declared_statement(const char *);
|
||||
|
||||
bool ecpg_store_result(const PGresult *results, int act_field,
|
||||
const struct statement *stmt, struct variable *var);
|
||||
bool ecpg_store_result(const PGresult *results, int act_field,
|
||||
const struct statement *stmt, struct variable *var);
|
||||
bool ecpg_store_input(const int, const bool, const struct variable *, char **, bool);
|
||||
void ecpg_free_params(struct statement *stmt, bool print);
|
||||
bool ecpg_do_prologue(int, const int, const int, const char *, const bool,
|
||||
enum ECPG_statement_type, const char *, va_list,
|
||||
struct statement **);
|
||||
bool ecpg_do_prologue(int, const int, const int, const char *, const bool,
|
||||
enum ECPG_statement_type, const char *, va_list,
|
||||
struct statement **);
|
||||
bool ecpg_build_params(struct statement *);
|
||||
bool ecpg_autostart_transaction(struct statement *stmt);
|
||||
bool ecpg_execute(struct statement *stmt);
|
||||
bool ecpg_process_output(struct statement *, bool);
|
||||
void ecpg_do_epilogue(struct statement *);
|
||||
bool ecpg_do(const int, const int, const int, const char *, const bool,
|
||||
const int, const char *, va_list);
|
||||
bool ecpg_do(const int, const int, const int, const char *, const bool,
|
||||
const int, const char *, va_list);
|
||||
|
||||
bool ecpg_check_PQresult(PGresult *, int, PGconn *, enum COMPAT_MODE);
|
||||
void ecpg_raise(int line, int code, const char *sqlstate, const char *str);
|
||||
|
@ -39,7 +39,7 @@ static stmtCacheEntry *stmtCacheEntries = NULL;
|
||||
static struct declared_statement *g_declared_list;
|
||||
|
||||
static bool deallocate_one(int lineno, enum COMPAT_MODE c, struct connection *con,
|
||||
struct prepared_statement *prev, struct prepared_statement *this);
|
||||
struct prepared_statement *prev, struct prepared_statement *this);
|
||||
static struct declared_statement *ecpg_find_declared_statement(const char *);
|
||||
static bool
|
||||
isvarchar(unsigned char c)
|
||||
|
@ -327,10 +327,10 @@ void GetCurrentDateTime(struct tm *);
|
||||
int date2j(int, int, int);
|
||||
void TrimTrailingZeros(char *);
|
||||
void dt2time(double, int *, int *, int *, fsec_t *);
|
||||
int PGTYPEStimestamp_defmt_scan(char **str, char *fmt, timestamp * d,
|
||||
int *year, int *month, int *day,
|
||||
int *hour, int *minute, int *second,
|
||||
int *tz);
|
||||
int PGTYPEStimestamp_defmt_scan(char **str, char *fmt, timestamp * d,
|
||||
int *year, int *month, int *day,
|
||||
int *hour, int *minute, int *second,
|
||||
int *tz);
|
||||
|
||||
extern char *pgtypes_date_weekdays_short[];
|
||||
extern char *pgtypes_date_months[];
|
||||
|
@ -232,10 +232,10 @@ get_type(enum ECPGttype type)
|
||||
the variable (required to do array fetches of structs).
|
||||
*/
|
||||
static void ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
|
||||
char *varcharsize,
|
||||
char *arrsize, const char *size, const char *prefix, int);
|
||||
char *varcharsize,
|
||||
char *arrsize, const char *size, const char *prefix, int);
|
||||
static void ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsize,
|
||||
struct ECPGtype *type, struct ECPGtype *ind_type, const char *prefix, const char *ind_prefix);
|
||||
struct ECPGtype *type, struct ECPGtype *ind_type, const char *prefix, const char *ind_prefix);
|
||||
|
||||
void
|
||||
ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype *type, const int brace_level,
|
||||
|
@ -53,10 +53,10 @@ void ECPGfree_type(struct ECPGtype *);
|
||||
size is the maxsize in case it is a varchar. Otherwise it is the size of
|
||||
the variable (required to do array fetches of structs).
|
||||
*/
|
||||
void ECPGdump_a_type(FILE *, const char *, struct ECPGtype *, const int,
|
||||
const char *, struct ECPGtype *, const int,
|
||||
const char *, const char *, char *,
|
||||
const char *, const char *);
|
||||
void ECPGdump_a_type(FILE *, const char *, struct ECPGtype *, const int,
|
||||
const char *, struct ECPGtype *, const int,
|
||||
const char *, const char *, char *,
|
||||
const char *, const char *);
|
||||
|
||||
/* A simple struct to keep a variable and its type. */
|
||||
struct ECPGtemp_type
|
||||
|
@ -65,8 +65,8 @@ static char *build_client_first_message(fe_scram_state *state);
|
||||
static char *build_client_final_message(fe_scram_state *state);
|
||||
static bool verify_server_signature(fe_scram_state *state);
|
||||
static void calculate_client_proof(fe_scram_state *state,
|
||||
const char *client_final_message_without_proof,
|
||||
uint8 *result);
|
||||
const char *client_final_message_without_proof,
|
||||
uint8 *result);
|
||||
|
||||
/*
|
||||
* Initialize SCRAM exchange status.
|
||||
|
@ -24,12 +24,12 @@ extern char *pg_fe_getauthname(PQExpBuffer errorMessage);
|
||||
|
||||
/* Prototypes for functions in fe-auth-scram.c */
|
||||
extern void *pg_fe_scram_init(PGconn *conn,
|
||||
const char *password,
|
||||
const char *sasl_mechanism);
|
||||
const char *password,
|
||||
const char *sasl_mechanism);
|
||||
extern void pg_fe_scram_free(void *opaq);
|
||||
extern void pg_fe_scram_exchange(void *opaq, char *input, int inputlen,
|
||||
char **output, int *outputlen,
|
||||
bool *done, bool *success);
|
||||
char **output, int *outputlen,
|
||||
bool *done, bool *success);
|
||||
extern char *pg_fe_scram_build_verifier(const char *password);
|
||||
|
||||
#endif /* FE_AUTH_H */
|
||||
|
@ -66,8 +66,8 @@
|
||||
#include <ldap.h>
|
||||
typedef struct timeval LDAP_TIMEVAL;
|
||||
#endif
|
||||
static int ldapServiceLookup(const char *purl, PQconninfoOption *options,
|
||||
PQExpBuffer errorMessage);
|
||||
static int ldapServiceLookup(const char *purl, PQconninfoOption *options,
|
||||
PQExpBuffer errorMessage);
|
||||
#endif
|
||||
|
||||
#include "common/ip.h"
|
||||
@ -383,44 +383,44 @@ static void release_conn_addrinfo(PGconn *conn);
|
||||
static void sendTerminateConn(PGconn *conn);
|
||||
static PQconninfoOption *conninfo_init(PQExpBuffer errorMessage);
|
||||
static PQconninfoOption *parse_connection_string(const char *conninfo,
|
||||
PQExpBuffer errorMessage, bool use_defaults);
|
||||
PQExpBuffer errorMessage, bool use_defaults);
|
||||
static int uri_prefix_length(const char *connstr);
|
||||
static bool recognized_connection_string(const char *connstr);
|
||||
static PQconninfoOption *conninfo_parse(const char *conninfo,
|
||||
PQExpBuffer errorMessage, bool use_defaults);
|
||||
PQExpBuffer errorMessage, bool use_defaults);
|
||||
static PQconninfoOption *conninfo_array_parse(const char *const *keywords,
|
||||
const char *const *values, PQExpBuffer errorMessage,
|
||||
bool use_defaults, int expand_dbname);
|
||||
const char *const *values, PQExpBuffer errorMessage,
|
||||
bool use_defaults, int expand_dbname);
|
||||
static bool conninfo_add_defaults(PQconninfoOption *options,
|
||||
PQExpBuffer errorMessage);
|
||||
PQExpBuffer errorMessage);
|
||||
static PQconninfoOption *conninfo_uri_parse(const char *uri,
|
||||
PQExpBuffer errorMessage, bool use_defaults);
|
||||
PQExpBuffer errorMessage, bool use_defaults);
|
||||
static bool conninfo_uri_parse_options(PQconninfoOption *options,
|
||||
const char *uri, PQExpBuffer errorMessage);
|
||||
const char *uri, PQExpBuffer errorMessage);
|
||||
static bool conninfo_uri_parse_params(char *params,
|
||||
PQconninfoOption *connOptions,
|
||||
PQExpBuffer errorMessage);
|
||||
PQconninfoOption *connOptions,
|
||||
PQExpBuffer errorMessage);
|
||||
static char *conninfo_uri_decode(const char *str, PQExpBuffer errorMessage);
|
||||
static bool get_hexdigit(char digit, int *value);
|
||||
static const char *conninfo_getval(PQconninfoOption *connOptions,
|
||||
const char *keyword);
|
||||
const char *keyword);
|
||||
static PQconninfoOption *conninfo_storeval(PQconninfoOption *connOptions,
|
||||
const char *keyword, const char *value,
|
||||
PQExpBuffer errorMessage, bool ignoreMissing, bool uri_decode);
|
||||
const char *keyword, const char *value,
|
||||
PQExpBuffer errorMessage, bool ignoreMissing, bool uri_decode);
|
||||
static PQconninfoOption *conninfo_find(PQconninfoOption *connOptions,
|
||||
const char *keyword);
|
||||
const char *keyword);
|
||||
static void defaultNoticeReceiver(void *arg, const PGresult *res);
|
||||
static void defaultNoticeProcessor(void *arg, const char *message);
|
||||
static int parseServiceInfo(PQconninfoOption *options,
|
||||
PQExpBuffer errorMessage);
|
||||
static int parseServiceFile(const char *serviceFile,
|
||||
const char *service,
|
||||
PQconninfoOption *options,
|
||||
PQExpBuffer errorMessage,
|
||||
bool *group_found);
|
||||
static int parseServiceInfo(PQconninfoOption *options,
|
||||
PQExpBuffer errorMessage);
|
||||
static int parseServiceFile(const char *serviceFile,
|
||||
const char *service,
|
||||
PQconninfoOption *options,
|
||||
PQExpBuffer errorMessage,
|
||||
bool *group_found);
|
||||
static char *pwdfMatchesString(char *buf, const char *token);
|
||||
static char *passwordFromFile(const char *hostname, const char *port, const char *dbname,
|
||||
const char *username, const char *pgpassfile);
|
||||
const char *username, const char *pgpassfile);
|
||||
static void pgpassfileWarning(PGconn *conn);
|
||||
static void default_threadlock(int acquire);
|
||||
|
||||
|
@ -53,23 +53,23 @@ static bool static_std_strings = false;
|
||||
|
||||
static PGEvent *dupEvents(PGEvent *events, int count, size_t *memSize);
|
||||
static bool pqAddTuple(PGresult *res, PGresAttValue *tup,
|
||||
const char **errmsgp);
|
||||
const char **errmsgp);
|
||||
static bool PQsendQueryStart(PGconn *conn);
|
||||
static int PQsendQueryGuts(PGconn *conn,
|
||||
const char *command,
|
||||
const char *stmtName,
|
||||
int nParams,
|
||||
const Oid *paramTypes,
|
||||
const char *const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
static int PQsendQueryGuts(PGconn *conn,
|
||||
const char *command,
|
||||
const char *stmtName,
|
||||
int nParams,
|
||||
const Oid *paramTypes,
|
||||
const char *const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
static void parseInput(PGconn *conn);
|
||||
static PGresult *getCopyResult(PGconn *conn, ExecStatusType copytype);
|
||||
static bool PQexecStart(PGconn *conn);
|
||||
static PGresult *PQexecFinish(PGconn *conn);
|
||||
static int PQsendDescribe(PGconn *conn, char desc_type,
|
||||
const char *desc_target);
|
||||
static int PQsendDescribe(PGconn *conn, char desc_type,
|
||||
const char *desc_target);
|
||||
static int check_field_number(const PGresult *res, int field_num);
|
||||
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
|
||||
void pg_GSS_error(const char *mprefix, PGconn *conn,
|
||||
OM_uint32 maj_stat, OM_uint32 min_stat);
|
||||
void pg_GSS_error(const char *mprefix, PGconn *conn,
|
||||
OM_uint32 maj_stat, OM_uint32 min_stat);
|
||||
bool pg_GSS_have_ccache(gss_cred_id_t *cred_out);
|
||||
int pg_GSS_load_servicename(PGconn *conn);
|
||||
#endif /* FE_GSSAPI_COMMON_H */
|
||||
|
@ -56,8 +56,8 @@
|
||||
|
||||
static int pqPutMsgBytes(const void *buf, size_t len, PGconn *conn);
|
||||
static int pqSendSome(PGconn *conn, int len);
|
||||
static int pqSocketCheck(PGconn *conn, int forRead, int forWrite,
|
||||
time_t end_time);
|
||||
static int pqSocketCheck(PGconn *conn, int forRead, int forWrite,
|
||||
time_t end_time);
|
||||
static int pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time);
|
||||
|
||||
/*
|
||||
|
@ -38,17 +38,17 @@
|
||||
|
||||
|
||||
static void do_field(const PQprintOpt *po, const PGresult *res,
|
||||
const int i, const int j, const int fs_len,
|
||||
char **fields,
|
||||
const int nFields, const char **fieldNames,
|
||||
unsigned char *fieldNotNum, int *fieldMax,
|
||||
const int fieldMaxLen, FILE *fout);
|
||||
const int i, const int j, const int fs_len,
|
||||
char **fields,
|
||||
const int nFields, const char **fieldNames,
|
||||
unsigned char *fieldNotNum, int *fieldMax,
|
||||
const int fieldMaxLen, FILE *fout);
|
||||
static char *do_header(FILE *fout, const PQprintOpt *po, const int nFields,
|
||||
int *fieldMax, const char **fieldNames, unsigned char *fieldNotNum,
|
||||
const int fs_len, const PGresult *res);
|
||||
int *fieldMax, const char **fieldNames, unsigned char *fieldNotNum,
|
||||
const int fs_len, const PGresult *res);
|
||||
static void output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields,
|
||||
unsigned char *fieldNotNum, int *fieldMax, char *border,
|
||||
const int row_index);
|
||||
unsigned char *fieldNotNum, int *fieldMax, char *border,
|
||||
const int row_index);
|
||||
static void fill(int length, int max, char filler, FILE *fp);
|
||||
|
||||
/*
|
||||
|
@ -51,9 +51,9 @@ static int getNotify(PGconn *conn);
|
||||
static int getCopyStart(PGconn *conn, ExecStatusType copytype);
|
||||
static int getReadyForQuery(PGconn *conn);
|
||||
static void reportErrorPosition(PQExpBuffer msg, const char *query,
|
||||
int loc, int encoding);
|
||||
static int build_startup_packet(const PGconn *conn, char *packet,
|
||||
const PQEnvironmentOption *options);
|
||||
int loc, int encoding);
|
||||
static int build_startup_packet(const PGconn *conn, char *packet,
|
||||
const PQEnvironmentOption *options);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -18,9 +18,9 @@
|
||||
|
||||
#include "libpq-fe.h"
|
||||
|
||||
extern int pq_verify_peer_name_matches_certificate_name(PGconn *conn,
|
||||
const char *namedata, size_t namelen,
|
||||
char **store_name);
|
||||
extern int pq_verify_peer_name_matches_certificate_name(PGconn *conn,
|
||||
const char *namedata, size_t namelen,
|
||||
char **store_name);
|
||||
extern bool pq_verify_peer_name_matches_certificate(PGconn *conn);
|
||||
|
||||
#endif /* FE_SECURE_COMMON_H */
|
||||
|
@ -62,9 +62,9 @@
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
static int verify_cb(int ok, X509_STORE_CTX *ctx);
|
||||
static int openssl_verify_peer_name_matches_certificate_name(PGconn *conn,
|
||||
ASN1_STRING *name,
|
||||
char **store_name);
|
||||
static int openssl_verify_peer_name_matches_certificate_name(PGconn *conn,
|
||||
ASN1_STRING *name,
|
||||
char **store_name);
|
||||
static void destroy_ssl_system(void);
|
||||
static int initialize_SSL(PGconn *conn);
|
||||
static PostgresPollingStatusType open_client_SSL(PGconn *);
|
||||
|
@ -69,8 +69,8 @@ typedef struct
|
||||
typedef int (*PGEventProc) (PGEventId evtId, void *evtInfo, void *passThrough);
|
||||
|
||||
/* Registers an event proc with the given PGconn. */
|
||||
extern int PQregisterEventProc(PGconn *conn, PGEventProc proc,
|
||||
const char *name, void *passThrough);
|
||||
extern int PQregisterEventProc(PGconn *conn, PGEventProc proc,
|
||||
const char *name, void *passThrough);
|
||||
|
||||
/* Sets the PGconn instance data for the provided proc to data. */
|
||||
extern int PQsetInstanceData(PGconn *conn, PGEventProc proc, void *data);
|
||||
|
@ -256,17 +256,17 @@ typedef struct pgresAttDesc
|
||||
/* Asynchronous (non-blocking) */
|
||||
extern PGconn *PQconnectStart(const char *conninfo);
|
||||
extern PGconn *PQconnectStartParams(const char *const *keywords,
|
||||
const char *const *values, int expand_dbname);
|
||||
const char *const *values, int expand_dbname);
|
||||
extern PostgresPollingStatusType PQconnectPoll(PGconn *conn);
|
||||
|
||||
/* Synchronous (blocking) */
|
||||
extern PGconn *PQconnectdb(const char *conninfo);
|
||||
extern PGconn *PQconnectdbParams(const char *const *keywords,
|
||||
const char *const *values, int expand_dbname);
|
||||
const char *const *values, int expand_dbname);
|
||||
extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport,
|
||||
const char *pgoptions, const char *pgtty,
|
||||
const char *dbName,
|
||||
const char *login, const char *pwd);
|
||||
const char *pgoptions, const char *pgtty,
|
||||
const char *dbName,
|
||||
const char *login, const char *pwd);
|
||||
|
||||
#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)
|
||||
@ -321,7 +321,7 @@ extern char *PQoptions(const PGconn *conn);
|
||||
extern ConnStatusType PQstatus(const PGconn *conn);
|
||||
extern PGTransactionStatusType PQtransactionStatus(const PGconn *conn);
|
||||
extern const char *PQparameterStatus(const PGconn *conn,
|
||||
const char *paramName);
|
||||
const char *paramName);
|
||||
extern int PQprotocolVersion(const PGconn *conn);
|
||||
extern int PQserverVersion(const PGconn *conn);
|
||||
extern char *PQerrorMessage(const PGconn *conn);
|
||||
@ -359,7 +359,7 @@ extern PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity);
|
||||
|
||||
/* Set CONTEXT visibility for PQerrorMessage and PQresultErrorMessage */
|
||||
extern PGContextVisibility PQsetErrorContextVisibility(PGconn *conn,
|
||||
PGContextVisibility show_context);
|
||||
PGContextVisibility show_context);
|
||||
|
||||
/* Enable/disable tracing */
|
||||
extern void PQtrace(PGconn *conn, FILE *debug_port);
|
||||
@ -367,11 +367,11 @@ extern void PQuntrace(PGconn *conn);
|
||||
|
||||
/* Override default notice handling routines */
|
||||
extern PQnoticeReceiver PQsetNoticeReceiver(PGconn *conn,
|
||||
PQnoticeReceiver proc,
|
||||
void *arg);
|
||||
PQnoticeReceiver proc,
|
||||
void *arg);
|
||||
extern PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
|
||||
PQnoticeProcessor proc,
|
||||
void *arg);
|
||||
PQnoticeProcessor proc,
|
||||
void *arg);
|
||||
|
||||
/*
|
||||
* Used to set callback that prevents concurrent access to
|
||||
@ -389,44 +389,44 @@ extern pgthreadlock_t PQregisterThreadLock(pgthreadlock_t newhandler);
|
||||
/* Simple synchronous query */
|
||||
extern PGresult *PQexec(PGconn *conn, const char *query);
|
||||
extern PGresult *PQexecParams(PGconn *conn,
|
||||
const char *command,
|
||||
int nParams,
|
||||
const Oid *paramTypes,
|
||||
const char *const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
const char *command,
|
||||
int nParams,
|
||||
const Oid *paramTypes,
|
||||
const char *const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
extern PGresult *PQprepare(PGconn *conn, const char *stmtName,
|
||||
const char *query, int nParams,
|
||||
const Oid *paramTypes);
|
||||
const char *query, int nParams,
|
||||
const Oid *paramTypes);
|
||||
extern PGresult *PQexecPrepared(PGconn *conn,
|
||||
const char *stmtName,
|
||||
int nParams,
|
||||
const char *const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
const char *stmtName,
|
||||
int nParams,
|
||||
const char *const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
|
||||
/* Interface for multiple-result or asynchronous queries */
|
||||
extern int PQsendQuery(PGconn *conn, const char *query);
|
||||
extern int PQsendQueryParams(PGconn *conn,
|
||||
const char *command,
|
||||
int nParams,
|
||||
const Oid *paramTypes,
|
||||
const char *const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
extern int PQsendPrepare(PGconn *conn, const char *stmtName,
|
||||
const char *query, int nParams,
|
||||
const Oid *paramTypes);
|
||||
extern int PQsendQueryPrepared(PGconn *conn,
|
||||
const char *stmtName,
|
||||
int nParams,
|
||||
const char *const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
extern int PQsendQueryParams(PGconn *conn,
|
||||
const char *command,
|
||||
int nParams,
|
||||
const Oid *paramTypes,
|
||||
const char *const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
extern int PQsendPrepare(PGconn *conn, const char *stmtName,
|
||||
const char *query, int nParams,
|
||||
const Oid *paramTypes);
|
||||
extern int PQsendQueryPrepared(PGconn *conn,
|
||||
const char *stmtName,
|
||||
int nParams,
|
||||
const char *const *paramValues,
|
||||
const int *paramLengths,
|
||||
const int *paramFormats,
|
||||
int resultFormat);
|
||||
extern int PQsetSingleRowMode(PGconn *conn);
|
||||
extern PGresult *PQgetResult(PGconn *conn);
|
||||
|
||||
@ -455,7 +455,7 @@ extern int PQisnonblocking(const PGconn *conn);
|
||||
extern int PQisthreadsafe(void);
|
||||
extern PGPing PQping(const char *conninfo);
|
||||
extern PGPing PQpingParams(const char *const *keywords,
|
||||
const char *const *values, int expand_dbname);
|
||||
const char *const *values, int expand_dbname);
|
||||
|
||||
/* Force the write buffer to be written (or at least try) */
|
||||
extern int PQflush(PGconn *conn);
|
||||
@ -465,20 +465,20 @@ extern int PQflush(PGconn *conn);
|
||||
* use
|
||||
*/
|
||||
extern PGresult *PQfn(PGconn *conn,
|
||||
int fnid,
|
||||
int *result_buf,
|
||||
int *result_len,
|
||||
int result_is_int,
|
||||
const PQArgBlock *args,
|
||||
int nargs);
|
||||
int fnid,
|
||||
int *result_buf,
|
||||
int *result_len,
|
||||
int result_is_int,
|
||||
const PQArgBlock *args,
|
||||
int nargs);
|
||||
|
||||
/* Accessor functions for PGresult objects */
|
||||
extern ExecStatusType PQresultStatus(const PGresult *res);
|
||||
extern char *PQresStatus(ExecStatusType status);
|
||||
extern char *PQresultErrorMessage(const PGresult *res);
|
||||
extern char *PQresultVerboseErrorMessage(const PGresult *res,
|
||||
PGVerbosity verbosity,
|
||||
PGContextVisibility show_context);
|
||||
PGVerbosity verbosity,
|
||||
PGContextVisibility show_context);
|
||||
extern char *PQresultErrorField(const PGresult *res, int fieldcode);
|
||||
extern int PQntuples(const PGresult *res);
|
||||
extern int PQnfields(const PGresult *res);
|
||||
@ -530,44 +530,45 @@ extern int PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, in
|
||||
|
||||
/* Quoting strings before inclusion in queries. */
|
||||
extern size_t PQescapeStringConn(PGconn *conn,
|
||||
char *to, const char *from, size_t length,
|
||||
int *error);
|
||||
char *to, const char *from, size_t length,
|
||||
int *error);
|
||||
extern char *PQescapeLiteral(PGconn *conn, const char *str, size_t len);
|
||||
extern char *PQescapeIdentifier(PGconn *conn, const char *str, size_t len);
|
||||
extern unsigned char *PQescapeByteaConn(PGconn *conn,
|
||||
const unsigned char *from, size_t from_length,
|
||||
size_t *to_length);
|
||||
const unsigned char *from, size_t from_length,
|
||||
size_t *to_length);
|
||||
extern unsigned char *PQunescapeBytea(const unsigned char *strtext,
|
||||
size_t *retbuflen);
|
||||
size_t *retbuflen);
|
||||
|
||||
/* These forms are deprecated! */
|
||||
extern size_t PQescapeString(char *to, const char *from, size_t length);
|
||||
extern unsigned char *PQescapeBytea(const unsigned char *from, size_t from_length,
|
||||
size_t *to_length);
|
||||
size_t *to_length);
|
||||
|
||||
|
||||
|
||||
/* === in fe-print.c === */
|
||||
|
||||
extern void PQprint(FILE *fout, /* output stream */
|
||||
const PGresult *res,
|
||||
const PQprintOpt *ps); /* option structure */
|
||||
extern void PQprint(FILE *fout, /* output stream */
|
||||
const PGresult *res,
|
||||
const PQprintOpt *ps); /* option structure */
|
||||
|
||||
/*
|
||||
* really old printing routines
|
||||
*/
|
||||
extern void PQdisplayTuples(const PGresult *res,
|
||||
FILE *fp, /* where to send the output */
|
||||
int fillAlign, /* pad the fields with spaces */
|
||||
const char *fieldSep, /* field separator */
|
||||
int printHeader, /* display headers? */
|
||||
int quiet);
|
||||
FILE *fp, /* where to send the output */
|
||||
int fillAlign, /* pad the fields with spaces */
|
||||
const char *fieldSep, /* field separator */
|
||||
int printHeader, /* display headers? */
|
||||
int quiet);
|
||||
|
||||
extern void PQprintTuples(const PGresult *res,
|
||||
FILE *fout, /* output stream */
|
||||
int printAttName, /* print attribute names */
|
||||
int terseOutput, /* delimiter bars */
|
||||
int width); /* width of column, if 0, use variable width */
|
||||
FILE *fout, /* output stream */
|
||||
int printAttName, /* print attribute names */
|
||||
int terseOutput, /* delimiter bars */
|
||||
int width); /* width of column, if 0, use variable
|
||||
* width */
|
||||
|
||||
|
||||
/* === in fe-lobj.c === */
|
||||
|
@ -558,8 +558,8 @@ extern char *const pgresStatus[];
|
||||
/* === in fe-connect.c === */
|
||||
|
||||
extern void pqDropConnection(PGconn *conn, bool flushInput);
|
||||
extern int pqPacketSend(PGconn *conn, char pack_type,
|
||||
const void *buf, size_t buf_len);
|
||||
extern int pqPacketSend(PGconn *conn, char pack_type,
|
||||
const void *buf, size_t buf_len);
|
||||
extern bool pqGetHomeDirectory(char *buf, int bufsize);
|
||||
|
||||
#ifdef ENABLE_THREAD_SAFETY
|
||||
@ -590,9 +590,9 @@ extern void pqSaveErrorResult(PGconn *conn);
|
||||
extern PGresult *pqPrepareAsyncResult(PGconn *conn);
|
||||
extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...) pg_attribute_printf(2, 3);
|
||||
extern void pqSaveMessageField(PGresult *res, char code,
|
||||
const char *value);
|
||||
const char *value);
|
||||
extern void pqSaveParameterStatus(PGconn *conn, const char *name,
|
||||
const char *value);
|
||||
const char *value);
|
||||
extern int pqRowProcessor(PGconn *conn, const char **errmsgp);
|
||||
|
||||
/* === in fe-protocol2.c === */
|
||||
@ -600,33 +600,33 @@ extern int pqRowProcessor(PGconn *conn, const char **errmsgp);
|
||||
extern PostgresPollingStatusType pqSetenvPoll(PGconn *conn);
|
||||
|
||||
extern char *pqBuildStartupPacket2(PGconn *conn, int *packetlen,
|
||||
const PQEnvironmentOption *options);
|
||||
const PQEnvironmentOption *options);
|
||||
extern void pqParseInput2(PGconn *conn);
|
||||
extern int pqGetCopyData2(PGconn *conn, char **buffer, int async);
|
||||
extern int pqGetline2(PGconn *conn, char *s, int maxlen);
|
||||
extern int pqGetlineAsync2(PGconn *conn, char *buffer, int bufsize);
|
||||
extern int pqEndcopy2(PGconn *conn);
|
||||
extern PGresult *pqFunctionCall2(PGconn *conn, Oid fnid,
|
||||
int *result_buf, int *actual_result_len,
|
||||
int result_is_int,
|
||||
const PQArgBlock *args, int nargs);
|
||||
int *result_buf, int *actual_result_len,
|
||||
int result_is_int,
|
||||
const PQArgBlock *args, int nargs);
|
||||
|
||||
/* === in fe-protocol3.c === */
|
||||
|
||||
extern char *pqBuildStartupPacket3(PGconn *conn, int *packetlen,
|
||||
const PQEnvironmentOption *options);
|
||||
const PQEnvironmentOption *options);
|
||||
extern void pqParseInput3(PGconn *conn);
|
||||
extern int pqGetErrorNotice3(PGconn *conn, bool isError);
|
||||
extern void pqBuildErrorMessage3(PQExpBuffer msg, const PGresult *res,
|
||||
PGVerbosity verbosity, PGContextVisibility show_context);
|
||||
PGVerbosity verbosity, PGContextVisibility show_context);
|
||||
extern int pqGetCopyData3(PGconn *conn, char **buffer, int async);
|
||||
extern int pqGetline3(PGconn *conn, char *s, int maxlen);
|
||||
extern int pqGetlineAsync3(PGconn *conn, char *buffer, int bufsize);
|
||||
extern int pqEndcopy3(PGconn *conn);
|
||||
extern PGresult *pqFunctionCall3(PGconn *conn, Oid fnid,
|
||||
int *result_buf, int *actual_result_len,
|
||||
int result_is_int,
|
||||
const PQArgBlock *args, int nargs);
|
||||
int *result_buf, int *actual_result_len,
|
||||
int result_is_int,
|
||||
const PQArgBlock *args, int nargs);
|
||||
|
||||
/* === in fe-misc.c === */
|
||||
|
||||
@ -652,8 +652,8 @@ extern int pqPutMsgEnd(PGconn *conn);
|
||||
extern int pqReadData(PGconn *conn);
|
||||
extern int pqFlush(PGconn *conn);
|
||||
extern int pqWait(int forRead, int forWrite, PGconn *conn);
|
||||
extern int pqWaitTimed(int forRead, int forWrite, PGconn *conn,
|
||||
time_t finish_time);
|
||||
extern int pqWaitTimed(int forRead, int forWrite, PGconn *conn,
|
||||
time_t finish_time);
|
||||
extern int pqReadReady(PGconn *conn);
|
||||
extern int pqWriteReady(PGconn *conn);
|
||||
|
||||
@ -671,7 +671,7 @@ extern ssize_t pqsecure_raw_write(PGconn *, const void *ptr, size_t len);
|
||||
#if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32)
|
||||
extern int pq_block_sigpipe(sigset_t *osigset, bool *sigpipe_pending);
|
||||
extern void pq_reset_sigpipe(sigset_t *osigset, bool sigpipe_pending,
|
||||
bool got_epipe);
|
||||
bool got_epipe);
|
||||
#endif
|
||||
|
||||
/* === SSL === */
|
||||
@ -752,9 +752,9 @@ extern char *pgtls_get_peer_certificate_hash(PGconn *conn, size_t *len);
|
||||
* -1, and sets the libpq error message.
|
||||
*
|
||||
*/
|
||||
extern int pgtls_verify_peer_name_matches_certificate_guts(PGconn *conn,
|
||||
int *names_examined,
|
||||
char **first_name);
|
||||
extern int pgtls_verify_peer_name_matches_certificate_guts(PGconn *conn,
|
||||
int *names_examined,
|
||||
char **first_name);
|
||||
|
||||
/* === GSSAPI === */
|
||||
|
||||
|
@ -177,6 +177,6 @@ extern void appendPQExpBufferChar(PQExpBuffer str, char ch);
|
||||
* if necessary.
|
||||
*/
|
||||
extern void appendBinaryPQExpBuffer(PQExpBuffer str,
|
||||
const char *data, size_t datalen);
|
||||
const char *data, size_t datalen);
|
||||
|
||||
#endif /* PQEXPBUFFER_H */
|
||||
|
Reference in New Issue
Block a user