Harmonize more parameter names in bulk.

Make sure that function declarations use names that exactly match the
corresponding names from function definitions in optimizer, parser,
utility, libpq, and "commands" code, as well as in remaining library
code.  Do the same for all code related to frontend programs (with the
exception of pg_dump/pg_dumpall related code).

Like other recent commits that cleaned up function parameter names, this
commit was written with help from clang-tidy.  Later commits will handle
ecpg and pg_dump/pg_dumpall.

Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: David Rowley <dgrowleyml@gmail.com>
Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
This commit is contained in:
Peter Geoghegan 2022-09-20 13:09:30 -07:00
parent c3382a3c3c
commit a601366a46
131 changed files with 297 additions and 293 deletions

View File

@ -74,7 +74,7 @@ typedef struct
pg_checksum_type manifest_checksum_type;
} basebackup_options;
static int64 sendTablespace(bbsink *sink, char *path, char *oid, bool sizeonly,
static int64 sendTablespace(bbsink *sink, char *path, char *spcoid, bool sizeonly,
struct backup_manifest_info *manifest);
static int64 sendDir(bbsink *sink, const char *path, int basepathlen, bool sizeonly,
List *tablespaces, bool sendtblspclinks,

View File

@ -463,19 +463,19 @@ boot_openrel(char *relname)
* ----------------
*/
void
closerel(char *name)
closerel(char *relname)
{
if (name)
if (relname)
{
if (boot_reldesc)
{
if (strcmp(RelationGetRelationName(boot_reldesc), name) != 0)
if (strcmp(RelationGetRelationName(boot_reldesc), relname) != 0)
elog(ERROR, "close of %s when %s was expected",
name, RelationGetRelationName(boot_reldesc));
relname, RelationGetRelationName(boot_reldesc));
}
else
elog(ERROR, "close of %s before any relation was opened",
name);
relname);
}
if (boot_reldesc == NULL)

View File

@ -94,7 +94,7 @@ static void AlterEventTriggerOwner_internal(Relation rel,
static void error_duplicate_filter_variable(const char *defname);
static Datum filter_list_to_array(List *filterlist);
static Oid insert_event_trigger_tuple(const char *trigname, const char *eventname,
Oid evtOwner, Oid funcoid, List *tags);
Oid evtOwner, Oid funcoid, List *taglist);
static void validate_ddl_tags(const char *filtervar, List *taglist);
static void validate_table_rewrite_tags(const char *filtervar, List *taglist);
static void EventTriggerInvoke(List *fn_oid_list, EventTriggerData *trigdata);

View File

@ -111,7 +111,7 @@ static void show_incremental_sort_info(IncrementalSortState *incrsortstate,
static void show_hash_info(HashState *hashstate, ExplainState *es);
static void show_memoize_info(MemoizeState *mstate, List *ancestors,
ExplainState *es);
static void show_hashagg_info(AggState *hashstate, ExplainState *es);
static void show_hashagg_info(AggState *aggstate, ExplainState *es);
static void show_tidbitmap_info(BitmapHeapScanState *planstate,
ExplainState *es);
static void show_instrumentation_count(const char *qlabel, int which,

View File

@ -98,7 +98,7 @@ static Oid ReindexTable(RangeVar *relation, ReindexParams *params,
bool isTopLevel);
static void ReindexMultipleTables(const char *objectName,
ReindexObjectType objectKind, ReindexParams *params);
static void reindex_error_callback(void *args);
static void reindex_error_callback(void *arg);
static void ReindexPartitions(Oid relid, ReindexParams *params,
bool isTopLevel);
static void ReindexMultipleInternal(List *relids,

View File

@ -29,7 +29,7 @@
#include "utils/syscache.h"
static void LockTableRecurse(Oid reloid, LOCKMODE lockmode, bool nowait);
static AclResult LockTableAclCheck(Oid relid, LOCKMODE lockmode, Oid userid);
static AclResult LockTableAclCheck(Oid reloid, LOCKMODE lockmode, Oid userid);
static void RangeVarCallbackForLockTable(const RangeVar *rv, Oid relid,
Oid oldrelid, void *arg);
static void LockViewRecurse(Oid reloid, LOCKMODE lockmode, bool nowait,

View File

@ -52,7 +52,7 @@
static void AlterOpFamilyAdd(AlterOpFamilyStmt *stmt,
Oid amoid, Oid opfamilyoid,
int maxOpNumber, int maxProcNumber,
int opclassOptsProcNumber, List *items);
int optsProcNumber, List *items);
static void AlterOpFamilyDrop(AlterOpFamilyStmt *stmt,
Oid amoid, Oid opfamilyoid,
int maxOpNumber, int maxProcNumber,

View File

@ -285,16 +285,16 @@ RenameSchema(const char *oldname, const char *newname)
}
void
AlterSchemaOwner_oid(Oid oid, Oid newOwnerId)
AlterSchemaOwner_oid(Oid schemaoid, Oid newOwnerId)
{
HeapTuple tup;
Relation rel;
rel = table_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCache1(NAMESPACEOID, ObjectIdGetDatum(oid));
tup = SearchSysCache1(NAMESPACEOID, ObjectIdGetDatum(schemaoid));
if (!HeapTupleIsValid(tup))
elog(ERROR, "cache lookup failed for schema %u", oid);
elog(ERROR, "cache lookup failed for schema %u", schemaoid);
AlterSchemaOwner_internal(tup, rel, newOwnerId);

View File

@ -550,7 +550,7 @@ static ObjectAddress ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel,
AlterTableCmd *cmd, LOCKMODE lockmode);
static void RememberConstraintForRebuilding(Oid conoid, AlteredTableInfo *tab);
static void RememberIndexForRebuilding(Oid indoid, AlteredTableInfo *tab);
static void RememberStatisticsForRebuilding(Oid indoid, AlteredTableInfo *tab);
static void RememberStatisticsForRebuilding(Oid stxoid, AlteredTableInfo *tab);
static void ATPostAlterTypeCleanup(List **wqueue, AlteredTableInfo *tab,
LOCKMODE lockmode);
static void ATPostAlterTypeParse(Oid oldId, Oid oldRelId, Oid refRelId,
@ -610,7 +610,7 @@ static void ComputePartitionAttrs(ParseState *pstate, Relation rel, List *partPa
List **partexprs, Oid *partopclass, Oid *partcollation, char strategy);
static void CreateInheritance(Relation child_rel, Relation parent_rel);
static void RemoveInheritance(Relation child_rel, Relation parent_rel,
bool allow_detached);
bool expect_detached);
static ObjectAddress ATExecAttachPartition(List **wqueue, Relation rel,
PartitionCmd *cmd,
AlterTableUtilityContext *context);
@ -627,7 +627,7 @@ static ObjectAddress ATExecDetachPartition(List **wqueue, AlteredTableInfo *tab,
static void DetachPartitionFinalize(Relation rel, Relation partRel,
bool concurrent, Oid defaultPartOid);
static ObjectAddress ATExecDetachPartitionFinalize(Relation rel, RangeVar *name);
static ObjectAddress ATExecAttachPartitionIdx(List **wqueue, Relation rel,
static ObjectAddress ATExecAttachPartitionIdx(List **wqueue, Relation parentIdx,
RangeVar *name);
static void validatePartitionedIndex(Relation partedIdx, Relation partedTbl);
static void refuseDupeIndexAttach(Relation parentIdx, Relation partIdx,

View File

@ -86,8 +86,8 @@ static bool GetTupleForTrigger(EState *estate,
ItemPointer tid,
LockTupleMode lockmode,
TupleTableSlot *oldslot,
TupleTableSlot **newSlot,
TM_FailureData *tmfpd);
TupleTableSlot **epqslot,
TM_FailureData *tmfdp);
static bool TriggerEnabled(EState *estate, ResultRelInfo *relinfo,
Trigger *trigger, TriggerEvent event,
Bitmapset *modifiedCols,
@ -101,7 +101,7 @@ static void AfterTriggerSaveEvent(EState *estate, ResultRelInfo *relinfo,
ResultRelInfo *src_partinfo,
ResultRelInfo *dst_partinfo,
int event, bool row_trigger,
TupleTableSlot *oldtup, TupleTableSlot *newtup,
TupleTableSlot *oldslot, TupleTableSlot *newslot,
List *recheckIndexes, Bitmapset *modifiedCols,
TransitionCaptureState *transition_capture,
bool is_crosspart_update);
@ -3871,7 +3871,7 @@ static void TransitionTableAddTuple(EState *estate,
Tuplestorestate *tuplestore);
static void AfterTriggerFreeQuery(AfterTriggersQueryData *qs);
static SetConstraintState SetConstraintStateCreate(int numalloc);
static SetConstraintState SetConstraintStateCopy(SetConstraintState state);
static SetConstraintState SetConstraintStateCopy(SetConstraintState origstate);
static SetConstraintState SetConstraintStateAddItem(SetConstraintState state,
Oid tgoid, bool tgisdeferred);
static void cancel_prior_stmt_triggers(Oid relid, CmdType cmdType, int tgevent);

View File

@ -167,7 +167,7 @@ struct dshash_table
static void delete_item(dshash_table *hash_table,
dshash_table_item *item);
static void resize(dshash_table *hash_table, size_t new_size);
static void resize(dshash_table *hash_table, size_t new_size_log2);
static inline void ensure_valid_bucket_pointers(dshash_table *hash_table);
static inline dshash_table_item *find_in_bucket(dshash_table *hash_table,
const void *key,

View File

@ -264,9 +264,9 @@ static void intset_update_upper(IntegerSet *intset, int level,
intset_node *child, uint64 child_key);
static void intset_flush_buffered_values(IntegerSet *intset);
static int intset_binsrch_uint64(uint64 value, uint64 *arr, int arr_elems,
static int intset_binsrch_uint64(uint64 item, uint64 *arr, int arr_elems,
bool nextkey);
static int intset_binsrch_leaf(uint64 value, leaf_item *arr, int arr_elems,
static int intset_binsrch_leaf(uint64 item, leaf_item *arr, int arr_elems,
bool nextkey);
static uint64 simple8b_encode(const uint64 *ints, int *num_encoded, uint64 base);

View File

@ -62,10 +62,10 @@ static BIO_METHOD *my_BIO_s_socket(void);
static int my_SSL_set_fd(Port *port, int fd);
static DH *load_dh_file(char *filename, bool isServerStart);
static DH *load_dh_buffer(const char *, size_t);
static DH *load_dh_buffer(const char *buffer, size_t len);
static int ssl_external_passwd_cb(char *buf, int size, int rwflag, void *userdata);
static int dummy_ssl_passwd_cb(char *buf, int size, int rwflag, void *userdata);
static int verify_cb(int, X509_STORE_CTX *);
static int verify_cb(int ok, X509_STORE_CTX *ctx);
static void info_cb(const SSL *ssl, int type, int args);
static bool initialize_dh(SSL_CTX *context, bool isServerStart);
static bool initialize_ecdh(SSL_CTX *context, bool isServerStart);

View File

@ -42,7 +42,7 @@
#include "optimizer/geqo_random.h"
#include "optimizer/geqo_selection.h"
static int linear_rand(PlannerInfo *root, int max, double bias);
static int linear_rand(PlannerInfo *root, int pool_size, double bias);
/*

View File

@ -311,7 +311,7 @@ static ModifyTable *make_modifytable(PlannerInfo *root, Plan *subplan,
List *updateColnosLists,
List *withCheckOptionLists, List *returningLists,
List *rowMarks, OnConflictExpr *onconflict,
List *mergeActionList, int epqParam);
List *mergeActionLists, int epqParam);
static GatherMerge *create_gather_merge_plan(PlannerInfo *root,
GatherMergePath *best_path);

View File

@ -3086,13 +3086,13 @@ extract_rollup_sets(List *groupingSets)
* gets implemented in one pass.)
*/
static List *
reorder_grouping_sets(List *groupingsets, List *sortclause)
reorder_grouping_sets(List *groupingSets, List *sortclause)
{
ListCell *lc;
List *previous = NIL;
List *result = NIL;
foreach(lc, groupingsets)
foreach(lc, groupingSets)
{
List *candidate = (List *) lfirst(lc);
List *new_elems = list_difference_int(candidate, previous);

View File

@ -75,7 +75,8 @@ static List *build_index_tlist(PlannerInfo *root, IndexOptInfo *index,
static List *get_relation_statistics(RelOptInfo *rel, Relation relation);
static void set_relation_partition_info(PlannerInfo *root, RelOptInfo *rel,
Relation relation);
static PartitionScheme find_partition_scheme(PlannerInfo *root, Relation rel);
static PartitionScheme find_partition_scheme(PlannerInfo *root,
Relation relation);
static void set_baserel_partition_key_exprs(Relation relation,
RelOptInfo *rel);
static void set_baserel_partition_constraint(Relation relation,

View File

@ -205,8 +205,7 @@ static Node *makeXmlExpr(XmlExprOp op, char *name, List *named_args,
static List *mergeTableFuncParameters(List *func_args, List *columns);
static TypeName *TableFuncTypeName(List *columns);
static RangeVar *makeRangeVarFromAnyName(List *names, int position, core_yyscan_t yyscanner);
static RangeVar *makeRangeVarFromQualifiedName(char *name, List *rels,
int location,
static RangeVar *makeRangeVarFromQualifiedName(char *name, List *namelist, int location,
core_yyscan_t yyscanner);
static void SplitColQualList(List *qualList,
List **constraintList, CollateClause **collClause,

View File

@ -67,7 +67,7 @@ static ParseNamespaceItem *transformRangeSubselect(ParseState *pstate,
static ParseNamespaceItem *transformRangeFunction(ParseState *pstate,
RangeFunction *r);
static ParseNamespaceItem *transformRangeTableFunc(ParseState *pstate,
RangeTableFunc *t);
RangeTableFunc *rtf);
static TableSampleClause *transformRangeTableSample(ParseState *pstate,
RangeTableSample *rts);
static ParseNamespaceItem *getNSItemForSpecialRelationTypes(ParseState *pstate,

View File

@ -139,7 +139,7 @@ static void transformPartitionCmd(CreateStmtContext *cxt, PartitionCmd *cmd);
static List *transformPartitionRangeBounds(ParseState *pstate, List *blist,
Relation parent);
static void validateInfiniteBounds(ParseState *pstate, List *blist);
static Const *transformPartitionBoundValue(ParseState *pstate, Node *con,
static Const *transformPartitionBoundValue(ParseState *pstate, Node *val,
const char *colName, Oid colType, int32 colTypmod,
Oid partCollation);

View File

@ -104,7 +104,7 @@ static PartitionBoundInfo create_list_bounds(PartitionBoundSpec **boundspecs,
static PartitionBoundInfo create_range_bounds(PartitionBoundSpec **boundspecs,
int nparts, PartitionKey key, int **mapping);
static PartitionBoundInfo merge_list_bounds(FmgrInfo *partsupfunc,
Oid *collations,
Oid *partcollation,
RelOptInfo *outer_rel,
RelOptInfo *inner_rel,
JoinType jointype,
@ -123,8 +123,8 @@ static void free_partition_map(PartitionMap *map);
static bool is_dummy_partition(RelOptInfo *rel, int part_index);
static int merge_matching_partitions(PartitionMap *outer_map,
PartitionMap *inner_map,
int outer_part,
int inner_part,
int outer_index,
int inner_index,
int *next_index);
static int process_outer_partition(PartitionMap *outer_map,
PartitionMap *inner_map,

View File

@ -414,7 +414,7 @@ static void report_fork_failure_to_client(Port *port, int errnum);
static CAC_state canAcceptConnections(int backend_type);
static bool RandomCancelKey(int32 *cancel_key);
static void signal_child(pid_t pid, int signal);
static bool SignalSomeChildren(int signal, int targets);
static bool SignalSomeChildren(int signal, int target);
static void TerminateChildren(int signal);
#define SignalChildren(sig) SignalSomeChildren(sig, BACKEND_TYPE_ALL)
@ -2598,9 +2598,9 @@ ConnCreate(int serverFd)
* to do here.
*/
static void
ConnFree(Port *conn)
ConnFree(Port *port)
{
free(conn);
free(port);
}

View File

@ -83,7 +83,7 @@ static void statext_store(Oid statOid, bool inh,
MVNDistinct *ndistinct, MVDependencies *dependencies,
MCVList *mcv, Datum exprs, VacAttrStats **stats);
static int statext_compute_stattarget(int stattarget,
int natts, VacAttrStats **stats);
int nattrs, VacAttrStats **stats);
/* Information needed to analyze a single simple expression. */
typedef struct AnlExprData
@ -99,7 +99,7 @@ static Datum serialize_expr_stats(AnlExprData *exprdata, int nexprs);
static Datum expr_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
static AnlExprData *build_expr_data(List *exprs, int stattarget);
static StatsBuildData *make_build_data(Relation onerel, StatExtEntry *stat,
static StatsBuildData *make_build_data(Relation rel, StatExtEntry *stat,
int numrows, HeapTuple *rows,
VacAttrStats **stats, int stattarget);

View File

@ -32,7 +32,7 @@
#include "utils/memutils.h"
#include "utils/tzparser.h"
static int DecodeNumber(int flen, char *field, bool haveTextMonth,
static int DecodeNumber(int flen, char *str, bool haveTextMonth,
int fmask, int *tmask,
struct pg_tm *tm, fsec_t *fsec, bool *is2digits);
static int DecodeNumberField(int len, char *str,
@ -281,26 +281,26 @@ static const datetkn *abbrevcache[MAXDATEFIELDS] = {NULL};
*/
int
date2j(int y, int m, int d)
date2j(int year, int month, int day)
{
int julian;
int century;
if (m > 2)
if (month > 2)
{
m += 1;
y += 4800;
month += 1;
year += 4800;
}
else
{
m += 13;
y += 4799;
month += 13;
year += 4799;
}
century = y / 100;
julian = y * 365 - 32167;
julian += y / 4 - century + century / 4;
julian += 7834 * m / 256 + d;
century = year / 100;
julian = year * 365 - 32167;
julian += year / 4 - century + century / 4;
julian += 7834 * month / 256 + day;
return julian;
} /* date2j() */

View File

@ -90,7 +90,7 @@ static inline float8 line_sl(LINE *line);
static inline float8 line_invsl(LINE *line);
static bool line_interpt_line(Point *result, LINE *l1, LINE *l2);
static bool line_contain_point(LINE *line, Point *point);
static float8 line_closept_point(Point *result, LINE *line, Point *pt);
static float8 line_closept_point(Point *result, LINE *line, Point *point);
/* Routines for line segments */
static inline void statlseg_construct(LSEG *lseg, Point *pt1, Point *pt2);
@ -98,8 +98,8 @@ static inline float8 lseg_sl(LSEG *lseg);
static inline float8 lseg_invsl(LSEG *lseg);
static bool lseg_interpt_line(Point *result, LSEG *lseg, LINE *line);
static bool lseg_interpt_lseg(Point *result, LSEG *l1, LSEG *l2);
static int lseg_crossing(float8 x, float8 y, float8 px, float8 py);
static bool lseg_contain_point(LSEG *lseg, Point *point);
static int lseg_crossing(float8 x, float8 y, float8 prev_x, float8 prev_y);
static bool lseg_contain_point(LSEG *lseg, Point *pt);
static float8 lseg_closept_point(Point *result, LSEG *lseg, Point *pt);
static float8 lseg_closept_line(Point *result, LSEG *lseg, LINE *line);
static float8 lseg_closept_lseg(Point *result, LSEG *on_lseg, LSEG *to_lseg);
@ -115,7 +115,7 @@ static bool box_contain_point(BOX *box, Point *point);
static bool box_contain_box(BOX *contains_box, BOX *contained_box);
static bool box_contain_lseg(BOX *box, LSEG *lseg);
static bool box_interpt_lseg(Point *result, BOX *box, LSEG *lseg);
static float8 box_closept_point(Point *result, BOX *box, Point *point);
static float8 box_closept_point(Point *result, BOX *box, Point *pt);
static float8 box_closept_lseg(Point *result, BOX *box, LSEG *lseg);
/* Routines for circles */

View File

@ -188,12 +188,12 @@ JsonbContainerTypeName(JsonbContainer *jbc)
* Get the type name of a jsonb value.
*/
const char *
JsonbTypeName(JsonbValue *jbv)
JsonbTypeName(JsonbValue *val)
{
switch (jbv->type)
switch (val->type)
{
case jbvBinary:
return JsonbContainerTypeName(jbv->val.binary.data);
return JsonbContainerTypeName(val->val.binary.data);
case jbvObject:
return "object";
case jbvArray:
@ -207,7 +207,7 @@ JsonbTypeName(JsonbValue *jbv)
case jbvNull:
return "null";
case jbvDatetime:
switch (jbv->val.datetime.typid)
switch (val->val.datetime.typid)
{
case DATEOID:
return "date";
@ -221,11 +221,11 @@ JsonbTypeName(JsonbValue *jbv)
return "timestamp with time zone";
default:
elog(ERROR, "unrecognized jsonb value datetime type: %d",
jbv->val.datetime.typid);
val->val.datetime.typid);
}
return "unknown";
default:
elog(ERROR, "unrecognized jsonb value type: %d", jbv->type);
elog(ERROR, "unrecognized jsonb value type: %d", val->type);
return "unknown";
}
}

View File

@ -57,13 +57,13 @@ static short padBufferToInt(StringInfo buffer);
static JsonbIterator *iteratorFromContainer(JsonbContainer *container, JsonbIterator *parent);
static JsonbIterator *freeAndGetParent(JsonbIterator *it);
static JsonbParseState *pushState(JsonbParseState **pstate);
static void appendKey(JsonbParseState *pstate, JsonbValue *scalarVal);
static void appendKey(JsonbParseState *pstate, JsonbValue *string);
static void appendValue(JsonbParseState *pstate, JsonbValue *scalarVal);
static void appendElement(JsonbParseState *pstate, JsonbValue *scalarVal);
static int lengthCompareJsonbStringValue(const void *a, const void *b);
static int lengthCompareJsonbString(const char *val1, int len1,
const char *val2, int len2);
static int lengthCompareJsonbPair(const void *a, const void *b, void *arg);
static int lengthCompareJsonbPair(const void *a, const void *b, void *binequal);
static void uniqueifyJsonbObject(JsonbValue *object);
static JsonbValue *pushJsonbValueScalar(JsonbParseState **pstate,
JsonbIteratorToken seq,
@ -1394,22 +1394,22 @@ JsonbHashScalarValueExtended(const JsonbValue *scalarVal, uint64 *hash,
* Are two scalar JsonbValues of the same type a and b equal?
*/
static bool
equalsJsonbScalarValue(JsonbValue *aScalar, JsonbValue *bScalar)
equalsJsonbScalarValue(JsonbValue *a, JsonbValue *b)
{
if (aScalar->type == bScalar->type)
if (a->type == b->type)
{
switch (aScalar->type)
switch (a->type)
{
case jbvNull:
return true;
case jbvString:
return lengthCompareJsonbStringValue(aScalar, bScalar) == 0;
return lengthCompareJsonbStringValue(a, b) == 0;
case jbvNumeric:
return DatumGetBool(DirectFunctionCall2(numeric_eq,
PointerGetDatum(aScalar->val.numeric),
PointerGetDatum(bScalar->val.numeric)));
PointerGetDatum(a->val.numeric),
PointerGetDatum(b->val.numeric)));
case jbvBool:
return aScalar->val.boolean == bScalar->val.boolean;
return a->val.boolean == b->val.boolean;
default:
elog(ERROR, "invalid jsonb scalar type");
@ -1426,28 +1426,28 @@ equalsJsonbScalarValue(JsonbValue *aScalar, JsonbValue *bScalar)
* operators, where a lexical sort order is generally expected.
*/
static int
compareJsonbScalarValue(JsonbValue *aScalar, JsonbValue *bScalar)
compareJsonbScalarValue(JsonbValue *a, JsonbValue *b)
{
if (aScalar->type == bScalar->type)
if (a->type == b->type)
{
switch (aScalar->type)
switch (a->type)
{
case jbvNull:
return 0;
case jbvString:
return varstr_cmp(aScalar->val.string.val,
aScalar->val.string.len,
bScalar->val.string.val,
bScalar->val.string.len,
return varstr_cmp(a->val.string.val,
a->val.string.len,
b->val.string.val,
b->val.string.len,
DEFAULT_COLLATION_OID);
case jbvNumeric:
return DatumGetInt32(DirectFunctionCall2(numeric_cmp,
PointerGetDatum(aScalar->val.numeric),
PointerGetDatum(bScalar->val.numeric)));
PointerGetDatum(a->val.numeric),
PointerGetDatum(b->val.numeric)));
case jbvBool:
if (aScalar->val.boolean == bScalar->val.boolean)
if (a->val.boolean == b->val.boolean)
return 0;
else if (aScalar->val.boolean > bScalar->val.boolean)
else if (a->val.boolean > b->val.boolean)
return 1;
else
return -1;
@ -1608,13 +1608,13 @@ convertJsonbValue(StringInfo buffer, JEntry *header, JsonbValue *val, int level)
}
static void
convertJsonbArray(StringInfo buffer, JEntry *pheader, JsonbValue *val, int level)
convertJsonbArray(StringInfo buffer, JEntry *header, JsonbValue *val, int level)
{
int base_offset;
int jentry_offset;
int i;
int totallen;
uint32 header;
uint32 containerhead;
int nElems = val->val.array.nElems;
/* Remember where in the buffer this array starts. */
@ -1627,15 +1627,15 @@ convertJsonbArray(StringInfo buffer, JEntry *pheader, JsonbValue *val, int level
* Construct the header Jentry and store it in the beginning of the
* variable-length payload.
*/
header = nElems | JB_FARRAY;
containerhead = nElems | JB_FARRAY;
if (val->val.array.rawScalar)
{
Assert(nElems == 1);
Assert(level == 0);
header |= JB_FSCALAR;
containerhead |= JB_FSCALAR;
}
appendToBuffer(buffer, (char *) &header, sizeof(uint32));
appendToBuffer(buffer, (char *) &containerhead, sizeof(uint32));
/* Reserve space for the JEntries of the elements. */
jentry_offset = reserveFromBuffer(buffer, sizeof(JEntry) * nElems);
@ -1688,17 +1688,17 @@ convertJsonbArray(StringInfo buffer, JEntry *pheader, JsonbValue *val, int level
JENTRY_OFFLENMASK)));
/* Initialize the header of this node in the container's JEntry array */
*pheader = JENTRY_ISCONTAINER | totallen;
*header = JENTRY_ISCONTAINER | totallen;
}
static void
convertJsonbObject(StringInfo buffer, JEntry *pheader, JsonbValue *val, int level)
convertJsonbObject(StringInfo buffer, JEntry *header, JsonbValue *val, int level)
{
int base_offset;
int jentry_offset;
int i;
int totallen;
uint32 header;
uint32 containerheader;
int nPairs = val->val.object.nPairs;
/* Remember where in the buffer this object starts. */
@ -1711,8 +1711,8 @@ convertJsonbObject(StringInfo buffer, JEntry *pheader, JsonbValue *val, int leve
* Construct the header Jentry and store it in the beginning of the
* variable-length payload.
*/
header = nPairs | JB_FOBJECT;
appendToBuffer(buffer, (char *) &header, sizeof(uint32));
containerheader = nPairs | JB_FOBJECT;
appendToBuffer(buffer, (char *) &containerheader, sizeof(uint32));
/* Reserve space for the JEntries of the keys and values. */
jentry_offset = reserveFromBuffer(buffer, sizeof(JEntry) * nPairs * 2);
@ -1804,11 +1804,11 @@ convertJsonbObject(StringInfo buffer, JEntry *pheader, JsonbValue *val, int leve
JENTRY_OFFLENMASK)));
/* Initialize the header of this node in the container's JEntry array */
*pheader = JENTRY_ISCONTAINER | totallen;
*header = JENTRY_ISCONTAINER | totallen;
}
static void
convertJsonbScalar(StringInfo buffer, JEntry *jentry, JsonbValue *scalarVal)
convertJsonbScalar(StringInfo buffer, JEntry *header, JsonbValue *scalarVal)
{
int numlen;
short padlen;
@ -1816,13 +1816,13 @@ convertJsonbScalar(StringInfo buffer, JEntry *jentry, JsonbValue *scalarVal)
switch (scalarVal->type)
{
case jbvNull:
*jentry = JENTRY_ISNULL;
*header = JENTRY_ISNULL;
break;
case jbvString:
appendToBuffer(buffer, scalarVal->val.string.val, scalarVal->val.string.len);
*jentry = scalarVal->val.string.len;
*header = scalarVal->val.string.len;
break;
case jbvNumeric:
@ -1831,11 +1831,11 @@ convertJsonbScalar(StringInfo buffer, JEntry *jentry, JsonbValue *scalarVal)
appendToBuffer(buffer, (char *) scalarVal->val.numeric, numlen);
*jentry = JENTRY_ISNUMERIC | (padlen + numlen);
*header = JENTRY_ISNUMERIC | (padlen + numlen);
break;
case jbvBool:
*jentry = (scalarVal->val.boolean) ?
*header = (scalarVal->val.boolean) ?
JENTRY_ISBOOL_TRUE : JENTRY_ISBOOL_FALSE;
break;
@ -1851,7 +1851,7 @@ convertJsonbScalar(StringInfo buffer, JEntry *jentry, JsonbValue *scalarVal)
len = strlen(buf);
appendToBuffer(buffer, buf, len);
*jentry = len;
*header = len;
}
break;

View File

@ -252,7 +252,7 @@ static int JsonbType(JsonbValue *jb);
static JsonbValue *getScalar(JsonbValue *scalar, enum jbvType type);
static JsonbValue *wrapItemsInArray(const JsonValueList *items);
static int compareDatetime(Datum val1, Oid typid1, Datum val2, Oid typid2,
bool useTz, bool *have_error);
bool useTz, bool *cast_error);
/****************** User interface to JsonPath executor ********************/

View File

@ -33,11 +33,11 @@
static int SB_MatchText(const char *t, int tlen, const char *p, int plen,
pg_locale_t locale, bool locale_is_c);
static text *SB_do_like_escape(text *, text *);
static text *SB_do_like_escape(text *pat, text *esc);
static int MB_MatchText(const char *t, int tlen, const char *p, int plen,
pg_locale_t locale, bool locale_is_c);
static text *MB_do_like_escape(text *, text *);
static text *MB_do_like_escape(text *pat, text *esc);
static int UTF8_MatchText(const char *t, int tlen, const char *p, int plen,
pg_locale_t locale, bool locale_is_c);

View File

@ -499,7 +499,7 @@ static void zero_var(NumericVar *var);
static const char *set_var_from_str(const char *str, const char *cp,
NumericVar *dest);
static void set_var_from_num(Numeric value, NumericVar *dest);
static void set_var_from_num(Numeric num, NumericVar *dest);
static void init_var_from_num(Numeric num, NumericVar *dest);
static void set_var_from_var(const NumericVar *value, NumericVar *dest);
static char *get_str_from_var(const NumericVar *var);
@ -510,7 +510,7 @@ static void numericvar_deserialize(StringInfo buf, NumericVar *var);
static Numeric duplicate_numeric(Numeric num);
static Numeric make_result(const NumericVar *var);
static Numeric make_result_opt_error(const NumericVar *var, bool *error);
static Numeric make_result_opt_error(const NumericVar *var, bool *have_error);
static void apply_typmod(NumericVar *var, int32 typmod);
static void apply_typmod_special(Numeric num, int32 typmod);
@ -591,7 +591,7 @@ static void compute_bucket(Numeric operand, Numeric bound1, Numeric bound2,
const NumericVar *count_var, bool reversed_bounds,
NumericVar *result_var);
static void accum_sum_add(NumericSumAccum *accum, const NumericVar *var1);
static void accum_sum_add(NumericSumAccum *accum, const NumericVar *val);
static void accum_sum_rescale(NumericSumAccum *accum, const NumericVar *val);
static void accum_sum_carry(NumericSumAccum *accum);
static void accum_sum_reset(NumericSumAccum *accum);

View File

@ -55,14 +55,14 @@ typedef struct RangeIOData
static RangeIOData *get_range_io_data(FunctionCallInfo fcinfo, Oid rngtypid,
IOFuncSelector func);
static char range_parse_flags(const char *flags_str);
static void range_parse(const char *input_str, char *flags, char **lbound_str,
static void range_parse(const char *string, char *flags, char **lbound_str,
char **ubound_str);
static const char *range_parse_bound(const char *string, const char *ptr,
char **bound_str, bool *infinite);
static char *range_deparse(char flags, const char *lbound_str,
const char *ubound_str);
static char *range_bound_escape(const char *value);
static Size datum_compute_size(Size sz, Datum datum, bool typbyval,
static Size datum_compute_size(Size data_length, Datum val, bool typbyval,
char typalign, int16 typlen, char typstorage);
static Pointer datum_write(Pointer ptr, Datum datum, bool typbyval,
char typalign, int16 typlen, char typstorage);

View File

@ -196,7 +196,7 @@ static void ri_GenerateQual(StringInfo buf,
Oid opoid,
const char *rightop, Oid rightoptype);
static void ri_GenerateQualCollation(StringInfo buf, Oid collation);
static int ri_NullCheck(TupleDesc tupdesc, TupleTableSlot *slot,
static int ri_NullCheck(TupleDesc tupDesc, TupleTableSlot *slot,
const RI_ConstraintInfo *riinfo, bool rel_is_pk);
static void ri_BuildQueryKey(RI_QueryKey *key,
const RI_ConstraintInfo *riinfo,

View File

@ -2034,9 +2034,9 @@ time2t(const int hour, const int min, const int sec, const fsec_t fsec)
}
static Timestamp
dt2local(Timestamp dt, int tz)
dt2local(Timestamp dt, int timezone)
{
dt -= (tz * USECS_PER_SEC);
dt -= (timezone * USECS_PER_SEC);
return dt;
}

View File

@ -121,7 +121,7 @@ static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID,
xmlParserCtxtPtr ctxt);
static void xml_errorHandler(void *data, xmlErrorPtr error);
static void xml_ereport_by_code(int level, int sqlcode,
const char *msg, int errcode);
const char *msg, int code);
static void chopStringInfoNewlines(StringInfo str);
static void appendStringInfoLineSeparator(StringInfo str);

View File

@ -137,7 +137,7 @@ static RelMapFile pending_local_updates;
/* non-export function prototypes */
static void apply_map_update(RelMapFile *map, Oid relationId,
RelFileNumber filenumber, bool add_okay);
RelFileNumber fileNumber, bool add_okay);
static void merge_map_updates(RelMapFile *map, const RelMapFile *updates,
bool add_okay);
static void load_relmap_file(bool shared, bool lock_held);

View File

@ -179,7 +179,7 @@ static const char *err_gettext(const char *str) pg_attribute_format_arg(1);
static pg_noinline void set_backtrace(ErrorData *edata, int num_skip);
static void set_errdata_field(MemoryContextData *cxt, char **ptr, const char *str);
static void write_console(const char *line, int len);
static const char *process_log_prefix_padding(const char *p, int *padding);
static const char *process_log_prefix_padding(const char *p, int *ppadding);
static void log_line_prefix(StringInfo buf, ErrorData *edata);
static void send_message_to_server_log(ErrorData *edata);
static void send_message_to_frontend(ErrorData *edata);

View File

@ -225,7 +225,7 @@ static void reapply_stacked_values(struct config_generic *variable,
Oid cursrole);
static bool validate_option_array_item(const char *name, const char *value,
bool skipIfNoPermissions);
static void write_auto_conf_file(int fd, const char *filename, ConfigVariable *head_p);
static void write_auto_conf_file(int fd, const char *filename, ConfigVariable *head);
static void replace_auto_config_value(ConfigVariable **head_p, ConfigVariable **tail_p,
const char *name, const char *value);
static bool valid_custom_variable_name(const char *name);

View File

@ -45,7 +45,8 @@ int compute_query_id = COMPUTE_QUERY_ID_AUTO;
/* True when compute_query_id is ON, or AUTO and a module requests them */
bool query_id_enabled = false;
static uint64 compute_utility_query_id(const char *str, int query_location, int query_len);
static uint64 compute_utility_query_id(const char *query_text,
int query_location, int query_len);
static void AppendJumble(JumbleState *jstate,
const unsigned char *item, Size size);
static void JumbleQueryInternal(JumbleState *jstate, Query *query);

View File

@ -56,7 +56,7 @@ static int comparetup_cluster(const SortTuple *a, const SortTuple *b,
static void writetup_cluster(Tuplesortstate *state, LogicalTape *tape,
SortTuple *stup);
static void readtup_cluster(Tuplesortstate *state, SortTuple *stup,
LogicalTape *tape, unsigned int len);
LogicalTape *tape, unsigned int tuplen);
static int comparetup_index_btree(const SortTuple *a, const SortTuple *b,
Tuplesortstate *state);
static int comparetup_index_hash(const SortTuple *a, const SortTuple *b,

View File

@ -680,9 +680,9 @@ FreeSnapshot(Snapshot snapshot)
* with active refcount=1. Otherwise, only increment the refcount.
*/
void
PushActiveSnapshot(Snapshot snap)
PushActiveSnapshot(Snapshot snapshot)
{
PushActiveSnapshotWithLevel(snap, GetCurrentTransactionNestLevel());
PushActiveSnapshotWithLevel(snapshot, GetCurrentTransactionNestLevel());
}
/*
@ -694,11 +694,11 @@ PushActiveSnapshot(Snapshot snap)
* must not be deeper than the current top of the snapshot stack.
*/
void
PushActiveSnapshotWithLevel(Snapshot snap, int snap_level)
PushActiveSnapshotWithLevel(Snapshot snapshot, int snap_level)
{
ActiveSnapshotElt *newactive;
Assert(snap != InvalidSnapshot);
Assert(snapshot != InvalidSnapshot);
Assert(ActiveSnapshot == NULL || snap_level >= ActiveSnapshot->as_level);
newactive = MemoryContextAlloc(TopTransactionContext, sizeof(ActiveSnapshotElt));
@ -707,10 +707,11 @@ PushActiveSnapshotWithLevel(Snapshot snap, int snap_level)
* Checking SecondarySnapshot is probably useless here, but it seems
* better to be sure.
*/
if (snap == CurrentSnapshot || snap == SecondarySnapshot || !snap->copied)
newactive->as_snap = CopySnapshot(snap);
if (snapshot == CurrentSnapshot || snapshot == SecondarySnapshot ||
!snapshot->copied)
newactive->as_snap = CopySnapshot(snapshot);
else
newactive->as_snap = snap;
newactive->as_snap = snapshot;
newactive->as_next = ActiveSnapshot;
newactive->as_level = snap_level;
@ -2119,20 +2120,20 @@ HistoricSnapshotGetTupleCids(void)
* SerializedSnapshotData.
*/
Size
EstimateSnapshotSpace(Snapshot snap)
EstimateSnapshotSpace(Snapshot snapshot)
{
Size size;
Assert(snap != InvalidSnapshot);
Assert(snap->snapshot_type == SNAPSHOT_MVCC);
Assert(snapshot != InvalidSnapshot);
Assert(snapshot->snapshot_type == SNAPSHOT_MVCC);
/* We allocate any XID arrays needed in the same palloc block. */
size = add_size(sizeof(SerializedSnapshotData),
mul_size(snap->xcnt, sizeof(TransactionId)));
if (snap->subxcnt > 0 &&
(!snap->suboverflowed || snap->takenDuringRecovery))
mul_size(snapshot->xcnt, sizeof(TransactionId)));
if (snapshot->subxcnt > 0 &&
(!snapshot->suboverflowed || snapshot->takenDuringRecovery))
size = add_size(size,
mul_size(snap->subxcnt, sizeof(TransactionId)));
mul_size(snapshot->subxcnt, sizeof(TransactionId)));
return size;
}

View File

@ -275,7 +275,7 @@ static char *escape_quotes_bki(const char *src);
static int locale_date_order(const char *locale);
static void check_locale_name(int category, const char *locale,
char **canonname);
static bool check_locale_encoding(const char *locale, int encoding);
static bool check_locale_encoding(const char *locale, int user_enc);
static void setlocales(void);
static void usage(const char *progname);
void setup_pgdata(void);

View File

@ -197,7 +197,7 @@ static void append_btree_pattern(PatternInfoArray *pia, const char *pattern,
static void compile_database_list(PGconn *conn, SimplePtrList *databases,
const char *initial_dbname);
static void compile_relation_list_one_db(PGconn *conn, SimplePtrList *relations,
const DatabaseInfo *datinfo,
const DatabaseInfo *dat,
uint64 *pagecount);
#define log_no_match(...) do { \

View File

@ -63,7 +63,7 @@ static DIR *get_destination_dir(char *dest_folder);
static void close_destination_dir(DIR *dest_dir, char *dest_folder);
static XLogRecPtr FindStreamingStart(uint32 *tli);
static void StreamLog(void);
static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline,
static bool stop_streaming(XLogRecPtr xlogpos, uint32 timeline,
bool segment_finished);
static void

View File

@ -44,7 +44,7 @@ extern bool RunIdentifySystem(PGconn *conn, char **sysid,
extern void AppendPlainCommandOption(PQExpBuffer buf,
bool use_new_option_syntax,
char *option_value);
char *option_name);
extern void AppendStringCommandOption(PQExpBuffer buf,
bool use_new_option_syntax,
char *option_name, char *option_value);

View File

@ -123,10 +123,10 @@ struct WalWriteMethod
* not all those required for pg_receivewal)
*/
WalWriteMethod *CreateWalDirectoryMethod(const char *basedir,
pg_compress_algorithm compression_algo,
int compression, bool sync);
pg_compress_algorithm compression_algorithm,
int compression_level, bool sync);
WalWriteMethod *CreateWalTarMethod(const char *tarbase,
pg_compress_algorithm compression_algo,
int compression, bool sync);
pg_compress_algorithm compression_algorithm,
int compression_level, bool sync);
const char *GetLastWalMethodError(WalWriteMethod *wwmethod);

View File

@ -17,8 +17,8 @@ extern void write_target_range(char *buf, off_t begin, size_t size);
extern void close_target_file(void);
extern void remove_target_file(const char *path, bool missing_ok);
extern void truncate_target_file(const char *path, off_t newsize);
extern void create_target(file_entry_t *t);
extern void remove_target(file_entry_t *t);
extern void create_target(file_entry_t *entry);
extern void remove_target(file_entry_t *entry);
extern void sync_target_dir(void);
extern char *slurpFile(const char *datadir, const char *path, size_t *filesize);

View File

@ -37,7 +37,7 @@ extern uint64 fetch_done;
extern void extractPageMap(const char *datadir, XLogRecPtr startpoint,
int tliIndex, XLogRecPtr endpoint,
const char *restoreCommand);
extern void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr,
extern void findLastCheckpoint(const char *datadir, XLogRecPtr forkptr,
int tliIndex,
XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli,
XLogRecPtr *lastchkptredo,

View File

@ -23,7 +23,7 @@ static void free_db_and_rel_infos(DbInfoArr *db_arr);
static void get_db_infos(ClusterInfo *cluster);
static void get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo);
static void free_rel_infos(RelInfoArr *rel_arr);
static void print_db_infos(DbInfoArr *dbinfo);
static void print_db_infos(DbInfoArr *db_arr);
static void print_rel_infos(RelInfoArr *rel_arr);

View File

@ -358,7 +358,7 @@ void generate_old_dump(void);
#define EXEC_PSQL_ARGS "--echo-queries --set ON_ERROR_STOP=on --no-psqlrc --dbname=template1"
bool exec_prog(const char *log_file, const char *opt_log_file,
bool exec_prog(const char *log_filename, const char *opt_log_file,
bool report_error, bool exit_on_error, const char *fmt,...) pg_attribute_printf(5, 6);
void verify_directories(void);
bool pid_lock_file_exists(const char *datadir);

View File

@ -16,7 +16,7 @@
#include "pg_upgrade.h"
static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
static void transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit);
/*

View File

@ -134,7 +134,7 @@ static void verify_backup_file(verifier_context *context,
static void report_extra_backup_files(verifier_context *context);
static void verify_backup_checksums(verifier_context *context);
static void verify_file_checksum(verifier_context *context,
manifest_file *m, char *pathname);
manifest_file *m, char *fullpath);
static void parse_required_wal(verifier_context *context,
char *pg_waldump_path,
char *wal_directory,

View File

@ -46,19 +46,19 @@ timestamptz_to_time_t(TimestampTz t)
* moved into src/common. That's a large project though.
*/
const char *
timestamptz_to_str(TimestampTz dt)
timestamptz_to_str(TimestampTz t)
{
static char buf[MAXDATELEN + 1];
char ts[MAXDATELEN + 1];
char zone[MAXDATELEN + 1];
time_t result = (time_t) timestamptz_to_time_t(dt);
time_t result = (time_t) timestamptz_to_time_t(t);
struct tm *ltime = localtime(&result);
strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S", ltime);
strftime(zone, sizeof(zone), "%Z", ltime);
snprintf(buf, sizeof(buf), "%s.%06d %s",
ts, (int) (dt % USECS_PER_SEC), zone);
ts, (int) (t % USECS_PER_SEC), zone);
return buf;
}

View File

@ -158,10 +158,10 @@ extern char *expr_scanner_get_substring(PsqlScanState state,
extern int expr_scanner_get_lineno(PsqlScanState state, int offset);
extern void syntax_error(const char *source, int lineno, const char *line,
const char *cmd, const char *msg,
const char *more, int col) pg_attribute_noreturn();
const char *command, const char *msg,
const char *more, int column) pg_attribute_noreturn();
extern bool strtoint64(const char *str, bool errorOK, int64 *pi);
extern bool strtodouble(const char *str, bool errorOK, double *pd);
extern bool strtoint64(const char *str, bool errorOK, int64 *result);
extern bool strtodouble(const char *str, bool errorOK, double *dv);
#endif /* PGBENCH_H */

View File

@ -127,16 +127,16 @@ bool describeSubscriptions(const char *pattern, bool verbose);
/* \dAc */
extern bool listOperatorClasses(const char *access_method_pattern,
const char *opclass_pattern,
const char *type_pattern,
bool verbose);
/* \dAf */
extern bool listOperatorFamilies(const char *access_method_pattern,
const char *opclass_pattern,
const char *type_pattern,
bool verbose);
/* \dAo */
extern bool listOpFamilyOperators(const char *accessMethod_pattern,
extern bool listOpFamilyOperators(const char *access_method_pattern,
const char *family_pattern, bool verbose);
/* \dAp */

View File

@ -18,7 +18,7 @@
extern void splitTableColumnsSpec(const char *spec, int encoding,
char **table, const char **columns);
extern void appendQualifiedRelation(PQExpBuffer buf, const char *name,
extern void appendQualifiedRelation(PQExpBuffer buf, const char *spec,
PGconn *conn, bool echo);
extern bool yesno_prompt(const char *question);

View File

@ -183,9 +183,9 @@ handle_sigint(SIGNAL_ARGS)
* Register query cancellation callback for SIGINT.
*/
void
setup_cancel_handler(void (*callback) (void))
setup_cancel_handler(void (*query_cancel_callback) (void))
{
cancel_callback = callback;
cancel_callback = query_cancel_callback;
cancel_sent_msg = _("Cancel request sent\n");
cancel_not_sent_msg = _("Could not send cancel request: ");

View File

@ -34,8 +34,8 @@ extern PGDLLIMPORT int numattr;
extern void BootstrapModeMain(int argc, char *argv[], bool check_only) pg_attribute_noreturn();
extern void closerel(char *name);
extern void boot_openrel(char *name);
extern void closerel(char *relname);
extern void boot_openrel(char *relname);
extern void DefineAttr(char *name, char *type, int attnum, int nullness);
extern void InsertOneTuple(void);

View File

@ -29,7 +29,7 @@ extern Oid AlterObjectNamespace_oid(Oid classId, Oid objid, Oid nspOid,
ObjectAddresses *objsMoved);
extern ObjectAddress ExecAlterOwnerStmt(AlterOwnerStmt *stmt);
extern void AlterObjectOwner_internal(Relation catalog, Oid objectId,
extern void AlterObjectOwner_internal(Relation rel, Oid objectId,
Oid new_ownerId);
#endif /* ALTER_H */

View File

@ -18,6 +18,6 @@
#include "catalog/objectaddress.h"
#include "nodes/parsenodes.h"
extern ObjectAddress CreateConversionCommand(CreateConversionStmt *parsetree);
extern ObjectAddress CreateConversionCommand(CreateConversionStmt *stmt);
#endif /* CONVERSIONCMDS_H */

View File

@ -26,7 +26,7 @@ extern void SetMatViewPopulatedState(Relation relation, bool newstate);
extern ObjectAddress ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString,
ParamListInfo params, QueryCompletion *qc);
extern DestReceiver *CreateTransientRelDestReceiver(Oid oid);
extern DestReceiver *CreateTransientRelDestReceiver(Oid transientoid);
extern bool MatViewIncrementalMaintenanceIsEnabled(void);

View File

@ -23,7 +23,7 @@ extern void RelationBuildRowSecurity(Relation relation);
extern void RemovePolicyById(Oid policy_id);
extern bool RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid objid);
extern bool RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid policy_id);
extern ObjectAddress CreatePolicy(CreatePolicyStmt *stmt);
extern ObjectAddress AlterPolicy(AlterPolicyStmt *stmt);

View File

@ -29,7 +29,7 @@ extern void RemovePublicationRelById(Oid proid);
extern void RemovePublicationSchemaById(Oid psoid);
extern ObjectAddress AlterPublicationOwner(const char *name, Oid newOwnerId);
extern void AlterPublicationOwner_oid(Oid pubid, Oid newOwnerId);
extern void AlterPublicationOwner_oid(Oid subid, Oid newOwnerId);
extern void InvalidatePublicationRels(List *relids);
extern bool pub_rf_contains_invalid_column(Oid pubid, Relation relation,
List *ancestors, bool pubviaroot);

View File

@ -18,12 +18,12 @@
#include "catalog/objectaddress.h"
#include "nodes/parsenodes.h"
extern Oid CreateSchemaCommand(CreateSchemaStmt *parsetree,
extern Oid CreateSchemaCommand(CreateSchemaStmt *stmt,
const char *queryString,
int stmt_location, int stmt_len);
extern ObjectAddress RenameSchema(const char *oldname, const char *newname);
extern ObjectAddress AlterSchemaOwner(const char *name, Oid newOwnerId);
extern void AlterSchemaOwner_oid(Oid schemaOid, Oid newOwnerId);
extern void AlterSchemaOwner_oid(Oid schemaoid, Oid newOwnerId);
#endif /* SCHEMACMDS_H */

View File

@ -28,7 +28,7 @@ extern ObjectAddress ExecSecLabelStmt(SecLabelStmt *stmt);
typedef void (*check_object_relabel_type) (const ObjectAddress *object,
const char *seclabel);
extern void register_label_provider(const char *provider,
extern void register_label_provider(const char *provider_name,
check_object_relabel_type hook);
#endif /* SECLABEL_H */

View File

@ -55,16 +55,16 @@ extern int64 nextval_internal(Oid relid, bool check_permissions);
extern Datum nextval(PG_FUNCTION_ARGS);
extern List *sequence_options(Oid relid);
extern ObjectAddress DefineSequence(ParseState *pstate, CreateSeqStmt *stmt);
extern ObjectAddress DefineSequence(ParseState *pstate, CreateSeqStmt *seq);
extern ObjectAddress AlterSequence(ParseState *pstate, AlterSeqStmt *stmt);
extern void SequenceChangePersistence(Oid relid, char newrelpersistence);
extern void DeleteSequenceTuple(Oid relid);
extern void ResetSequence(Oid seq_relid);
extern void ResetSequenceCaches(void);
extern void seq_redo(XLogReaderState *rptr);
extern void seq_desc(StringInfo buf, XLogReaderState *rptr);
extern void seq_redo(XLogReaderState *record);
extern void seq_desc(StringInfo buf, XLogReaderState *record);
extern const char *seq_identify(uint8 info);
extern void seq_mask(char *pagedata, BlockNumber blkno);
extern void seq_mask(char *page, BlockNumber blkno);
#endif /* SEQUENCE_H */

View File

@ -66,7 +66,7 @@ extern void SetRelationHasSubclass(Oid relationId, bool relhassubclass);
extern bool CheckRelationTableSpaceMove(Relation rel, Oid newTableSpaceId);
extern void SetRelationTableSpace(Relation rel, Oid newTableSpaceId,
RelFileNumber newRelFileNumber);
RelFileNumber newRelFilenumber);
extern ObjectAddress renameatt(RenameStmt *stmt);

View File

@ -62,8 +62,8 @@ extern char *get_tablespace_name(Oid spc_oid);
extern bool directory_is_empty(const char *path);
extern void remove_tablespace_symlink(const char *linkloc);
extern void tblspc_redo(XLogReaderState *rptr);
extern void tblspc_desc(StringInfo buf, XLogReaderState *rptr);
extern void tblspc_redo(XLogReaderState *record);
extern void tblspc_desc(StringInfo buf, XLogReaderState *record);
extern const char *tblspc_identify(uint8 info);
#endif /* TABLESPACE_H */

View File

@ -166,7 +166,7 @@ extern void TriggerSetParentTrigger(Relation trigRel,
Oid parentTrigId,
Oid childTableId);
extern void RemoveTriggerById(Oid trigOid);
extern Oid get_trigger_oid(Oid relid, const char *name, bool missing_ok);
extern Oid get_trigger_oid(Oid relid, const char *trigname, bool missing_ok);
extern ObjectAddress renametrig(RenameStmt *stmt);
@ -231,22 +231,22 @@ extern bool ExecBRUpdateTriggers(EState *estate,
ResultRelInfo *relinfo,
ItemPointer tupleid,
HeapTuple fdw_trigtuple,
TupleTableSlot *slot,
TM_FailureData *tmfdp);
TupleTableSlot *newslot,
TM_FailureData *tmfd);
extern void ExecARUpdateTriggers(EState *estate,
ResultRelInfo *relinfo,
ResultRelInfo *src_partinfo,
ResultRelInfo *dst_partinfo,
ItemPointer tupleid,
HeapTuple fdw_trigtuple,
TupleTableSlot *slot,
TupleTableSlot *newslot,
List *recheckIndexes,
TransitionCaptureState *transition_capture,
bool is_crosspart_update);
extern bool ExecIRUpdateTriggers(EState *estate,
ResultRelInfo *relinfo,
HeapTuple trigtuple,
TupleTableSlot *slot);
TupleTableSlot *newslot);
extern void ExecBSTruncateTriggers(EState *estate,
ResultRelInfo *relinfo);
extern void ExecASTruncateTriggers(EState *estate,
@ -267,9 +267,9 @@ extern bool AfterTriggerPendingOnRel(Oid relid);
* in utils/adt/ri_triggers.c
*/
extern bool RI_FKey_pk_upd_check_required(Trigger *trigger, Relation pk_rel,
TupleTableSlot *old_slot, TupleTableSlot *new_slot);
TupleTableSlot *oldslot, TupleTableSlot *newslot);
extern bool RI_FKey_fk_upd_check_required(Trigger *trigger, Relation fk_rel,
TupleTableSlot *old_slot, TupleTableSlot *new_slot);
TupleTableSlot *oldslot, TupleTableSlot *newslot);
extern bool RI_Initial_Check(Trigger *trigger,
Relation fk_rel, Relation pk_rel);
extern void RI_PartitionRemove_Check(Trigger *trigger, Relation fk_rel,

View File

@ -34,7 +34,7 @@ extern Oid AssignTypeMultirangeArrayOid(void);
extern ObjectAddress AlterDomainDefault(List *names, Node *defaultRaw);
extern ObjectAddress AlterDomainNotNull(List *names, bool notNull);
extern ObjectAddress AlterDomainAddConstraint(List *names, Node *constr,
extern ObjectAddress AlterDomainAddConstraint(List *names, Node *newConstraint,
ObjectAddress *constrAddr);
extern ObjectAddress AlterDomainValidateConstraint(List *names, const char *constrName);
extern ObjectAddress AlterDomainDropConstraint(List *names, const char *constrName,

View File

@ -26,8 +26,8 @@ extern char *pg_strdup(const char *in);
extern void *pg_malloc(size_t size);
extern void *pg_malloc0(size_t size);
extern void *pg_malloc_extended(size_t size, int flags);
extern void *pg_realloc(void *pointer, size_t size);
extern void pg_free(void *pointer);
extern void *pg_realloc(void *ptr, size_t size);
extern void pg_free(void *ptr);
/*
* Variants with easier notation and more type safety

View File

@ -32,7 +32,7 @@ typedef struct ScanKeywordList
} ScanKeywordList;
extern int ScanKeywordLookup(const char *text, const ScanKeywordList *keywords);
extern int ScanKeywordLookup(const char *str, const ScanKeywordList *keywords);
/* Code that wants to retrieve the text of the N'th keyword should use this. */
static inline const char *

View File

@ -49,7 +49,7 @@
extern int scram_SaltedPassword(const char *password, const char *salt,
int saltlen, int iterations, uint8 *result,
const char **errstr);
extern int scram_H(const uint8 *str, int len, uint8 *result,
extern int scram_H(const uint8 *input, int len, uint8 *result,
const char **errstr);
extern int scram_ClientKey(const uint8 *salted_password, uint8 *result,
const char **errstr);

View File

@ -27,6 +27,6 @@ extern void ResetCancelConn(void);
* A callback can be optionally set up to be called at cancellation
* time.
*/
extern void setup_cancel_handler(void (*cancel_callback) (void));
extern void setup_cancel_handler(void (*query_cancel_callback) (void));
#endif /* CANCEL_H */

View File

@ -24,6 +24,7 @@ extern int pg_wcswidth(const char *pwcs, size_t len, int encoding);
extern void pg_wcsformat(const unsigned char *pwcs, size_t len, int encoding,
struct lineptr *lines, int count);
extern void pg_wcssize(const unsigned char *pwcs, size_t len, int encoding,
int *width, int *height, int *format_size);
int *result_width, int *result_height,
int *result_format_size);
#endif /* MBPRINT_H */

View File

@ -58,7 +58,7 @@ ParallelSlotClearHandler(ParallelSlot *slot)
slot->handler_context = NULL;
}
extern ParallelSlot *ParallelSlotsGetIdle(ParallelSlotArray *slots,
extern ParallelSlot *ParallelSlotsGetIdle(ParallelSlotArray *sa,
const char *dbname);
extern ParallelSlotArray *ParallelSlotsSetup(int numslots, ConnParams *cparams,

View File

@ -21,7 +21,7 @@
#define MINIMUM_VERSION_FOR_RECOVERY_GUC 120000
extern PQExpBuffer GenerateRecoveryConfig(PGconn *pgconn,
char *pg_replication_slot);
char *replication_slot);
extern void WriteRecoveryConfig(PGconn *pgconn, char *target_dir,
PQExpBuffer contents);

View File

@ -65,6 +65,6 @@ extern void simple_string_list_destroy(SimpleStringList *list);
extern const char *simple_string_list_not_touched(SimpleStringList *list);
extern void simple_ptr_list_append(SimplePtrList *list, void *val);
extern void simple_ptr_list_append(SimplePtrList *list, void *ptr);
#endif /* SIMPLE_LIST_H */

View File

@ -24,7 +24,7 @@ extern PGDLLIMPORT int quote_all_identifiers;
extern PQExpBuffer (*getLocalPQExpBuffer) (void);
/* Functions */
extern const char *fmtId(const char *identifier);
extern const char *fmtId(const char *rawid);
extern const char *fmtQualifiedId(const char *schema, const char *id);
extern char *formatPGVersionNumber(int version_number, bool include_minor,

View File

@ -67,12 +67,13 @@ typedef struct ForeignTable
extern ForeignServer *GetForeignServer(Oid serverid);
extern ForeignServer *GetForeignServerExtended(Oid serverid,
bits16 flags);
extern ForeignServer *GetForeignServerByName(const char *name, bool missing_ok);
extern ForeignServer *GetForeignServerByName(const char *srvname,
bool missing_ok);
extern UserMapping *GetUserMapping(Oid userid, Oid serverid);
extern ForeignDataWrapper *GetForeignDataWrapper(Oid fdwid);
extern ForeignDataWrapper *GetForeignDataWrapperExtended(Oid fdwid,
bits16 flags);
extern ForeignDataWrapper *GetForeignDataWrapperByName(const char *name,
extern ForeignDataWrapper *GetForeignDataWrapperByName(const char *fdwname,
bool missing_ok);
extern ForeignTable *GetForeignTable(Oid relid);

View File

@ -348,7 +348,7 @@ extern void end_MultiFuncCall(PG_FUNCTION_ARGS, FuncCallContext *funcctx);
* "VARIADIC NULL".
*/
extern int extract_variadic_args(FunctionCallInfo fcinfo, int variadic_start,
bool convert_unknown, Datum **values,
bool convert_unknown, Datum **args,
Oid **types, bool **nulls);
#endif /* FUNCAPI_H */

View File

@ -19,6 +19,6 @@
extern void pq_redirect_to_shm_mq(dsm_segment *seg, shm_mq_handle *mqh);
extern void pq_set_parallel_leader(pid_t pid, BackendId backend_id);
extern void pq_parse_errornotice(StringInfo str, ErrorData *edata);
extern void pq_parse_errornotice(StringInfo msg, ErrorData *edata);
#endif /* PQMQ_H */

View File

@ -72,8 +72,8 @@ typedef struct ExtensibleNodeMethods
void (*nodeRead) (struct ExtensibleNode *node);
} ExtensibleNodeMethods;
extern void RegisterExtensibleNodeMethods(const ExtensibleNodeMethods *method);
extern const ExtensibleNodeMethods *GetExtensibleNodeMethods(const char *name,
extern void RegisterExtensibleNodeMethods(const ExtensibleNodeMethods *methods);
extern const ExtensibleNodeMethods *GetExtensibleNodeMethods(const char *extnodename,
bool missing_ok);
/*

View File

@ -218,7 +218,7 @@ extern int16 *readAttrNumberCols(int numCols);
/*
* nodes/copyfuncs.c
*/
extern void *copyObjectImpl(const void *obj);
extern void *copyObjectImpl(const void *from);
/* cast result back to argument type, if supported by compiler */
#ifdef HAVE_TYPEOF

View File

@ -163,8 +163,8 @@ extern ParamListInfo copyParamList(ParamListInfo from);
extern Size EstimateParamListSpace(ParamListInfo paramLI);
extern void SerializeParamList(ParamListInfo paramLI, char **start_address);
extern ParamListInfo RestoreParamList(char **start_address);
extern char *BuildParamLogString(ParamListInfo params, char **paramTextValues,
int valueLen);
extern char *BuildParamLogString(ParamListInfo params, char **knownTextValues,
int maxlen);
extern void ParamsErrorCallback(void *arg);
#endif /* PARAMS_H */

View File

@ -619,9 +619,9 @@ extern void list_deduplicate_oid(List *list);
extern void list_free(List *list);
extern void list_free_deep(List *list);
extern pg_nodiscard List *list_copy(const List *list);
extern pg_nodiscard List *list_copy(const List *oldlist);
extern pg_nodiscard List *list_copy_head(const List *oldlist, int len);
extern pg_nodiscard List *list_copy_tail(const List *list, int nskip);
extern pg_nodiscard List *list_copy_tail(const List *oldlist, int nskip);
extern pg_nodiscard List *list_copy_deep(const List *oldlist);
typedef int (*list_sort_comparator) (const ListCell *a, const ListCell *b);

View File

@ -83,7 +83,7 @@ typedef struct BitString
extern Integer *makeInteger(int i);
extern Float *makeFloat(char *numericStr);
extern Boolean *makeBoolean(bool var);
extern Boolean *makeBoolean(bool val);
extern String *makeString(char *str);
extern BitString *makeBitString(char *str);

View File

@ -40,7 +40,7 @@ extern void get_translated_update_targetlist(PlannerInfo *root, Index relid,
List **update_colnos);
extern AppendRelInfo **find_appinfos_by_relids(PlannerInfo *root,
Relids relids, int *nappinfos);
extern void add_row_identity_var(PlannerInfo *root, Var *rowid_var,
extern void add_row_identity_var(PlannerInfo *root, Var *orig_var,
Index rtindex, const char *rowid_name);
extern void add_row_identity_columns(PlannerInfo *root, Index rtindex,
RangeTblEntry *target_rte,

View File

@ -40,8 +40,8 @@ extern bool contain_leaked_vars(Node *clause);
extern Relids find_nonnullable_rels(Node *clause);
extern List *find_nonnullable_vars(Node *clause);
extern List *find_forced_null_vars(Node *clause);
extern Var *find_forced_null_var(Node *clause);
extern List *find_forced_null_vars(Node *node);
extern Var *find_forced_null_var(Node *node);
extern bool is_pseudo_constant_clause(Node *clause);
extern bool is_pseudo_constant_clause_relids(Node *clause, Relids relids);

View File

@ -117,7 +117,7 @@ extern void cost_incremental_sort(Path *path,
double limit_tuples);
extern Cost cost_sort_estimate(PlannerInfo *root, List *pathkeys,
int nPresortedKeys, double tuples);
extern void cost_append(AppendPath *path, PlannerInfo *root);
extern void cost_append(AppendPath *apath, PlannerInfo *root);
extern void cost_merge_append(Path *path, PlannerInfo *root,
List *pathkeys, int n_streams,
Cost input_startup_cost, Cost input_total_cost,
@ -169,7 +169,7 @@ extern void final_cost_hashjoin(PlannerInfo *root, HashPath *path,
JoinCostWorkspace *workspace,
JoinPathExtraData *extra);
extern void cost_gather(GatherPath *path, PlannerInfo *root,
RelOptInfo *baserel, ParamPathInfo *param_info, double *rows);
RelOptInfo *rel, ParamPathInfo *param_info, double *rows);
extern void cost_gather_merge(GatherMergePath *path, PlannerInfo *root,
RelOptInfo *rel, ParamPathInfo *param_info,
Cost input_startup_cost, Cost input_total_cost,

View File

@ -170,8 +170,8 @@ extern void add_child_rel_equivalences(PlannerInfo *root,
extern void add_child_join_rel_equivalences(PlannerInfo *root,
int nappinfos,
AppendRelInfo **appinfos,
RelOptInfo *parent_rel,
RelOptInfo *child_rel);
RelOptInfo *parent_joinrel,
RelOptInfo *child_joinrel);
extern List *generate_implied_equalities_for_column(PlannerInfo *root,
RelOptInfo *rel,
ec_matches_callback_type callback,

View File

@ -115,6 +115,6 @@ extern Plan *set_plan_references(PlannerInfo *root, Plan *plan);
extern bool trivial_subqueryscan(SubqueryScan *plan);
extern void record_plan_function_dependency(PlannerInfo *root, Oid funcid);
extern void record_plan_type_dependency(PlannerInfo *root, Oid typid);
extern bool extract_query_dependencies_walker(Node *node, PlannerInfo *root);
extern bool extract_query_dependencies_walker(Node *node, PlannerInfo *context);
#endif /* PLANMAIN_H */

View File

@ -45,7 +45,7 @@ extern PlanRowMark *get_plan_rowmark(List *rowmarks, Index rtindex);
* prototypes for prepagg.c
*/
extern void get_agg_clause_costs(PlannerInfo *root, AggSplit aggsplit,
AggClauseCosts *agg_costs);
AggClauseCosts *costs);
extern void preprocess_aggrefs(PlannerInfo *root, Node *clause);
/*

View File

@ -43,7 +43,7 @@ extern List *transformInsertRow(ParseState *pstate, List *exprlist,
List *stmtcols, List *icolumns, List *attrnos,
bool strip_indirection);
extern List *transformUpdateTargetList(ParseState *pstate,
List *targetList);
List *origTlist);
extern Query *transformTopLevelStmt(ParseState *pstate, RawStmt *parseTree);
extern Query *transformStmt(ParseState *pstate, Node *parseTree);

View File

@ -19,7 +19,7 @@ extern void transformAggregateCall(ParseState *pstate, Aggref *agg,
List *args, List *aggorder,
bool agg_distinct);
extern Node *transformGroupingFunc(ParseState *pstate, GroupingFunc *g);
extern Node *transformGroupingFunc(ParseState *pstate, GroupingFunc *p);
extern void transformWindowFuncCall(ParseState *pstate, WindowFunc *wfunc,
WindowDef *windef);

View File

@ -29,8 +29,8 @@ extern Oid LookupOperWithArgs(ObjectWithArgs *oper, bool noError);
/* Routines to find operators matching a name and given input types */
/* NB: the selected operator may require coercion of the input types! */
extern Operator oper(ParseState *pstate, List *op, Oid arg1, Oid arg2,
bool noError, int location);
extern Operator oper(ParseState *pstate, List *opname, Oid ltypeId,
Oid rtypeId, bool noError, int location);
extern Operator left_oper(ParseState *pstate, List *op, Oid arg,
bool noError, int location);

View File

@ -88,7 +88,7 @@ extern ParseNamespaceItem *addRangeTableEntryForJoin(ParseState *pstate,
List *aliasvars,
List *leftcols,
List *rightcols,
Alias *joinalias,
Alias *join_using_alias,
Alias *alias,
bool inFromCl);
extern ParseNamespaceItem *addRangeTableEntryForCTE(ParseState *pstate,

View File

@ -98,7 +98,7 @@ typedef struct PartitionBoundInfoData
#define partition_bound_accepts_nulls(bi) ((bi)->null_index != -1)
#define partition_bound_has_default(bi) ((bi)->default_index != -1)
extern int get_hash_partition_greatest_modulus(PartitionBoundInfo b);
extern int get_hash_partition_greatest_modulus(PartitionBoundInfo bound);
extern uint64 compute_partition_hash_value(int partnatts, FmgrInfo *partsupfunc,
Oid *partcollation,
Datum *values, bool *isnull);
@ -125,7 +125,7 @@ extern void check_new_partition_bound(char *relname, Relation parent,
PartitionBoundSpec *spec,
ParseState *pstate);
extern void check_default_partition_contents(Relation parent,
Relation defaultRel,
Relation default_rel,
PartitionBoundSpec *new_spec);
extern int32 partition_rbound_datum_cmp(FmgrInfo *partsupfunc,

View File

@ -417,7 +417,7 @@ extern long pgstat_report_stat(bool force);
extern void pgstat_force_next_flush(void);
extern void pgstat_reset_counters(void);
extern void pgstat_reset(PgStat_Kind kind, Oid dboid, Oid objectid);
extern void pgstat_reset(PgStat_Kind kind, Oid dboid, Oid objoid);
extern void pgstat_reset_of_kind(PgStat_Kind kind);
/* stats accessors */
@ -474,7 +474,7 @@ extern void pgstat_report_connect(Oid dboid);
#define pgstat_count_conn_txn_idle_time(n) \
(pgStatTransactionIdleTime += (n))
extern PgStat_StatDBEntry *pgstat_fetch_stat_dbentry(Oid dbid);
extern PgStat_StatDBEntry *pgstat_fetch_stat_dbentry(Oid dboid);
/*
* Functions in pgstat_function.c
@ -489,7 +489,7 @@ extern void pgstat_init_function_usage(struct FunctionCallInfoBaseData *fcinfo,
extern void pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu,
bool finalize);
extern PgStat_StatFuncEntry *pgstat_fetch_stat_funcentry(Oid funcid);
extern PgStat_StatFuncEntry *pgstat_fetch_stat_funcentry(Oid func_id);
extern PgStat_BackendFunctionEntry *find_funcstat_entry(Oid func_id);
@ -499,7 +499,7 @@ extern PgStat_BackendFunctionEntry *find_funcstat_entry(Oid func_id);
extern void pgstat_create_relation(Relation rel);
extern void pgstat_drop_relation(Relation rel);
extern void pgstat_copy_relation_stats(Relation dstrel, Relation srcrel);
extern void pgstat_copy_relation_stats(Relation dst, Relation src);
extern void pgstat_init_relation(Relation rel);
extern void pgstat_assoc_relation(Relation rel);
@ -571,7 +571,7 @@ extern void pgstat_twophase_postabort(TransactionId xid, uint16 info,
extern PgStat_StatTabEntry *pgstat_fetch_stat_tabentry(Oid relid);
extern PgStat_StatTabEntry *pgstat_fetch_stat_tabentry_ext(bool shared,
Oid relid);
Oid reloid);
extern PgStat_TableStatus *find_tabstat_entry(Oid rel_id);

View File

@ -75,8 +75,8 @@ extern bool pg_tz_acceptable(pg_tz *tz);
/* these functions are in strftime.c */
extern size_t pg_strftime(char *s, size_t max, const char *format,
const struct pg_tm *tm);
extern size_t pg_strftime(char *s, size_t maxsize, const char *format,
const struct pg_tm *t);
/* these functions and variables are in pgtz.c */

View File

@ -46,14 +46,14 @@ extern bool pg_set_block(pgsocket sock);
/* Portable path handling for Unix/Win32 (in path.c) */
extern bool has_drive_prefix(const char *filename);
extern bool has_drive_prefix(const char *path);
extern char *first_dir_separator(const char *filename);
extern char *last_dir_separator(const char *filename);
extern char *first_path_var_separator(const char *pathlist);
extern void join_path_components(char *ret_path,
const char *head, const char *tail);
extern void canonicalize_path(char *path);
extern void make_native_path(char *path);
extern void make_native_path(char *filename);
extern void cleanup_path(char *path);
extern bool path_contains_parent_reference(const char *path);
extern bool path_is_relative_and_below_cwd(const char *path);
@ -439,7 +439,7 @@ extern void qsort_arg(void *base, size_t nel, size_t elsize,
extern void qsort_interruptible(void *base, size_t nel, size_t elsize,
qsort_arg_comparator cmp, void *arg);
extern void *bsearch_arg(const void *key, const void *base,
extern void *bsearch_arg(const void *key, const void *base0,
size_t nmemb, size_t size,
int (*compar) (const void *, const void *, void *),
void *arg);
@ -479,7 +479,7 @@ extern pqsigfunc pqsignal(int signo, pqsigfunc func);
extern char *escape_single_quotes_ascii(const char *src);
/* common/wait_error.c */
extern char *wait_result_to_str(int exit_status);
extern char *wait_result_to_str(int exitstatus);
extern bool wait_result_is_signal(int exit_status, int signum);
extern bool wait_result_is_any_signal(int exit_status, bool include_command_not_found);

Some files were not shown because too many files have changed in this diff Show More