Page loaded_child,
uint32 target_level);
static void bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
- BlockNumber targetblock, Page target);
+ BlockNumber blkno, Page page);
static void bt_tuple_present_callback(Relation index, ItemPointer tid,
Datum *values, bool *isnull,
bool tupleIsAlive, void *checkstate);
bool cube_contains_v0(NDBOX *a, NDBOX *b);
bool cube_overlap_v0(NDBOX *a, NDBOX *b);
NDBOX *cube_union_v0(NDBOX *a, NDBOX *b);
-void rt_cube_size(NDBOX *a, double *sz);
+void rt_cube_size(NDBOX *a, double *size);
NDBOX *g_cube_binary_union(NDBOX *r1, NDBOX *r2, int *sizep);
bool g_cube_leaf_consistent(NDBOX *key, NDBOX *query, StrategyNumber strategy);
bool g_cube_internal_consistent(NDBOX *key, NDBOX *query, StrategyNumber strategy);
static void dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
bool fail, const char *fmt,...) pg_attribute_printf(5, 6);
static char *get_connect_string(const char *servername);
-static char *escape_param_str(const char *from);
+static char *escape_param_str(const char *str);
static void validate_pkattnums(Relation rel,
int2vector *pkattnums_arg, int32 pknumatts_arg,
int **pkattnums, int *pknumatts);
#include
/* prototype for the main function we got from the perl module */
-static void DoubleMetaphone(char *, char **);
+static void DoubleMetaphone(char *str, char **codes);
#ifndef DMETAPHONE_MAIN
ArrayType *copy_intArrayType(ArrayType *a);
ArrayType *resize_intArrayType(ArrayType *a, int num);
int internal_size(int *a, int len);
-ArrayType *_int_unique(ArrayType *a);
+ArrayType *_int_unique(ArrayType *r);
int32 intarray_match_first(ArrayType *a, int32 elem);
ArrayType *intarray_add_elem(ArrayType *a, int32 elem);
ArrayType *intarray_concat_arrays(ArrayType *a, ArrayType *b);
PG_FUNCTION_INFO_V1(_int_matchsel);
-static Selectivity int_query_opr_selec(ITEM *item, Datum *values, float4 *freqs,
- int nmncelems, float4 minfreq);
+static Selectivity int_query_opr_selec(ITEM *item, Datum *mcelems, float4 *mcefreqs,
+ int nmcelems, float4 minfreq);
static int compare_val_int4(const void *a, const void *b);
/*
}
ArrayType *
-int_to_intset(int32 n)
+int_to_intset(int32 elem)
{
ArrayType *result;
int32 *aa;
result = new_intArrayType(1);
aa = ARRPTR(result);
- aa[0] = n;
+ aa[0] = elem;
return result;
}
int ltree_compare(const ltree *a, const ltree *b);
bool inner_isparent(const ltree *c, const ltree *p);
-bool compare_subnode(ltree_level *t, char *q, int len,
+bool compare_subnode(ltree_level *t, char *qn, int len,
int (*cmpptr) (const char *, const char *, size_t), bool anyend);
ltree *lca_inner(ltree **a, int len);
int ltree_strncasecmp(const char *a, const char *b, size_t s);
/* function prototypes */
static void help(const char *progname);
-void get_opts(int, char **, struct options *);
+void get_opts(int argc, char **argv, struct options *my_opts);
void add_one_elt(char *eltname, eary *eary);
char *get_comma_elts(eary *eary);
-PGconn *sql_conn(struct options *);
-int sql_exec(PGconn *, const char *sql, bool quiet);
-void sql_exec_dumpalldbs(PGconn *, struct options *);
-void sql_exec_dumpalltables(PGconn *, struct options *);
-void sql_exec_searchtables(PGconn *, struct options *);
-void sql_exec_dumpalltbspc(PGconn *, struct options *);
+PGconn *sql_conn(struct options *my_opts);
+int sql_exec(PGconn *conn, const char *todo, bool quiet);
+void sql_exec_dumpalldbs(PGconn *conn, struct options *opts);
+void sql_exec_dumpalltables(PGconn *conn, struct options *opts);
+void sql_exec_searchtables(PGconn *conn, struct options *opts);
+void sql_exec_dumpalltbspc(PGconn *conn, struct options *opts);
/* function to parse command line options and check for some usage errors. */
void
int mbuf_size(MBuf *mbuf);
int mbuf_grab(MBuf *mbuf, int len, uint8 **data_p);
int mbuf_steal_data(MBuf *mbuf, uint8 **data_p);
-int mbuf_append(MBuf *dst, const uint8 *buf, int cnt);
+int mbuf_append(MBuf *dst, const uint8 *buf, int len);
int mbuf_free(MBuf *mbuf);
/*
* Push filter
*/
-int pushf_create(PushFilter **res, const PushFilterOps *ops, void *init_arg,
- PushFilter *next);
+int pushf_create(PushFilter **mp_p, const PushFilterOps *op,
+ void *init_arg, PushFilter *next);
int pushf_write(PushFilter *mp, const uint8 *data, int len);
void pushf_free_all(PushFilter *mp);
void pushf_free(PushFilter *mp);
int pushf_flush(PushFilter *mp);
-int pushf_create_mbuf_writer(PushFilter **mp_p, MBuf *mbuf);
+int pushf_create_mbuf_writer(PushFilter **res, MBuf *dst);
/*
* Pull filter
*/
-int pullf_create(PullFilter **res, const PullFilterOps *ops,
+int pullf_create(PullFilter **pf_p, const PullFilterOps *op,
void *init_arg, PullFilter *src);
-int pullf_read(PullFilter *mp, int len, uint8 **data_p);
-int pullf_read_max(PullFilter *mp, int len,
+int pullf_read(PullFilter *pf, int len, uint8 **data_p);
+int pullf_read_max(PullFilter *pf, int len,
uint8 **data_p, uint8 *tmpbuf);
-void pullf_free(PullFilter *mp);
+void pullf_free(PullFilter *pf);
int pullf_read_fixed(PullFilter *src, int len, uint8 *dst);
-int pullf_create_mbuf_reader(PullFilter **pf_p, MBuf *mbuf);
+int pullf_create_mbuf_reader(PullFilter **mp_p, MBuf *src);
#define GETBYTE(pf, dst) \
do { \
/* private stuff */
typedef int (*PFN) (const char *name, void **res);
-static void *find_provider(text *name, PFN pf, const char *desc, int silent);
+static void *find_provider(text *name, PFN provider_lookup, const char *desc,
+ int silent);
/* SQL function: hash(bytea, text) returns bytea */
PG_FUNCTION_INFO_V1(pg_digest);
int can_encrypt;
};
-int pgp_init(PGP_Context **ctx);
+int pgp_init(PGP_Context **ctx_p);
int pgp_encrypt(PGP_Context *ctx, MBuf *src, MBuf *dst);
-int pgp_decrypt(PGP_Context *ctx, MBuf *src, MBuf *dst);
+int pgp_decrypt(PGP_Context *ctx, MBuf *msrc, MBuf *mdst);
int pgp_free(PGP_Context *ctx);
int pgp_get_digest_code(const char *name);
const char *pgp_get_digest_name(int code);
int pgp_set_cipher_algo(PGP_Context *ctx, const char *name);
-int pgp_set_s2k_mode(PGP_Context *ctx, int type);
+int pgp_set_s2k_mode(PGP_Context *ctx, int mode);
int pgp_set_s2k_count(PGP_Context *ctx, int count);
int pgp_set_s2k_cipher_algo(PGP_Context *ctx, const char *name);
int pgp_set_s2k_digest_algo(PGP_Context *ctx, const char *name);
int pgp_set_unicode_mode(PGP_Context *ctx, int mode);
int pgp_get_unicode_mode(PGP_Context *ctx);
-int pgp_set_symkey(PGP_Context *ctx, const uint8 *key, int klen);
+int pgp_set_symkey(PGP_Context *ctx, const uint8 *key, int len);
int pgp_set_pubkey(PGP_Context *ctx, MBuf *keypkt,
- const uint8 *key, int klen, int pubtype);
+ const uint8 *key, int key_len, int pubtype);
int pgp_get_keyid(MBuf *pgp_data, char *dst);
/* internal functions */
-int pgp_load_digest(int c, PX_MD **res);
-int pgp_load_cipher(int c, PX_Cipher **res);
-int pgp_get_cipher_key_size(int c);
-int pgp_get_cipher_block_size(int c);
+int pgp_load_digest(int code, PX_MD **res);
+int pgp_load_cipher(int code, PX_Cipher **res);
+int pgp_get_cipher_key_size(int code);
+int pgp_get_cipher_block_size(int code);
int pgp_s2k_fill(PGP_S2K *s2k, int mode, int digest_algo, int count);
int pgp_s2k_read(PullFilter *src, PGP_S2K *s2k);
-int pgp_s2k_process(PGP_S2K *s2k, int cipher, const uint8 *key, int klen);
+int pgp_s2k_process(PGP_S2K *s2k, int cipher, const uint8 *key, int key_len);
typedef struct PGP_CFB PGP_CFB;
int pgp_cfb_create(PGP_CFB **ctx_p, int algo,
int pgp_mpi_hash(PX_MD *md, PGP_MPI *n);
unsigned pgp_mpi_cksum(unsigned cksum, PGP_MPI *n);
-int pgp_elgamal_encrypt(PGP_PubKey *pk, PGP_MPI *m,
- PGP_MPI **c1, PGP_MPI **c2);
-int pgp_elgamal_decrypt(PGP_PubKey *pk, PGP_MPI *c1, PGP_MPI *c2,
- PGP_MPI **m);
-int pgp_rsa_encrypt(PGP_PubKey *pk, PGP_MPI *m, PGP_MPI **c);
-int pgp_rsa_decrypt(PGP_PubKey *pk, PGP_MPI *c, PGP_MPI **m);
+int pgp_elgamal_encrypt(PGP_PubKey *pk, PGP_MPI *_m,
+ PGP_MPI **c1_p, PGP_MPI **c2_p);
+int pgp_elgamal_decrypt(PGP_PubKey *pk, PGP_MPI *_c1, PGP_MPI *_c2,
+ PGP_MPI **msg_p);
+int pgp_rsa_encrypt(PGP_PubKey *pk, PGP_MPI *_m, PGP_MPI **c_p);
+int pgp_rsa_decrypt(PGP_PubKey *pk, PGP_MPI *_c, PGP_MPI **m_p);
extern struct PullFilterOps pgp_decrypt_filter;
/*
* main interface
*/
-char *px_crypt(const char *psw, const char *salt, char *buf, unsigned buflen);
-int px_gen_salt(const char *salt_type, char *dst, int rounds);
+char *px_crypt(const char *psw, const char *salt, char *buf, unsigned len);
+int px_gen_salt(const char *salt_type, char *buf, int rounds);
/*
* internal functions
/* crypt-md5.c */
char *px_crypt_md5(const char *pw, const char *salt,
- char *dst, unsigned dstlen);
+ char *passwd, unsigned dstlen);
#endif /* _PX_CRYPT_H */
void px_THROW_ERROR(int err) pg_attribute_noreturn();
const char *px_strerror(int err);
-const char *px_resolve_alias(const PX_Alias *aliases, const char *name);
+const char *px_resolve_alias(const PX_Alias *list, const char *name);
void px_set_debug_handler(void (*handler) (const char *));
static void deparseColumnRef(StringInfo buf, int varno, int varattno,
RangeTblEntry *rte, bool qualify_col);
static void deparseRelation(StringInfo buf, Relation rel);
-static void deparseExpr(Expr *expr, deparse_expr_cxt *context);
+static void deparseExpr(Expr *node, deparse_expr_cxt *context);
static void deparseVar(Var *node, deparse_expr_cxt *context);
static void deparseConst(Const *node, deparse_expr_cxt *context, int showtype);
static void deparseParam(Param *node, deparse_expr_cxt *context);
Plan *subplan,
char *query,
List *target_attrs,
- int len,
+ int values_end,
bool has_returning,
List *retrieved_attrs);
static TupleTableSlot **execute_foreign_modify(EState *estate,
RelOptInfo *rel);
extern List *build_tlist_to_deparse(RelOptInfo *foreignrel);
extern void deparseSelectStmtForRel(StringInfo buf, PlannerInfo *root,
- RelOptInfo *foreignrel, List *tlist,
+ RelOptInfo *rel, List *tlist,
List *remote_conds, List *pathkeys,
bool has_final_sort, bool has_limit,
bool is_subquery,
/*
** Auxiliary functions
*/
-static int restore(char *s, float val, int n);
+static int restore(char *result, float val, int n);
/*****************************************************************************
} SEG;
/* in seg.c */
-extern int significant_digits(const char *str);
+extern int significant_digits(const char *s);
/* in segscan.l */
extern int seg_yylex(void);
HTAB *crosstab_hash,
TupleDesc tupdesc,
bool randomAccess);
-static void validateConnectbyTupleDesc(TupleDesc tupdesc, bool show_branch, bool show_serial);
-static bool compatCrosstabTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2);
-static void compatConnectbyTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2);
+static void validateConnectbyTupleDesc(TupleDesc td, bool show_branch, bool show_serial);
+static bool compatCrosstabTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupdesc);
+static void compatConnectbyTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupdesc);
static void get_normal_pair(float8 *x1, float8 *x2);
static Tuplestorestate *connectby(char *relname,
char *key_fld,
static void pg_decode_commit_txn(LogicalDecodingContext *ctx,
ReorderBufferTXN *txn, XLogRecPtr commit_lsn);
static void pg_decode_change(LogicalDecodingContext *ctx,
- ReorderBufferTXN *txn, Relation rel,
+ ReorderBufferTXN *txn, Relation relation,
ReorderBufferChange *change);
static void pg_decode_truncate(LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
static bool pg_decode_filter(LogicalDecodingContext *ctx,
RepOriginId origin_id);
static void pg_decode_message(LogicalDecodingContext *ctx,
- ReorderBufferTXN *txn, XLogRecPtr message_lsn,
+ ReorderBufferTXN *txn, XLogRecPtr lsn,
bool transactional, const char *prefix,
Size sz, const char *message);
static bool pg_decode_filter_prepare(LogicalDecodingContext *ctx,
Relation relation,
ReorderBufferChange *change);
static void pg_decode_stream_message(LogicalDecodingContext *ctx,
- ReorderBufferTXN *txn, XLogRecPtr message_lsn,
+ ReorderBufferTXN *txn, XLogRecPtr lsn,
bool transactional, const char *prefix,
Size sz, const char *message);
static void pg_decode_stream_truncate(LogicalDecodingContext *ctx,