Phase 2 of pgindent updates.

Change pg_bsd_indent to follow upstream rules for placement of comments
to the right of code, and remove pgindent hack that caused comments
following #endif to not obey the general rule.

Commit e3860ffa4d wasn't actually using
the published version of pg_bsd_indent, but a hacked-up version that
tried to minimize the amount of movement of comments to the right of
code.  The situation of interest is where such a comment has to be
moved to the right of its default placement at column 33 because there's
code there.  BSD indent has always moved right in units of tab stops
in such cases --- but in the previous incarnation, indent was working
in 8-space tab stops, while now it knows we use 4-space tabs.  So the
net result is that in about half the cases, such comments are placed
one tab stop left of before.  This is better all around: it leaves
more room on the line for comment text, and it means that in such
cases the comment uniformly starts at the next 4-space tab stop after
the code, rather than sometimes one and sometimes two tabs after.

Also, ensure that comments following #endif are indented the same
as comments following other preprocessor commands such as #else.
That inconsistency turns out to have been self-inflicted damage
from a poorly-thought-through post-indent "fixup" in pgindent.

This patch is much less interesting than the first round of indent
changes, but also bulkier, so I thought it best to separate the effects.

Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
This commit is contained in:
Tom Lane 2017-06-21 15:18:54 -04:00
parent f669c09989
commit c7b8998ebb
1107 changed files with 3433 additions and 3514 deletions

View File

@ -75,7 +75,7 @@ typedef BloomPageOpaqueData *BloomPageOpaque;
/* Preserved page numbers */
#define BLOOM_METAPAGE_BLKNO (0)
#define BLOOM_HEAD_BLKNO (1) /* first data page */
#define BLOOM_HEAD_BLKNO (1) /* first data page */
/*
* We store Bloom signatures as arrays of uint16 words.
@ -101,8 +101,8 @@ typedef struct BloomOptions
{
int32 vl_len_; /* varlena header (do not touch directly!) */
int bloomLength; /* length of signature in words (not bits!) */
int bitSize[INDEX_MAX_KEYS]; /* # of bits generated for
* each index key */
int bitSize[INDEX_MAX_KEYS]; /* # of bits generated for each
* index key */
} BloomOptions;
/*

View File

@ -42,13 +42,13 @@ typedef struct
/* Methods */
bool (*f_gt) (const void *, const void *, FmgrInfo *); /* greater than */
bool (*f_ge) (const void *, const void *, FmgrInfo *); /* greater or equal */
bool (*f_eq) (const void *, const void *, FmgrInfo *); /* equal */
bool (*f_le) (const void *, const void *, FmgrInfo *); /* less or equal */
bool (*f_lt) (const void *, const void *, FmgrInfo *); /* less than */
int (*f_cmp) (const void *, const void *, FmgrInfo *); /* key compare function */
float8 (*f_dist) (const void *, const void *, FmgrInfo *); /* key distance function */
bool (*f_gt) (const void *, const void *, FmgrInfo *); /* greater than */
bool (*f_ge) (const void *, const void *, FmgrInfo *); /* greater or equal */
bool (*f_eq) (const void *, const void *, FmgrInfo *); /* equal */
bool (*f_le) (const void *, const void *, FmgrInfo *); /* less or equal */
bool (*f_lt) (const void *, const void *, FmgrInfo *); /* less than */
int (*f_cmp) (const void *, const void *, FmgrInfo *); /* key compare function */
float8 (*f_dist) (const void *, const void *, FmgrInfo *); /* key distance function */
} gbtree_ninfo;

View File

@ -488,7 +488,7 @@ gbt_var_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v,
cur = (char *) DatumGetPointer(entryvec->vector[i].key);
ro = gbt_var_key_readable((GBT_VARKEY *) cur);
if (ro.lower == ro.upper) /* leaf */
if (ro.lower == ro.upper) /* leaf */
{
sv[svcntr] = gbt_var_leaf2node((GBT_VARKEY *) cur, tinfo, flinfo);
arr[i].t = sv[svcntr];

View File

@ -40,7 +40,7 @@ typedef struct
bool (*f_le) (const void *, const void *, Oid, FmgrInfo *); /* less equal */
bool (*f_lt) (const void *, const void *, Oid, FmgrInfo *); /* less than */
int32 (*f_cmp) (const void *, const void *, Oid, FmgrInfo *); /* compare */
GBT_VARKEY *(*f_l2n) (GBT_VARKEY *, FmgrInfo *flinfo); /* convert leaf to node */
GBT_VARKEY *(*f_l2n) (GBT_VARKEY *, FmgrInfo *flinfo); /* convert leaf to node */
} gbtree_vinfo;

View File

@ -171,7 +171,7 @@ static double
uuid_2_double(const pg_uuid_t *u)
{
uint64 uu[2];
const double two64 = 18446744073709551616.0; /* 2^64 */
const double two64 = 18446744073709551616.0; /* 2^64 */
/* Source data may not be suitably aligned, so copy */
memcpy(uu, u->data, UUID_LEN);

View File

@ -54,10 +54,10 @@ typedef struct NDBOX
#define PG_RETURN_NDBOX(x) PG_RETURN_POINTER(x)
/* GiST operator strategy numbers */
#define CubeKNNDistanceCoord 15 /* ~> */
#define CubeKNNDistanceTaxicab 16 /* <#> */
#define CubeKNNDistanceEuclid 17 /* <-> */
#define CubeKNNDistanceChebyshev 18 /* <=> */
#define CubeKNNDistanceCoord 15 /* ~> */
#define CubeKNNDistanceTaxicab 16 /* <#> */
#define CubeKNNDistanceEuclid 17 /* <-> */
#define CubeKNNDistanceChebyshev 18 /* <=> */
/* in cubescan.l */
extern int cube_yylex(void);

View File

@ -67,7 +67,7 @@ typedef struct remoteConn
{
PGconn *conn; /* Hold the remote connection */
int openCursorCount; /* The number of open cursors */
bool newXactForCursor; /* Opened a transaction for a cursor */
bool newXactForCursor; /* Opened a transaction for a cursor */
} remoteConn;
typedef struct storeInfo
@ -1098,7 +1098,7 @@ storeQueryResult(volatile storeInfo *sinfo, PGconn *conn, const char *sql)
if (!PQsendQuery(conn, sql))
elog(ERROR, "could not send query: %s", pchomp(PQerrorMessage(conn)));
if (!PQsetSingleRowMode(conn)) /* shouldn't fail */
if (!PQsetSingleRowMode(conn)) /* shouldn't fail */
elog(ERROR, "failed to set single-row mode for dblink query");
for (;;)

View File

@ -544,13 +544,13 @@ fileGetForeignPaths(PlannerInfo *root,
*/
add_path(baserel, (Path *)
create_foreignscan_path(root, baserel,
NULL, /* default pathtarget */
NULL, /* default pathtarget */
baserel->rows,
startup_cost,
total_cost,
NIL, /* no pathkeys */
NULL, /* no outer rel either */
NULL, /* no extra plan */
NIL, /* no pathkeys */
NULL, /* no outer rel either */
NULL, /* no extra plan */
coptions));
/*

View File

@ -111,7 +111,7 @@ The remaining code is authored by Andrew Dunstan <amdunstan@ncshp.org> and
#include <string.h>
#include <stdarg.h>
#endif /* DMETAPHONE_MAIN */
#endif /* DMETAPHONE_MAIN */
#include <assert.h>
#include <ctype.h>
@ -197,7 +197,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS)
* in a case like this.
*/
#define META_FREE(x) ((void)true) /* pfree((x)) */
#define META_FREE(x) ((void)true) /* pfree((x)) */
#else /* not defined DMETAPHONE_MAIN */
/* use the standard malloc library when not running in PostgreSQL */
@ -209,7 +209,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS)
(v = (t*)realloc((v),((n)*sizeof(t))))
#define META_FREE(x) free((x))
#endif /* defined DMETAPHONE_MAIN */
#endif /* defined DMETAPHONE_MAIN */
@ -977,7 +977,7 @@ DoubleMetaphone(char *str, char **codes)
}
}
if (GetAt(original, current + 1) == 'J') /* it could happen! */
if (GetAt(original, current + 1) == 'J') /* it could happen! */
current += 2;
else
current += 1;

View File

@ -181,7 +181,7 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs);
#define HStoreExistsStrategyNumber 9
#define HStoreExistsAnyStrategyNumber 10
#define HStoreExistsAllStrategyNumber 11
#define HStoreOldContainsStrategyNumber 13 /* backwards compatibility */
#define HStoreOldContainsStrategyNumber 13 /* backwards compatibility */
/*
* defining HSTORE_POLLUTE_NAMESPACE=0 will prevent use of old function names;
@ -202,4 +202,4 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs);
extern int no_such_variable
#endif
#endif /* __HSTORE_H__ */
#endif /* __HSTORE_H__ */

View File

@ -829,7 +829,7 @@ hstore_from_record(PG_FUNCTION_ARGS)
my_extra->ncolumns = ncolumns;
}
Assert(ncolumns <= MaxTupleAttributeNumber); /* thus, no overflow */
Assert(ncolumns <= MaxTupleAttributeNumber); /* thus, no overflow */
pairs = palloc(ncolumns * sizeof(Pairs));
if (rec)

View File

@ -173,4 +173,4 @@ int compDESC(const void *a, const void *b);
(direction) ? compASC : compDESC ); \
} while(0)
#endif /* ___INT_H__ */
#endif /* ___INT_H__ */

View File

@ -282,7 +282,7 @@ internal_size(int *a, int len)
for (i = 0; i < len; i += 2)
{
if (!i || a[i] != a[i - 1]) /* do not count repeated range */
if (!i || a[i] != a[i - 1]) /* do not count repeated range */
size += a[i + 1] - a[i] + 1;
}

View File

@ -131,7 +131,7 @@ invalidindex:
elog(DEBUG1, "index %d is invalid", j);
return false;
}
#endif /* ISN_DEBUG */
#endif /* ISN_DEBUG */
/*----------------------------------------------------------
* Formatting and conversion routines.
@ -699,11 +699,11 @@ string2ean(const char *str, bool errorOK, ean13 *result,
/* recognize and validate the number: */
while (*aux2 && length <= 13)
{
last = (*(aux2 + 1) == '!' || *(aux2 + 1) == '\0'); /* is the last character */
last = (*(aux2 + 1) == '!' || *(aux2 + 1) == '\0'); /* is the last character */
digit = (isdigit((unsigned char) *aux2) != 0); /* is current character
* a digit? */
if (*aux2 == '?' && last) /* automagically calculate check digit
* if it's '?' */
if (*aux2 == '?' && last) /* automagically calculate check digit if
* it's '?' */
magic = digit = true;
if (length == 0 && (*aux2 == 'M' || *aux2 == 'm'))
{
@ -832,8 +832,8 @@ string2ean(const char *str, bool errorOK, ean13 *result,
goto eanwrongtype;
break;
case ISMN:
memcpy(buf, "9790", 4); /* this isn't for sure yet, for now
* ISMN it's only 9790 */
memcpy(buf, "9790", 4); /* this isn't for sure yet, for now ISMN
* it's only 9790 */
valid = (valid && ((rcheck = checkdig(buf, 13)) == check || magic));
break;
case ISBN:
@ -1123,7 +1123,7 @@ accept_weak_input(PG_FUNCTION_ARGS)
g_weak = PG_GETARG_BOOL(0);
#else
/* function has no effect */
#endif /* ISN_WEAK_MODE */
#endif /* ISN_WEAK_MODE */
PG_RETURN_BOOL(g_weak);
}

View File

@ -32,4 +32,4 @@ typedef uint64 ean13;
extern void initialize(void);
#endif /* ISN_H */
#endif /* ISN_H */

View File

@ -32,11 +32,11 @@ lo_manage(PG_FUNCTION_ARGS)
HeapTuple newtuple; /* The new value for tuple */
HeapTuple trigtuple; /* The original value of tuple */
if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */
if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */
elog(ERROR, "%s: not fired by trigger manager",
trigdata->tg_trigger->tgname);
if (!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) /* internal error */
if (!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) /* internal error */
elog(ERROR, "%s: must be fired for row",
trigdata->tg_trigger->tgname);

View File

@ -125,7 +125,7 @@ typedef struct
#define OPR 3
#define OPEN 4
#define CLOSE 5
#define VALTRUE 6 /* for stop words */
#define VALTRUE 6 /* for stop words */
#define VALFALSE 7

View File

@ -302,7 +302,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
for (j = FirstOffsetNumber; j <= maxoff; j = OffsetNumberNext(j))
{
array[j].index = j;
lu = GETENTRY(entryvec, j); /* use as tmp val */
lu = GETENTRY(entryvec, j); /* use as tmp val */
array[j].r = LTG_GETLNODE(lu);
}
@ -312,7 +312,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
lu_l = lu_r = ru_l = ru_r = NULL;
for (j = FirstOffsetNumber; j <= maxoff; j = OffsetNumberNext(j))
{
lu = GETENTRY(entryvec, array[j].index); /* use as tmp val */
lu = GETENTRY(entryvec, array[j].index); /* use as tmp val */
if (j <= (maxoff - FirstOffsetNumber + 1) / 2)
{
v->spl_left[v->spl_nleft] = array[j].index;

View File

@ -18,4 +18,4 @@
/* in rawpage.c */
extern Page get_page_from_raw(bytea *raw_page);
#endif /* _PAGEINSPECT_H_ */
#endif /* _PAGEINSPECT_H_ */

View File

@ -66,7 +66,7 @@ pg_buffercache_pages(PG_FUNCTION_ARGS)
FuncCallContext *funcctx;
Datum result;
MemoryContext oldcontext;
BufferCachePagesContext *fctx; /* User function context. */
BufferCachePagesContext *fctx; /* User function context. */
TupleDesc tupledesc;
TupleDesc expected_tupledesc;
HeapTuple tuple;

View File

@ -44,8 +44,8 @@ int maxwaittime = 0; /* how long are we prepared to wait for? */
int keepfiles = 0; /* number of WAL files to keep, 0 keep all */
int maxretries = 3; /* number of retries on restore command */
bool debug = false; /* are we debugging? */
bool need_cleanup = false; /* do we need to remove files from
* archive? */
bool need_cleanup = false; /* do we need to remove files from
* archive? */
#ifndef WIN32
static volatile sig_atomic_t signaled = false;
@ -59,8 +59,8 @@ char *restartWALFileName; /* the file from which we can restart restore */
char *priorWALFileName; /* the file we need to get from archive */
char WALFilePath[MAXPGPATH * 2]; /* the file path including archive */
char restoreCommand[MAXPGPATH]; /* run this to restore */
char exclusiveCleanupFileName[MAXFNAMELEN]; /* the file we need to
* get from archive */
char exclusiveCleanupFileName[MAXFNAMELEN]; /* the file we need to get
* from archive */
/*
* Two types of failover are supported (smart and fast failover).
@ -582,7 +582,7 @@ main(int argc, char **argv)
* There's no way to trigger failover via signal on Windows.
*/
(void) pqsignal(SIGUSR1, sighandler);
(void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */
(void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */
(void) pqsignal(SIGQUIT, sigquit_handler);
#endif

View File

@ -107,7 +107,7 @@ static const uint32 PGSS_PG_MAJOR_VERSION = PG_VERSION_NUM / 100;
#define ASSUMED_LENGTH_INIT 1024 /* initial assumed mean query length */
#define USAGE_DECREASE_FACTOR (0.99) /* decreased every entry_dealloc */
#define STICKY_DECREASE_FACTOR (0.50) /* factor for sticky entries */
#define USAGE_DEALLOC_PERCENT 5 /* free this % of entries at once */
#define USAGE_DEALLOC_PERCENT 5 /* free this % of entries at once */
#define JUMBLE_SIZE 1024 /* query serialization buffer size */
@ -146,15 +146,15 @@ typedef struct Counters
double sum_var_time; /* sum of variances in execution time in msec */
int64 rows; /* total # of retrieved or affected rows */
int64 shared_blks_hit; /* # of shared buffer hits */
int64 shared_blks_read; /* # of shared disk blocks read */
int64 shared_blks_read; /* # of shared disk blocks read */
int64 shared_blks_dirtied; /* # of shared disk blocks dirtied */
int64 shared_blks_written; /* # of shared disk blocks written */
int64 local_blks_hit; /* # of local buffer hits */
int64 local_blks_read; /* # of local disk blocks read */
int64 local_blks_dirtied; /* # of local disk blocks dirtied */
int64 local_blks_written; /* # of local disk blocks written */
int64 local_blks_dirtied; /* # of local disk blocks dirtied */
int64 local_blks_written; /* # of local disk blocks written */
int64 temp_blks_read; /* # of temp blocks read */
int64 temp_blks_written; /* # of temp blocks written */
int64 temp_blks_written; /* # of temp blocks written */
double blk_read_time; /* time spent reading, in msec */
double blk_write_time; /* time spent writing, in msec */
double usage; /* usage factor */
@ -183,7 +183,7 @@ typedef struct pgssEntry
typedef struct pgssSharedState
{
LWLock *lock; /* protects hashtable search/modification */
double cur_median_usage; /* current median usage in hashtable */
double cur_median_usage; /* current median usage in hashtable */
Size mean_query_len; /* current mean entry text length */
slock_t mutex; /* protects following fields only: */
Size extent; /* current extent of query file */
@ -940,7 +940,7 @@ pgss_ExecutorEnd(QueryDesc *queryDesc)
queryId,
queryDesc->plannedstmt->stmt_location,
queryDesc->plannedstmt->stmt_len,
queryDesc->totaltime->total * 1000.0, /* convert to msec */
queryDesc->totaltime->total * 1000.0, /* convert to msec */
queryDesc->estate->es_processed,
&queryDesc->totaltime->bufusage,
NULL);
@ -1337,7 +1337,7 @@ pg_stat_statements_reset(PG_FUNCTION_ARGS)
#define PG_STAT_STATEMENTS_COLS_V1_1 18
#define PG_STAT_STATEMENTS_COLS_V1_2 19
#define PG_STAT_STATEMENTS_COLS_V1_3 23
#define PG_STAT_STATEMENTS_COLS 23 /* maximum of above */
#define PG_STAT_STATEMENTS_COLS 23 /* maximum of above */
/*
* Retrieve statement statistics.
@ -2967,12 +2967,12 @@ generate_normalized_query(pgssJumbleState *jstate, const char *query,
char *norm_query;
int query_len = *query_len_p;
int i,
norm_query_buflen, /* Space allowed for norm_query */
norm_query_buflen, /* Space allowed for norm_query */
len_to_wrt, /* Length (in bytes) to write */
quer_loc = 0, /* Source query byte location */
n_quer_loc = 0, /* Normalized query byte location */
last_off = 0, /* Offset from start for previous tok */
last_tok_len = 0; /* Length (in bytes) of that tok */
last_tok_len = 0; /* Length (in bytes) of that tok */
/*
* Get constants' lengths (core system only gives us locations). Note

View File

@ -132,4 +132,4 @@ extern TRGM *createTrgmNFA(text *text_re, Oid collation,
TrgmPackedGraph **graph, MemoryContext rcontext);
extern bool trigramsMatchGraph(TrgmPackedGraph *graph, bool *check);
#endif /* __TRGM_H__ */
#endif /* __TRGM_H__ */

View File

@ -450,7 +450,7 @@ struct TrgmPackedGraph
* by color trigram number.
*/
int colorTrigramsCount;
int *colorTrigramGroups; /* array of size colorTrigramsCount */
int *colorTrigramGroups; /* array of size colorTrigramsCount */
/*
* The states of the simplified NFA. State number 0 is always initial
@ -2350,4 +2350,4 @@ printTrgmPackedGraph(TrgmPackedGraph *packedGraph, TRGM *trigrams)
pfree(buf.data);
}
#endif /* TRGM_REGEXP_DEBUG */
#endif /* TRGM_REGEXP_DEBUG */

View File

@ -734,7 +734,7 @@ px_crypt_des(const char *key, const char *setting)
p = output + strlen(output);
}
else
#endif /* !DISABLE_XDES */
#endif /* !DISABLE_XDES */
{
/*
* "old"-style: setting - 2 bytes of salt key - only up to the first 8

View File

@ -1975,7 +1975,7 @@ mp_int_string_len(mp_int z, mp_size radix)
if (radix < MP_MIN_RADIX || radix > MP_MAX_RADIX)
return MP_RANGE;
len = s_outlen(z, radix) + 1; /* for terminator */
len = s_outlen(z, radix) + 1; /* for terminator */
/* Allow for sign marker on negatives */
if (MP_SIGN(z) == MP_NEG)
@ -2512,7 +2512,7 @@ s_usub(mp_digit *da, mp_digit *db, mp_digit *dc,
/* Subtract corresponding digits and propagate borrow */
for (pos = 0; pos < size_b; ++pos, ++da, ++db, ++dc)
{
w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */
w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */
(mp_word) *da) - w - (mp_word) *db;
*dc = LOWER_HALF(w);
@ -2522,7 +2522,7 @@ s_usub(mp_digit *da, mp_digit *db, mp_digit *dc,
/* Finish the subtraction for remaining upper digits of da */
for ( /* */ ; pos < size_a; ++pos, ++da, ++dc)
{
w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */
w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */
(mp_word) *da) - w;
*dc = LOWER_HALF(w);
@ -2594,10 +2594,10 @@ s_kmul(mp_digit *da, mp_digit *db, mp_digit *dc,
* t1 and t2 are initially used as temporaries to compute the inner
* product (a1 + a0)(b1 + b0) = a1b1 + a1b0 + a0b1 + a0b0
*/
carry = s_uadd(da, a_top, t1, bot_size, at_size); /* t1 = a1 + a0 */
carry = s_uadd(da, a_top, t1, bot_size, at_size); /* t1 = a1 + a0 */
t1[bot_size] = carry;
carry = s_uadd(db, b_top, t2, bot_size, bt_size); /* t2 = b1 + b0 */
carry = s_uadd(db, b_top, t2, bot_size, bt_size); /* t2 = b1 + b0 */
t2[bot_size] = carry;
(void) s_kmul(t1, t2, t3, bot_size + 1, bot_size + 1); /* t3 = t1 * t2 */
@ -2609,7 +2609,7 @@ s_kmul(mp_digit *da, mp_digit *db, mp_digit *dc,
ZERO(t1, buf_size);
ZERO(t2, buf_size);
(void) s_kmul(da, db, t1, bot_size, bot_size); /* t1 = a0 * b0 */
(void) s_kmul(a_top, b_top, t2, at_size, bt_size); /* t2 = a1 * b1 */
(void) s_kmul(a_top, b_top, t2, at_size, bt_size); /* t2 = a1 * b1 */
/* Subtract out t1 and t2 to get the inner product */
s_usub(t3, t1, t3, buf_size + 2, buf_size);
@ -2692,10 +2692,10 @@ s_ksqr(mp_digit *da, mp_digit *dc, mp_size size_a)
t3 = t2 + buf_size;
ZERO(t1, 4 * buf_size);
(void) s_ksqr(da, t1, bot_size); /* t1 = a0 ^ 2 */
(void) s_ksqr(a_top, t2, at_size); /* t2 = a1 ^ 2 */
(void) s_ksqr(da, t1, bot_size); /* t1 = a0 ^ 2 */
(void) s_ksqr(a_top, t2, at_size); /* t2 = a1 ^ 2 */
(void) s_kmul(da, a_top, t3, bot_size, at_size); /* t3 = a0 * a1 */
(void) s_kmul(da, a_top, t3, bot_size, at_size); /* t3 = a0 * a1 */
/* Quick multiply t3 by 2, shifting left (can't overflow) */
{
@ -2782,7 +2782,7 @@ s_usqr(mp_digit *da, mp_digit *dc, mp_size size_a)
w = UPPER_HALF(w);
if (ov)
{
w += MP_DIGIT_MAX; /* MP_RADIX */
w += MP_DIGIT_MAX; /* MP_RADIX */
++w;
}
}

View File

@ -106,9 +106,9 @@ void mp_int_free(mp_int z);
mp_result mp_int_copy(mp_int a, mp_int c); /* c = a */
void mp_int_swap(mp_int a, mp_int c); /* swap a, c */
void mp_int_zero(mp_int z); /* z = 0 */
mp_result mp_int_abs(mp_int a, mp_int c); /* c = |a| */
mp_result mp_int_neg(mp_int a, mp_int c); /* c = -a */
void mp_int_zero(mp_int z); /* z = 0 */
mp_result mp_int_abs(mp_int a, mp_int c); /* c = |a| */
mp_result mp_int_neg(mp_int a, mp_int c); /* c = -a */
mp_result mp_int_add(mp_int a, mp_int b, mp_int c); /* c = a + b */
mp_result mp_int_add_value(mp_int a, int value, mp_int c);
mp_result mp_int_sub(mp_int a, mp_int b, mp_int c); /* c = a - b */
@ -116,23 +116,23 @@ mp_result mp_int_sub_value(mp_int a, int value, mp_int c);
mp_result mp_int_mul(mp_int a, mp_int b, mp_int c); /* c = a * b */
mp_result mp_int_mul_value(mp_int a, int value, mp_int c);
mp_result mp_int_mul_pow2(mp_int a, int p2, mp_int c);
mp_result mp_int_sqr(mp_int a, mp_int c); /* c = a * a */
mp_result mp_int_sqr(mp_int a, mp_int c); /* c = a * a */
mp_result mp_int_div(mp_int a, mp_int b, /* q = a / b */
mp_result mp_int_div(mp_int a, mp_int b, /* q = a / b */
mp_int q, mp_int r); /* r = a % b */
mp_result mp_int_div_value(mp_int a, int value, /* q = a / value */
mp_int q, int *r); /* r = a % value */
mp_result mp_int_div_value(mp_int a, int value, /* q = a / value */
mp_int q, int *r); /* r = a % value */
mp_result mp_int_div_pow2(mp_int a, int p2, /* q = a / 2^p2 */
mp_int q, mp_int r); /* r = q % 2^p2 */
mp_result mp_int_mod(mp_int a, mp_int m, mp_int c); /* c = a % m */
#define mp_int_mod_value(A, V, R) mp_int_div_value((A), (V), 0, (R))
mp_result mp_int_expt(mp_int a, int b, mp_int c); /* c = a^b */
mp_result mp_int_expt(mp_int a, int b, mp_int c); /* c = a^b */
mp_result mp_int_expt_value(int a, int b, mp_int c); /* c = a^b */
int mp_int_compare(mp_int a, mp_int b); /* a <=> b */
int mp_int_compare_unsigned(mp_int a, mp_int b); /* |a| <=> |b| */
int mp_int_compare_zero(mp_int z); /* a <=> 0 */
int mp_int_compare_unsigned(mp_int a, mp_int b); /* |a| <=> |b| */
int mp_int_compare_zero(mp_int z); /* a <=> 0 */
int mp_int_compare_value(mp_int z, int value); /* a <=> v */
/* Returns true if v|a, false otherwise (including errors) */
@ -144,15 +144,15 @@ int mp_int_is_pow2(mp_int z);
mp_result mp_int_exptmod(mp_int a, mp_int b, mp_int m,
mp_int c); /* c = a^b (mod m) */
mp_result mp_int_exptmod_evalue(mp_int a, int value,
mp_int m, mp_int c); /* c = a^v (mod m) */
mp_int m, mp_int c); /* c = a^v (mod m) */
mp_result mp_int_exptmod_bvalue(int value, mp_int b,
mp_int m, mp_int c); /* c = v^b (mod m) */
mp_int m, mp_int c); /* c = v^b (mod m) */
mp_result mp_int_exptmod_known(mp_int a, mp_int b,
mp_int m, mp_int mu,
mp_int c); /* c = a^b (mod m) */
mp_result mp_int_redux_const(mp_int m, mp_int c);
mp_result mp_int_invmod(mp_int a, mp_int m, mp_int c); /* c = 1/a (mod m) */
mp_result mp_int_invmod(mp_int a, mp_int m, mp_int c); /* c = 1/a (mod m) */
mp_result mp_int_gcd(mp_int a, mp_int b, mp_int c); /* c = gcd(a, b) */
@ -207,4 +207,4 @@ void s_print(char *tag, mp_int z);
void s_print_buf(char *tag, mp_digit *buf, mp_size num);
#endif
#endif /* end IMATH_H_ */
#endif /* end IMATH_H_ */

View File

@ -42,11 +42,11 @@
/*
* System reseeds should be separated at least this much.
*/
#define SYSTEM_RESEED_MIN (20*60) /* 20 min */
#define SYSTEM_RESEED_MIN (20*60) /* 20 min */
/*
* How often to roll dice.
*/
#define SYSTEM_RESEED_CHECK_TIME (10*60) /* 10 min */
#define SYSTEM_RESEED_CHECK_TIME (10*60) /* 10 min */
/*
* The chance is x/256 that the reseed happens.
*/

View File

@ -121,4 +121,4 @@ int pullf_create_mbuf_reader(PullFilter **pf_p, MBuf *mbuf);
(dst) = __b; \
} while (0)
#endif /* __PX_MBUF_H */
#endif /* __PX_MBUF_H */

View File

@ -76,4 +76,4 @@ do { \
md5_result((x), (y)); \
} while (0)
#endif /* ! _NETINET6_MD5_H_ */
#endif /* ! _NETINET6_MD5_H_ */

View File

@ -155,8 +155,8 @@ struct PGP_Context
*/
int mdc_checked;
int corrupt_prefix; /* prefix failed RFC 4880 "quick check" */
int unsupported_compr; /* has bzip2 compression */
int unexpected_binary; /* binary data seen in text_mode */
int unsupported_compr; /* has bzip2 compression */
int unexpected_binary; /* binary data seen in text_mode */
int in_mdc_pkt;
int use_mdcbuf_filter;
PX_MD *mdc_ctx;

View File

@ -79,4 +79,4 @@ char *px_crypt_des(const char *key, const char *setting);
char *px_crypt_md5(const char *pw, const char *salt,
char *dst, unsigned dstlen);
#endif /* _PX_CRYPT_H */
#endif /* _PX_CRYPT_H */

View File

@ -154,7 +154,7 @@ struct px_hmac
struct px_cipher
{
unsigned (*block_size) (PX_Cipher *c);
unsigned (*key_size) (PX_Cipher *c); /* max key len */
unsigned (*key_size) (PX_Cipher *c); /* max key len */
unsigned (*iv_size) (PX_Cipher *c);
int (*init) (PX_Cipher *c, const uint8 *key, unsigned klen, const uint8 *iv);
@ -239,4 +239,4 @@ void px_debug(const char *fmt,...) pg_attribute_printf(1, 2);
(c)->decrypt(c, data, dlen, res, rlen)
#define px_combo_free(c) (c)->free(c)
#endif /* __PX_H */
#endif /* __PX_H */

View File

@ -97,7 +97,7 @@ static u4byte il_tab[4][256];
#endif
static u4byte tab_gen = 0;
#endif /* !PRE_CALC_TABLES */
#endif /* !PRE_CALC_TABLES */
#define ff_mult(a,b) ((a) && (b) ? pow_tab[(log_tab[a] + log_tab[b]) % 255] : 0)
@ -250,7 +250,7 @@ gen_tabs(void)
}
tab_gen = 1;
#endif /* !PRE_CALC_TABLES */
#endif /* !PRE_CALC_TABLES */
}

View File

@ -56,4 +56,4 @@ void aes_ecb_decrypt(rijndael_ctx *ctx, uint8 *data, unsigned len);
void aes_cbc_encrypt(rijndael_ctx *ctx, uint8 *iva, uint8 *data, unsigned len);
void aes_cbc_decrypt(rijndael_ctx *ctx, uint8 *iva, uint8 *data, unsigned len);
#endif /* _RIJNDAEL_H_ */
#endif /* _RIJNDAEL_H_ */

View File

@ -72,4 +72,4 @@ typedef struct sha1_ctxt SHA1_CTX;
#define SHA1_RESULTLEN (160/8)
#endif /* _NETINET6_SHA1_H_ */
#endif /* _NETINET6_SHA1_H_ */

View File

@ -333,7 +333,7 @@ pgstatindex_impl(Relation rel, FunctionCallInfo fcinfo)
values[j++] = psprintf("%d", indexStat.version);
values[j++] = psprintf("%d", indexStat.level);
values[j++] = psprintf(INT64_FORMAT,
(1 + /* include the metapage in index_size */
(1 + /* include the metapage in index_size */
indexStat.leaf_pages +
indexStat.internal_pages +
indexStat.deleted_pages +

View File

@ -258,7 +258,7 @@ is_valid_option(const char *keyword, Oid context)
{
PgFdwOption *opt;
Assert(postgres_fdw_options); /* must be initialized already */
Assert(postgres_fdw_options); /* must be initialized already */
for (opt = postgres_fdw_options; opt->keyword; opt++)
{
@ -277,7 +277,7 @@ is_libpq_option(const char *keyword)
{
PgFdwOption *opt;
Assert(postgres_fdw_options); /* must be initialized already */
Assert(postgres_fdw_options); /* must be initialized already */
for (opt = postgres_fdw_options; opt->keyword; opt++)
{

View File

@ -899,14 +899,14 @@ postgresGetForeignPaths(PlannerInfo *root,
* to estimate cost and size of this path.
*/
path = create_foreignscan_path(root, baserel,
NULL, /* default pathtarget */
NULL, /* default pathtarget */
fpinfo->rows,
fpinfo->startup_cost,
fpinfo->total_cost,
NIL, /* no pathkeys */
NULL, /* no outer rel either */
NULL, /* no extra plan */
NIL); /* no fdw_private list */
NULL, /* no outer rel either */
NULL, /* no extra plan */
NIL); /* no fdw_private list */
add_path(baserel, (Path *) path);
/* Add paths with pathkeys */
@ -1075,7 +1075,7 @@ postgresGetForeignPaths(PlannerInfo *root,
rows,
startup_cost,
total_cost,
NIL, /* no pathkeys */
NIL, /* no pathkeys */
param_info->ppi_req_outer,
NULL,
NIL); /* no fdw_private list */
@ -1591,7 +1591,7 @@ postgresPlanForeignModify(PlannerInfo *root,
/* bit numbers are offset by FirstLowInvalidHeapAttributeNumber */
AttrNumber attno = col + FirstLowInvalidHeapAttributeNumber;
if (attno <= InvalidAttrNumber) /* shouldn't happen */
if (attno <= InvalidAttrNumber) /* shouldn't happen */
elog(ERROR, "system-column update is not supported");
targetAttrs = lappend_int(targetAttrs, attno);
}
@ -2173,7 +2173,7 @@ postgresPlanDirectModify(PlannerInfo *root,
AttrNumber attno = col + FirstLowInvalidHeapAttributeNumber;
TargetEntry *tle;
if (attno <= InvalidAttrNumber) /* shouldn't happen */
if (attno <= InvalidAttrNumber) /* shouldn't happen */
elog(ERROR, "system-column update is not supported");
tle = get_tle_by_resno(subplan->targetlist, attno);
@ -4305,7 +4305,7 @@ foreign_join_ok(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype,
* Note that since this joinrel is at the end of the join_rel_list list
* when we are called, we can get the position by list_length.
*/
Assert(fpinfo->relation_index == 0); /* shouldn't be set yet */
Assert(fpinfo->relation_index == 0); /* shouldn't be set yet */
fpinfo->relation_index =
list_length(root->parse->rtable) + list_length(root->join_rel_list);
@ -4316,7 +4316,7 @@ static void
add_paths_with_pathkeys_for_rel(PlannerInfo *root, RelOptInfo *rel,
Path *epq_path)
{
List *useful_pathkeys_list = NIL; /* List of all pathkeys */
List *useful_pathkeys_list = NIL; /* List of all pathkeys */
ListCell *lc;
useful_pathkeys_list = get_useful_pathkeys_for_relation(root, rel);
@ -4568,7 +4568,7 @@ postgresGetForeignJoinPaths(PlannerInfo *root,
rows,
startup_cost,
total_cost,
NIL, /* no pathkeys */
NIL, /* no pathkeys */
NULL, /* no required_outer */
epq_path,
NIL); /* no fdw_private */

View File

@ -182,4 +182,4 @@ extern bool is_builtin(Oid objectId);
extern bool is_shippable(Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo);
extern const char *get_jointype_name(JoinType jointype);
#endif /* POSTGRES_FDW_H */
#endif /* POSTGRES_FDW_H */

View File

@ -68,10 +68,10 @@ static fmgr_hook_type next_fmgr_hook = NULL;
* labels were set during the (sub-)transactions.
*/
static char *client_label_peer = NULL; /* set by getpeercon(3) */
static List *client_label_pending = NIL; /* pending list being set by
* sepgsql_setcon() */
static char *client_label_committed = NULL; /* set by sepgsql_setcon(),
* and already committed */
static List *client_label_pending = NIL; /* pending list being set by
* sepgsql_setcon() */
static char *client_label_committed = NULL; /* set by sepgsql_setcon(), and
* already committed */
static char *client_label_func = NULL; /* set by trusted procedure */
typedef struct

View File

@ -324,4 +324,4 @@ extern void sepgsql_proc_relabel(Oid functionId, const char *seclabel);
extern void sepgsql_proc_setattr(Oid functionId);
extern void sepgsql_proc_execute(Oid functionId);
#endif /* SEPGSQL_H */
#endif /* SEPGSQL_H */

View File

@ -248,7 +248,7 @@ check_foreign_key(PG_FUNCTION_ARGS)
Datum *kvals; /* key values */
char *relname; /* referencing relation name */
Relation rel; /* triggered relation */
HeapTuple trigtuple = NULL; /* tuple to being changed */
HeapTuple trigtuple = NULL; /* tuple to being changed */
HeapTuple newtuple = NULL; /* tuple to return */
TupleDesc tupdesc; /* tuple description */
EPlan *plan; /* prepared plan(s) */

View File

@ -85,7 +85,7 @@ timetravel(PG_FUNCTION_ARGS)
Trigger *trigger; /* to get trigger name */
int argc;
char **args; /* arguments */
int attnum[MaxAttrNum]; /* fnumbers of start/stop columns */
int attnum[MaxAttrNum]; /* fnumbers of start/stop columns */
Datum oldtimeon,
oldtimeoff;
Datum newtimeon,

View File

@ -1187,8 +1187,8 @@ connectby(char *relname,
branch_delim,
start_with,
start_with, /* current_branch */
0, /* initial level is 0 */
&serial, /* initial serial is 1 */
0, /* initial level is 0 */
&serial, /* initial serial is 1 */
max_depth,
show_branch,
show_serial,

View File

@ -36,4 +36,4 @@
#include "fmgr.h"
#endif /* TABLEFUNC_H */
#endif /* TABLEFUNC_H */

View File

@ -132,7 +132,7 @@ triggered_change_notification(PG_FUNCTION_ARGS)
Form_pg_index index;
indexTuple = SearchSysCache1(INDEXRELID, ObjectIdGetDatum(indexoid));
if (!HeapTupleIsValid(indexTuple)) /* should not happen */
if (!HeapTupleIsValid(indexTuple)) /* should not happen */
elog(ERROR, "cache lookup failed for index %u", indexoid);
index = (Form_pg_index) GETSTRUCT(indexTuple);
/* we're only interested if it is the primary key and valid */
@ -175,5 +175,5 @@ triggered_change_notification(PG_FUNCTION_ARGS)
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
errmsg("triggered_change_notification: must be called on a table with a primary key")));
return PointerGetDatum(NULL); /* after trigger; value doesn't matter */
return PointerGetDatum(NULL); /* after trigger; value doesn't matter */
}

View File

@ -110,7 +110,7 @@ do { \
uu.clock_seq_hi_and_reserved |= 0x80; \
} while(0)
#endif /* !HAVE_UUID_OSSP */
#endif /* !HAVE_UUID_OSSP */
PG_MODULE_MAGIC;
@ -398,7 +398,7 @@ uuid_generate_internal(int v, unsigned char *ns, char *ptr, int len)
return DirectFunctionCall1(uuid_in, CStringGetDatum(strbuf));
}
#endif /* HAVE_UUID_OSSP */
#endif /* HAVE_UUID_OSSP */
Datum

View File

@ -95,7 +95,7 @@ PG_FUNCTION_INFO_V1(xml_is_well_formed);
Datum
xml_is_well_formed(PG_FUNCTION_ARGS)
{
text *t = PG_GETARG_TEXT_PP(0); /* document buffer */
text *t = PG_GETARG_TEXT_PP(0); /* document buffer */
bool result = false;
int32 docsize = VARSIZE_ANY_EXHDR(t);
xmlDocPtr doctree;
@ -249,7 +249,7 @@ Datum
xpath_nodeset(PG_FUNCTION_ARGS)
{
text *document = PG_GETARG_TEXT_PP(0);
text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
xmlChar *toptag = pgxml_texttoxmlchar(PG_GETARG_TEXT_PP(2));
xmlChar *septag = pgxml_texttoxmlchar(PG_GETARG_TEXT_PP(3));
xmlChar *xpath;
@ -282,7 +282,7 @@ Datum
xpath_list(PG_FUNCTION_ARGS)
{
text *document = PG_GETARG_TEXT_PP(0);
text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
xmlChar *plainsep = pgxml_texttoxmlchar(PG_GETARG_TEXT_PP(2));
xmlChar *xpath;
text *xpres;
@ -311,7 +311,7 @@ Datum
xpath_string(PG_FUNCTION_ARGS)
{
text *document = PG_GETARG_TEXT_PP(0);
text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
xmlChar *xpath;
int32 pathsize;
text *xpres;
@ -352,7 +352,7 @@ Datum
xpath_number(PG_FUNCTION_ARGS)
{
text *document = PG_GETARG_TEXT_PP(0);
text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
xmlChar *xpath;
float4 fRes;
xmlXPathObjectPtr res;
@ -384,7 +384,7 @@ Datum
xpath_bool(PG_FUNCTION_ARGS)
{
text *document = PG_GETARG_TEXT_PP(0);
text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */
xmlChar *xpath;
int bRes;
xmlXPathObjectPtr res;

View File

@ -29,7 +29,7 @@
#include <libxslt/security.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
#endif /* USE_LIBXSLT */
#endif /* USE_LIBXSLT */
#ifdef USE_LIBXSLT
@ -39,7 +39,7 @@ extern PgXmlErrorContext *pgxml_parser_init(PgXmlStrictness strictness);
/* local defs */
static const char **parse_params(text *paramstr);
#endif /* USE_LIBXSLT */
#endif /* USE_LIBXSLT */
PG_FUNCTION_INFO_V1(xslt_process);
@ -189,7 +189,7 @@ xslt_process(PG_FUNCTION_ARGS)
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("xslt_process() is not available without libxslt")));
PG_RETURN_NULL();
#endif /* USE_LIBXSLT */
#endif /* USE_LIBXSLT */
}
#ifdef USE_LIBXSLT
@ -253,4 +253,4 @@ parse_params(text *paramstr)
return params;
}
#endif /* USE_LIBXSLT */
#endif /* USE_LIBXSLT */

View File

@ -357,7 +357,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
itemsz, BrinMaxItemSize, RelationGetRelationName(idxrel))));
return InvalidOffsetNumber; /* keep compiler quiet */
return InvalidOffsetNumber; /* keep compiler quiet */
}
/* Make sure the revmap is long enough to contain the entry we need */
@ -823,7 +823,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
itemsz, freespace, RelationGetRelationName(irel))));
return InvalidBuffer; /* keep compiler quiet */
return InvalidBuffer; /* keep compiler quiet */
}
if (newblk != oldblk)

View File

@ -48,7 +48,7 @@ struct BrinRevmap
{
Relation rm_irel;
BlockNumber rm_pagesPerRange;
BlockNumber rm_lastRevmapPage; /* cached from the metapage */
BlockNumber rm_lastRevmapPage; /* cached from the metapage */
Buffer rm_metaBuf;
Buffer rm_currBuf;
};

View File

@ -356,7 +356,7 @@ nocachegetattr(HeapTuple tuple,
HeapTupleHeader tup = tuple->t_data;
Form_pg_attribute *att = tupleDesc->attrs;
char *tp; /* ptr to data part of tuple */
bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */
bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */
bool slow = false; /* do we have to walk attrs? */
int off; /* current offset within data */
@ -762,7 +762,7 @@ heap_form_tuple(TupleDesc tupleDescriptor,
HeapTupleHeaderSetNatts(td, numberOfAttributes);
td->t_hoff = hoff;
if (tupleDescriptor->tdhasoid) /* else leave infomask = 0 */
if (tupleDescriptor->tdhasoid) /* else leave infomask = 0 */
td->t_infomask = HEAP_HASOID;
heap_fill_tuple(tupleDescriptor,
@ -941,7 +941,7 @@ heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc,
int attnum;
char *tp; /* ptr to tuple data */
long off; /* offset in tuple data */
bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */
bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */
bool slow = false; /* can we use/set attcacheoff? */
natts = HeapTupleHeaderGetNatts(tup);
@ -1043,7 +1043,7 @@ slot_deform_tuple(TupleTableSlot *slot, int natts)
int attnum;
char *tp; /* ptr to tuple data */
long off; /* offset in tuple data */
bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */
bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */
bool slow; /* can we use/set attcacheoff? */
/*
@ -1151,7 +1151,7 @@ slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
{
if (tuple == NULL) /* internal error */
elog(ERROR, "cannot extract system attribute from virtual tuple");
if (tuple == &(slot->tts_minhdr)) /* internal error */
if (tuple == &(slot->tts_minhdr)) /* internal error */
elog(ERROR, "cannot extract system attribute from minimal tuple");
return heap_getsysattr(tuple, attnum, tupleDesc, isnull);
}
@ -1337,7 +1337,7 @@ slot_attisnull(TupleTableSlot *slot, int attnum)
{
if (tuple == NULL) /* internal error */
elog(ERROR, "cannot extract system attribute from virtual tuple");
if (tuple == &(slot->tts_minhdr)) /* internal error */
if (tuple == &(slot->tts_minhdr)) /* internal error */
elog(ERROR, "cannot extract system attribute from minimal tuple");
return heap_attisnull(tuple, attnum);
}
@ -1446,7 +1446,7 @@ heap_form_minimal_tuple(TupleDesc tupleDescriptor,
HeapTupleHeaderSetNatts(tuple, numberOfAttributes);
tuple->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
if (tupleDescriptor->tdhasoid) /* else leave infomask = 0 */
if (tupleDescriptor->tdhasoid) /* else leave infomask = 0 */
tuple->t_infomask = HEAP_HASOID;
heap_fill_tuple(tupleDescriptor,

View File

@ -103,7 +103,7 @@ printsimple(TupleTableSlot *slot, DestReceiver *self)
case INT4OID:
{
int32 num = DatumGetInt32(value);
char str[12]; /* sign, 10 digits and '\0' */
char str[12]; /* sign, 10 digits and '\0' */
pg_ltoa(num, str);
pq_sendcountedtext(&buf, str, strlen(str), false);
@ -113,7 +113,7 @@ printsimple(TupleTableSlot *slot, DestReceiver *self)
case INT8OID:
{
int64 num = DatumGetInt64(value);
char str[23]; /* sign, 21 digits and '\0' */
char str[23]; /* sign, 21 digits and '\0' */
pg_lltoa(num, str);
pq_sendcountedtext(&buf, str, strlen(str), false);

View File

@ -188,7 +188,7 @@ convert_tuples_by_position(TupleDesc indesc,
n = indesc->natts + 1; /* +1 for NULL */
map->invalues = (Datum *) palloc(n * sizeof(Datum));
map->inisnull = (bool *) palloc(n * sizeof(bool));
map->invalues[0] = (Datum) 0; /* set up the NULL entry */
map->invalues[0] = (Datum) 0; /* set up the NULL entry */
map->inisnull[0] = true;
return map;
@ -267,7 +267,7 @@ convert_tuples_by_name(TupleDesc indesc,
n = indesc->natts + 1; /* +1 for NULL */
map->invalues = (Datum *) palloc(n * sizeof(Datum));
map->inisnull = (bool *) palloc(n * sizeof(bool));
map->invalues[0] = (Datum) 0; /* set up the NULL entry */
map->invalues[0] = (Datum) 0; /* set up the NULL entry */
map->inisnull[0] = true;
return map;

View File

@ -116,7 +116,7 @@ ginInitBA(BuildAccumulator *accum)
cmpEntryAccumulator,
ginCombineData,
ginAllocEntryAccumulator,
NULL, /* no freefunc needed */
NULL, /* no freefunc needed */
(void *) accum);
}

View File

@ -913,8 +913,8 @@ ginInsertCleanup(GinState *ginstate, bool full_clean,
* Remember next page - it will become the new list head
*/
blkno = GinPageGetOpaque(page)->rightlink;
UnlockReleaseBuffer(buffer); /* shiftList will do exclusive
* locking */
UnlockReleaseBuffer(buffer); /* shiftList will do exclusive
* locking */
/*
* remove read pages from pending list, at this point all content

View File

@ -362,7 +362,7 @@ ginNewScanKey(IndexScanDesc scan)
{
if (nullFlags[j])
{
nullFlags[j] = true; /* not any other nonzero value */
nullFlags[j] = true; /* not any other nonzero value */
hasNullQuery = true;
}
}

View File

@ -650,7 +650,7 @@ ginbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
vacuum_delay_point();
}
if (blkno == InvalidBlockNumber) /* rightmost page */
if (blkno == InvalidBlockNumber) /* rightmost page */
break;
buffer = ReadBufferExtended(index, MAIN_FORKNUM, blkno,

View File

@ -1442,7 +1442,7 @@ initGISTstate(Relation index)
giststate = (GISTSTATE *) palloc(sizeof(GISTSTATE));
giststate->scanCxt = scanCxt;
giststate->tempCxt = scanCxt; /* caller must change this if needed */
giststate->tempCxt = scanCxt; /* caller must change this if needed */
giststate->tupdesc = index->rd_att;
for (i = 0; i < index->rd_att->natts; i++)

View File

@ -814,7 +814,7 @@ gistbufferinginserttuples(GISTBuildState *buildstate, Buffer buffer, int level,
downlinks, ndownlinks, downlinkoffnum,
InvalidBlockNumber, InvalidOffsetNumber);
list_free_deep(splitinfo); /* we don't need this anymore */
list_free_deep(splitinfo); /* we don't need this anymore */
}
else
UnlockReleaseBuffer(buffer);

View File

@ -709,7 +709,7 @@ gistRelocateBuildBuffersOnSplit(GISTBuildBuffers *gfbb, GISTSTATE *giststate,
* page seen so far. Skip the remaining columns and move
* on to the next page, if any.
*/
zero_penalty = false; /* so outer loop won't exit */
zero_penalty = false; /* so outer loop won't exit */
break;
}
}

View File

@ -147,7 +147,7 @@ gistindex_keytest(IndexScanDesc scan,
{
int i;
if (GistPageIsLeaf(page)) /* shouldn't happen */
if (GistPageIsLeaf(page)) /* shouldn't happen */
elog(ERROR, "invalid GiST tuple found on leaf page");
for (i = 0; i < scan->numberOfOrderBys; i++)
so->distances[i] = -get_float8_infinity();

View File

@ -412,7 +412,7 @@ hash_any(register const unsigned char *k, register int keylen)
a += k[0];
/* case 0: nothing left to add */
}
#endif /* WORDS_BIGENDIAN */
#endif /* WORDS_BIGENDIAN */
}
else
{
@ -429,7 +429,7 @@ hash_any(register const unsigned char *k, register int keylen)
a += (k[0] + ((uint32) k[1] << 8) + ((uint32) k[2] << 16) + ((uint32) k[3] << 24));
b += (k[4] + ((uint32) k[5] << 8) + ((uint32) k[6] << 16) + ((uint32) k[7] << 24));
c += (k[8] + ((uint32) k[9] << 8) + ((uint32) k[10] << 16) + ((uint32) k[11] << 24));
#endif /* WORDS_BIGENDIAN */
#endif /* WORDS_BIGENDIAN */
mix(a, b, c);
k += 12;
len -= 12;
@ -492,7 +492,7 @@ hash_any(register const unsigned char *k, register int keylen)
a += k[0];
/* case 0: nothing left to add */
}
#endif /* WORDS_BIGENDIAN */
#endif /* WORDS_BIGENDIAN */
}
final(a, b, c);

View File

@ -462,7 +462,7 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
}
if (so->hashso_sk_hash == _hash_get_indextuple_hashkey(itup))
break; /* yes, so exit for-loop */
break; /* yes, so exit for-loop */
}
/* Before leaving current page, deal with any killed items */
@ -519,7 +519,7 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
}
if (so->hashso_sk_hash == _hash_get_indextuple_hashkey(itup))
break; /* yes, so exit for-loop */
break; /* yes, so exit for-loop */
}
/* Before leaving current page, deal with any killed items */

View File

@ -207,7 +207,7 @@ _hash_get_totalbuckets(uint32 splitpoint_phase)
/* account for buckets within splitpoint_group */
phases_within_splitpoint_group =
(((splitpoint_phase - HASH_SPLITPOINT_GROUPS_WITH_ONE_PHASE) &
HASH_SPLITPOINT_PHASE_MASK) + 1); /* from 0-based to 1-based */
HASH_SPLITPOINT_PHASE_MASK) + 1); /* from 0-based to 1-based */
total_buckets +=
(((1 << (splitpoint_group - 1)) >> HASH_SPLITPOINT_PHASE_BITS) *
phases_within_splitpoint_group);

View File

@ -521,15 +521,15 @@ heapgettup(HeapScanDesc scan,
}
}
else
page = scan->rs_startblock; /* first page */
page = scan->rs_startblock; /* first page */
heapgetpage(scan, page);
lineoff = FirstOffsetNumber; /* first offnum */
lineoff = FirstOffsetNumber; /* first offnum */
scan->rs_inited = true;
}
else
{
/* continue from previously returned page/tuple */
page = scan->rs_cblock; /* current page */
page = scan->rs_cblock; /* current page */
lineoff = /* next offnum */
OffsetNumberNext(ItemPointerGetOffsetNumber(&(tuple->t_self)));
}
@ -577,7 +577,7 @@ heapgettup(HeapScanDesc scan,
else
{
/* continue from previously returned page/tuple */
page = scan->rs_cblock; /* current page */
page = scan->rs_cblock; /* current page */
}
LockBuffer(scan->rs_cbuf, BUFFER_LOCK_SHARE);
@ -823,7 +823,7 @@ heapgettup_pagemode(HeapScanDesc scan,
}
}
else
page = scan->rs_startblock; /* first page */
page = scan->rs_startblock; /* first page */
heapgetpage(scan, page);
lineindex = 0;
scan->rs_inited = true;
@ -831,7 +831,7 @@ heapgettup_pagemode(HeapScanDesc scan,
else
{
/* continue from previously returned page/tuple */
page = scan->rs_cblock; /* current page */
page = scan->rs_cblock; /* current page */
lineindex = scan->rs_cindex + 1;
}
@ -876,7 +876,7 @@ heapgettup_pagemode(HeapScanDesc scan,
else
{
/* continue from previously returned page/tuple */
page = scan->rs_cblock; /* current page */
page = scan->rs_cblock; /* current page */
}
dp = BufferGetPage(scan->rs_cbuf);
@ -1088,7 +1088,7 @@ fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
)
);
}
#endif /* defined(DISABLE_COMPLEX_MACRO) */
#endif /* defined(DISABLE_COMPLEX_MACRO) */
/* ----------------------------------------------------------------
@ -1787,7 +1787,7 @@ heap_update_snapshot(HeapScanDesc scan, Snapshot snapshot)
#define HEAPDEBUG_1
#define HEAPDEBUG_2
#define HEAPDEBUG_3
#endif /* !defined(HEAPDEBUGALL) */
#endif /* !defined(HEAPDEBUGALL) */
HeapTuple
@ -2623,7 +2623,7 @@ heap_prepare_insert(Relation relation, HeapTuple tup, TransactionId xid,
HeapTupleHeaderSetXminFrozen(tup->t_data);
HeapTupleHeaderSetCmin(tup->t_data, cid);
HeapTupleHeaderSetXmax(tup->t_data, 0); /* for cleanliness */
HeapTupleHeaderSetXmax(tup->t_data, 0); /* for cleanliness */
tup->t_tableOid = RelationGetRelid(relation);
/*
@ -4214,7 +4214,7 @@ l2:
HeapTupleClearHeapOnly(newtup);
}
RelationPutHeapTuple(relation, newbuf, heaptup, false); /* insert new tuple */
RelationPutHeapTuple(relation, newbuf, heaptup, false); /* insert new tuple */
/* Clear obsolete visibility flags, possibly set by ourselves above... */
@ -6361,7 +6361,7 @@ FreezeMultiXactId(MultiXactId multi, uint16 t_infomask,
{
Assert(!TransactionIdDidCommit(xid));
*flags |= FRM_INVALIDATE_XMAX;
xid = InvalidTransactionId; /* not strictly necessary */
xid = InvalidTransactionId; /* not strictly necessary */
}
else
{

View File

@ -329,7 +329,7 @@ RelationGetBufferForTuple(Relation relation, Size len,
if (otherBuffer != InvalidBuffer)
otherBlock = BufferGetBlockNumber(otherBuffer);
else
otherBlock = InvalidBlockNumber; /* just to keep compiler quiet */
otherBlock = InvalidBlockNumber; /* just to keep compiler quiet */
/*
* We first try to put the tuple on the same page we last inserted a tuple

View File

@ -31,8 +31,7 @@
typedef struct
{
TransactionId new_prune_xid; /* new prune hint value for page */
TransactionId latestRemovedXid; /* latest xid to be removed by this
* prune */
TransactionId latestRemovedXid; /* latest xid to be removed by this prune */
int nredirected; /* numbers of entries in arrays below */
int ndead;
int nunused;
@ -149,8 +148,8 @@ heap_page_prune_opt(Relation relation, Buffer buffer)
*/
if (PageIsFull(page) || PageGetHeapFreeSpace(page) < minfree)
{
TransactionId ignore = InvalidTransactionId; /* return value not
* needed */
TransactionId ignore = InvalidTransactionId; /* return value not
* needed */
/* OK to prune */
(void) heap_page_prune(relation, buffer, OldestXmin, true, &ignore);

View File

@ -146,22 +146,22 @@ typedef struct RewriteStateData
BlockNumber rs_blockno; /* block where page will go */
bool rs_buffer_valid; /* T if any tuples in buffer */
bool rs_use_wal; /* must we WAL-log inserts? */
bool rs_logical_rewrite; /* do we need to do logical rewriting */
TransactionId rs_oldest_xmin; /* oldest xmin used by caller to
* determine tuple visibility */
bool rs_logical_rewrite; /* do we need to do logical rewriting */
TransactionId rs_oldest_xmin; /* oldest xmin used by caller to determine
* tuple visibility */
TransactionId rs_freeze_xid; /* Xid that will be used as freeze cutoff
* point */
TransactionId rs_logical_xmin; /* Xid that will be used as cutoff
* point for logical rewrites */
TransactionId rs_logical_xmin; /* Xid that will be used as cutoff point
* for logical rewrites */
MultiXactId rs_cutoff_multi; /* MultiXactId that will be used as cutoff
* point for multixacts */
MemoryContext rs_cxt; /* for hash tables and entries and tuples in
* them */
XLogRecPtr rs_begin_lsn; /* XLogInsertLsn when starting the rewrite */
HTAB *rs_unresolved_tups; /* unmatched A tuples */
HTAB *rs_old_new_tid_map; /* unmatched B tuples */
HTAB *rs_unresolved_tups; /* unmatched A tuples */
HTAB *rs_old_new_tid_map; /* unmatched B tuples */
HTAB *rs_logical_mappings; /* logical remapping files */
uint32 rs_num_rewrite_mappings; /* # in memory mappings */
uint32 rs_num_rewrite_mappings; /* # in memory mappings */
} RewriteStateData;
/*
@ -216,8 +216,8 @@ typedef struct RewriteMappingFile
*/
typedef struct RewriteMappingDataEntry
{
LogicalRewriteMappingData map; /* map between old and new location of
* the tuple */
LogicalRewriteMappingData map; /* map between old and new location of the
* tuple */
dlist_node node;
} RewriteMappingDataEntry;
@ -655,7 +655,7 @@ raw_heap_insert(RewriteState state, HeapTuple tup)
else
heaptup = tup;
len = MAXALIGN(heaptup->t_len); /* be conservative */
len = MAXALIGN(heaptup->t_len); /* be conservative */
/*
* If we're gonna fail for oversize tuple, do it right away

View File

@ -1523,7 +1523,7 @@ toast_save_datum(Relation rel, Datum value,
{
data_p = VARDATA_SHORT(dval);
data_todo = VARSIZE_SHORT(dval) - VARHDRSZ_SHORT;
toast_pointer.va_rawsize = data_todo + VARHDRSZ; /* as if not short */
toast_pointer.va_rawsize = data_todo + VARHDRSZ; /* as if not short */
toast_pointer.va_extsize = data_todo;
}
else if (VARATT_IS_COMPRESSED(dval))

View File

@ -83,7 +83,7 @@ RelationGetIndexScan(Relation indexRelation, int nkeys, int norderbys)
scan->heapRelation = NULL; /* may be set later */
scan->indexRelation = indexRelation;
scan->xs_snapshot = InvalidSnapshot; /* caller must initialize this */
scan->xs_snapshot = InvalidSnapshot; /* caller must initialize this */
scan->numberOfKeys = nkeys;
scan->numberOfOrderBys = norderbys;

View File

@ -326,7 +326,7 @@ index_rescan(IndexScanDesc scan,
scan->xs_continue_hot = false;
scan->kill_prior_tuple = false; /* for safety */
scan->kill_prior_tuple = false; /* for safety */
scan->indexRelation->rd_amroutine->amrescan(scan, keys, nkeys,
orderbys, norderbys);
@ -401,7 +401,7 @@ index_restrpos(IndexScanDesc scan)
scan->xs_continue_hot = false;
scan->kill_prior_tuple = false; /* for safety */
scan->kill_prior_tuple = false; /* for safety */
scan->indexRelation->rd_amroutine->amrestrpos(scan);
}

View File

@ -36,7 +36,7 @@ typedef struct
OffsetNumber newitemoff; /* where the new item is to be inserted */
int leftspace; /* space available for items on left page */
int rightspace; /* space available for items on right page */
int olddataitemstotal; /* space taken by old items */
int olddataitemstotal; /* space taken by old items */
bool have_split; /* found a valid split? */

View File

@ -59,7 +59,7 @@ typedef struct
IndexBulkDeleteCallback callback;
void *callback_state;
BTCycleId cycleid;
BlockNumber lastBlockVacuumed; /* highest blkno actually vacuumed */
BlockNumber lastBlockVacuumed; /* highest blkno actually vacuumed */
BlockNumber lastBlockLocked; /* highest blkno we've cleanup-locked */
BlockNumber totFreePages; /* true total # of free pages */
MemoryContext pagedelcontext;
@ -95,9 +95,8 @@ typedef struct BTParallelScanDescData
BTPS_State btps_pageStatus; /* indicates whether next page is
* available for scan. see above for
* possible states of parallel scan. */
int btps_arrayKeyCount; /* count indicating number of array
* scan keys processed by parallel
* scan */
int btps_arrayKeyCount; /* count indicating number of array scan
* keys processed by parallel scan */
slock_t btps_mutex; /* protects above variables */
ConditionVariable btps_cv; /* used to synchronize parallel scan */
} BTParallelScanDescData;
@ -187,7 +186,7 @@ btbuild(Relation heap, Relation index, IndexInfo *indexInfo)
#ifdef BTREE_BUILD_STATS
if (log_btree_build_stats)
ResetUsage();
#endif /* BTREE_BUILD_STATS */
#endif /* BTREE_BUILD_STATS */
/*
* We expect to be called exactly once for any index relation. If that's
@ -234,7 +233,7 @@ btbuild(Relation heap, Relation index, IndexInfo *indexInfo)
ShowUsage("BTREE BUILD STATS");
ResetUsage();
}
#endif /* BTREE_BUILD_STATS */
#endif /* BTREE_BUILD_STATS */
/*
* Return statistics

View File

@ -466,7 +466,7 @@ _bt_compare(Relation rel,
datum = index_getattr(itup, scankey->sk_attno, itupdesc, &isNull);
/* see comments about NULLs handling in btbuild */
if (scankey->sk_flags & SK_ISNULL) /* key is NULL */
if (scankey->sk_flags & SK_ISNULL) /* key is NULL */
{
if (isNull)
result = 0; /* NULL "=" NULL */

View File

@ -111,7 +111,7 @@ typedef struct BTPageState
OffsetNumber btps_lastoff; /* last item offset loaded */
uint32 btps_level; /* tree level (0 = leaf) */
Size btps_full; /* "full" if less than this much free space */
struct BTPageState *btps_next; /* link to parent level, if any */
struct BTPageState *btps_next; /* link to parent level, if any */
} BTPageState;
/*
@ -122,8 +122,8 @@ typedef struct BTWriteState
Relation heap;
Relation index;
bool btws_use_wal; /* dump pages to WAL? */
BlockNumber btws_pages_alloced; /* # pages allocated */
BlockNumber btws_pages_written; /* # pages written out */
BlockNumber btws_pages_alloced; /* # pages allocated */
BlockNumber btws_pages_written; /* # pages written out */
Page btws_zeropage; /* workspace for filling zeroes */
} BTWriteState;
@ -208,7 +208,7 @@ _bt_leafbuild(BTSpool *btspool, BTSpool *btspool2)
ShowUsage("BTREE BUILD (Spool) STATISTICS");
ResetUsage();
}
#endif /* BTREE_BUILD_STATS */
#endif /* BTREE_BUILD_STATS */
tuplesort_performsort(btspool->sortstate);
if (btspool2)
@ -566,7 +566,7 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, IndexTuple itup)
oopaque->btpo_next = nblkno;
nopaque->btpo_prev = oblkno;
nopaque->btpo_next = P_NONE; /* redundant */
nopaque->btpo_next = P_NONE; /* redundant */
}
/*

View File

@ -26,7 +26,7 @@
const struct config_enum_entry wal_level_options[] = {
{"minimal", WAL_LEVEL_MINIMAL, false},
{"replica", WAL_LEVEL_REPLICA, false},
{"archive", WAL_LEVEL_REPLICA, true}, /* deprecated */
{"archive", WAL_LEVEL_REPLICA, true}, /* deprecated */
{"hot_standby", WAL_LEVEL_REPLICA, true}, /* deprecated */
{"logical", WAL_LEVEL_LOGICAL, false},
{NULL, 0, false}

View File

@ -1004,7 +1004,7 @@ doPickSplit(Relation index, SpGistState *state,
insertedNew = true;
}
for (i = 0; i < nToInsert; i++)
leafPageSelect[i] = 0; /* signifies current page */
leafPageSelect[i] = 0; /* signifies current page */
}
else if (in.nTuples == 1 && totalLeafSizes > SPGIST_PAGE_CAPACITY)
{
@ -1076,12 +1076,12 @@ doPickSplit(Relation index, SpGistState *state,
{
if (leafSizes[i] <= curspace)
{
nodePageSelect[i] = 0; /* signifies current page */
nodePageSelect[i] = 0; /* signifies current page */
curspace -= leafSizes[i];
}
else
{
nodePageSelect[i] = 1; /* signifies new leaf page */
nodePageSelect[i] = 1; /* signifies new leaf page */
newspace -= leafSizes[i];
}
}

View File

@ -29,7 +29,7 @@ typedef void (*storeRes_func) (SpGistScanOpaque so, ItemPointer heapPtr,
typedef struct ScanStackEntry
{
Datum reconstructedValue; /* value reconstructed from parent */
Datum reconstructedValue; /* value reconstructed from parent */
void *traversalValue; /* opclass-specific traverse value */
int level; /* level of items on this page */
ItemPointerData ptr; /* block and offset to scan from */

View File

@ -34,7 +34,7 @@ typedef struct spgVacPendingItem
{
ItemPointerData tid; /* redirection target to visit */
bool done; /* have we dealt with this? */
struct spgVacPendingItem *next; /* list link */
struct spgVacPendingItem *next; /* list link */
} spgVacPendingItem;
/* Local state for vacuum operations */
@ -48,7 +48,7 @@ typedef struct spgBulkDeleteState
/* Additional working state */
SpGistState spgstate; /* for SPGiST operations that need one */
spgVacPendingItem *pendingList; /* TIDs we need to (re)visit */
spgVacPendingItem *pendingList; /* TIDs we need to (re)visit */
TransactionId myXmin; /* for detecting newly-added redirects */
BlockNumber lastFilledBlock; /* last non-deletable block */
} spgBulkDeleteState;

View File

@ -149,7 +149,7 @@ void
TransactionIdSetTreeStatus(TransactionId xid, int nsubxids,
TransactionId *subxids, XidStatus status, XLogRecPtr lsn)
{
int pageno = TransactionIdToPage(xid); /* get page of parent */
int pageno = TransactionIdToPage(xid); /* get page of parent */
int i;
Assert(status == TRANSACTION_STATUS_COMMITTED ||

View File

@ -76,7 +76,7 @@ typedef struct SlruFlushData
{
int num_files; /* # files actually open */
int fd[MAX_FLUSH_BUFFERS]; /* their FD's */
int segno[MAX_FLUSH_BUFFERS]; /* their log seg#s */
int segno[MAX_FLUSH_BUFFERS]; /* their log seg#s */
} SlruFlushData;
typedef struct SlruFlushData *SlruFlush;
@ -150,10 +150,10 @@ SimpleLruShmemSize(int nslots, int nlsns)
sz = MAXALIGN(sizeof(SlruSharedData));
sz += MAXALIGN(nslots * sizeof(char *)); /* page_buffer[] */
sz += MAXALIGN(nslots * sizeof(SlruPageStatus)); /* page_status[] */
sz += MAXALIGN(nslots * sizeof(bool)); /* page_dirty[] */
sz += MAXALIGN(nslots * sizeof(int)); /* page_number[] */
sz += MAXALIGN(nslots * sizeof(int)); /* page_lru_count[] */
sz += MAXALIGN(nslots * sizeof(LWLockPadded)); /* buffer_locks[] */
sz += MAXALIGN(nslots * sizeof(bool)); /* page_dirty[] */
sz += MAXALIGN(nslots * sizeof(int)); /* page_number[] */
sz += MAXALIGN(nslots * sizeof(int)); /* page_lru_count[] */
sz += MAXALIGN(nslots * sizeof(LWLockPadded)); /* buffer_locks[] */
if (nlsns > 0)
sz += MAXALIGN(nslots * nlsns * sizeof(XLogRecPtr)); /* group_lsn[] */
@ -972,9 +972,9 @@ SlruSelectLRUPage(SlruCtl ctl, int pageno)
int bestvalidslot = 0; /* keep compiler quiet */
int best_valid_delta = -1;
int best_valid_page_number = 0; /* keep compiler quiet */
int bestinvalidslot = 0; /* keep compiler quiet */
int bestinvalidslot = 0; /* keep compiler quiet */
int best_invalid_delta = -1;
int best_invalid_page_number = 0; /* keep compiler quiet */
int best_invalid_page_number = 0; /* keep compiler quiet */
/* See if page already has a buffer assigned */
for (slotno = 0; slotno < shared->num_slots; slotno++)

View File

@ -261,7 +261,7 @@ findNewestTimeLine(TimeLineID startTLI)
{
if (existsTimeLineHistory(probeTLI))
{
newestTLI = probeTLI; /* probeTLI exists */
newestTLI = probeTLI; /* probeTLI exists */
}
else
{

View File

@ -164,7 +164,7 @@ typedef struct GlobalTransactionData
* track of the end LSN because that is the LSN we need to wait for prior
* to commit.
*/
XLogRecPtr prepare_start_lsn; /* XLOG offset of prepare record start */
XLogRecPtr prepare_start_lsn; /* XLOG offset of prepare record start */
XLogRecPtr prepare_end_lsn; /* XLOG offset of prepare record end */
TransactionId xid; /* The GXACT id */
@ -898,7 +898,7 @@ TwoPhaseGetDummyProc(TransactionId xid)
/*
* Header for a 2PC state file
*/
#define TWOPHASE_MAGIC 0x57F94533 /* format identifier */
#define TWOPHASE_MAGIC 0x57F94533 /* format identifier */
typedef struct TwoPhaseFileHeader
{
@ -1024,7 +1024,7 @@ StartPrepare(GlobalTransaction gxact)
hdr.nabortrels = smgrGetPendingDeletes(false, &abortrels);
hdr.ninvalmsgs = xactGetCommittedInvalidationMessages(&invalmsgs,
&hdr.initfileinval);
hdr.gidlen = strlen(gxact->gid) + 1; /* Include '\0' */
hdr.gidlen = strlen(gxact->gid) + 1; /* Include '\0' */
save_state_data(&hdr, sizeof(TwoPhaseFileHeader));
save_state_data(gxact->gid, hdr.gidlen);

View File

@ -27,7 +27,7 @@ const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] =
lock_twophase_recover, /* Lock */
NULL, /* pgstat */
multixact_twophase_recover, /* MultiXact */
predicatelock_twophase_recover /* PredicateLock */
predicatelock_twophase_recover /* PredicateLock */
};
const TwoPhaseCallback twophase_postcommit_callbacks[TWOPHASE_RM_MAX_ID + 1] =
@ -35,7 +35,7 @@ const TwoPhaseCallback twophase_postcommit_callbacks[TWOPHASE_RM_MAX_ID + 1] =
NULL, /* END ID */
lock_twophase_postcommit, /* Lock */
pgstat_twophase_postcommit, /* pgstat */
multixact_twophase_postcommit, /* MultiXact */
multixact_twophase_postcommit, /* MultiXact */
NULL /* PredicateLock */
};
@ -44,14 +44,14 @@ const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] =
NULL, /* END ID */
lock_twophase_postabort, /* Lock */
pgstat_twophase_postabort, /* pgstat */
multixact_twophase_postabort, /* MultiXact */
multixact_twophase_postabort, /* MultiXact */
NULL /* PredicateLock */
};
const TwoPhaseCallback twophase_standby_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] =
{
NULL, /* END ID */
lock_twophase_standby_recover, /* Lock */
lock_twophase_standby_recover, /* Lock */
NULL, /* pgstat */
NULL, /* MultiXact */
NULL /* PredicateLock */

View File

@ -177,18 +177,18 @@ typedef struct TransactionStateData
TBlockState blockState; /* high-level state */
int nestingLevel; /* transaction nesting depth */
int gucNestLevel; /* GUC context nesting depth */
MemoryContext curTransactionContext; /* my xact-lifetime context */
MemoryContext curTransactionContext; /* my xact-lifetime context */
ResourceOwner curTransactionOwner; /* my query resources */
TransactionId *childXids; /* subcommitted child XIDs, in XID order */
int nChildXids; /* # of subcommitted child XIDs */
int maxChildXids; /* allocated size of childXids[] */
Oid prevUser; /* previous CurrentUserId setting */
int prevSecContext; /* previous SecurityRestrictionContext */
bool prevXactReadOnly; /* entry-time xact r/o state */
bool startedInRecovery; /* did we start in recovery? */
bool prevXactReadOnly; /* entry-time xact r/o state */
bool startedInRecovery; /* did we start in recovery? */
bool didLogXid; /* has xid been included in WAL record? */
int parallelModeLevel; /* Enter/ExitParallelMode counter */
struct TransactionStateData *parent; /* back link to parent */
int parallelModeLevel; /* Enter/ExitParallelMode counter */
struct TransactionStateData *parent; /* back link to parent */
} TransactionStateData;
typedef TransactionStateData *TransactionState;
@ -2641,8 +2641,7 @@ CleanupTransaction(void)
* do abort cleanup processing
*/
AtCleanup_Portals(); /* now safe to release portal memory */
AtEOXact_Snapshot(false, true); /* and release the transaction's
* snapshots */
AtEOXact_Snapshot(false, true); /* and release the transaction's snapshots */
CurrentResourceOwner = NULL; /* and resource owner */
if (TopTransactionResourceOwner)
@ -3769,7 +3768,7 @@ DefineSavepoint(char *name)
case TBLOCK_SUBINPROGRESS:
/* Normal subtransaction start */
PushTransaction();
s = CurrentTransactionState; /* changed by push */
s = CurrentTransactionState; /* changed by push */
/*
* Savepoint names, like the TransactionState block itself, live
@ -4080,7 +4079,7 @@ BeginInternalSubTransaction(char *name)
case TBLOCK_SUBINPROGRESS:
/* Normal subtransaction start */
PushTransaction();
s = CurrentTransactionState; /* changed by push */
s = CurrentTransactionState; /* changed by push */
/*
* Savepoint names, like the TransactionState block itself, live

View File

@ -86,8 +86,8 @@ extern uint32 bootstrap_data_checksum_version;
/* User-settable parameters */
int max_wal_size_mb = 1024; /* 1 GB */
int min_wal_size_mb = 80; /* 80 MB */
int max_wal_size_mb = 1024; /* 1 GB */
int min_wal_size_mb = 80; /* 80 MB */
int wal_keep_segments = 0;
int XLOGbuffers = -1;
int XLogArchiveTimeout = 0;
@ -582,8 +582,7 @@ typedef struct XLogCtlData
XLogRecPtr asyncXactLSN; /* LSN of newest async commit/abort */
XLogRecPtr replicationSlotMinLSN; /* oldest LSN needed by any slot */
XLogSegNo lastRemovedSegNo; /* latest removed/recycled XLOG
* segment */
XLogSegNo lastRemovedSegNo; /* latest removed/recycled XLOG segment */
/* Fake LSN counter, for unlogged relations. Protected by ulsn_lck. */
XLogRecPtr unloggedLSN;
@ -784,7 +783,7 @@ static int readFile = -1;
static XLogSegNo readSegNo = 0;
static uint32 readOff = 0;
static uint32 readLen = 0;
static XLogSource readSource = 0; /* XLOG_FROM_* code */
static XLogSource readSource = 0; /* XLOG_FROM_* code */
/*
* Keeps track of which source we're currently reading from. This is
@ -812,14 +811,14 @@ typedef struct XLogPageReadPrivate
* XLogReceiptSource tracks where we last successfully read some WAL.)
*/
static TimestampTz XLogReceiptTime = 0;
static XLogSource XLogReceiptSource = 0; /* XLOG_FROM_* code */
static XLogSource XLogReceiptSource = 0; /* XLOG_FROM_* code */
/* State information for XLOG reading */
static XLogRecPtr ReadRecPtr; /* start of last record read */
static XLogRecPtr EndRecPtr; /* end+1 of last record read */
static XLogRecPtr minRecoveryPoint; /* local copy of
* ControlFile->minRecoveryPoint */
static XLogRecPtr minRecoveryPoint; /* local copy of
* ControlFile->minRecoveryPoint */
static TimeLineID minRecoveryPointTLI;
static bool updateMinRecoveryPoint = true;
@ -2020,7 +2019,7 @@ XLogRecPtrToBytePos(XLogRecPtr ptr)
{
result = fullsegs * UsableBytesInSegment +
(XLOG_BLCKSZ - SizeOfXLogLongPHD) + /* account for first page */
(fullpages - 1) * UsableBytesInPage; /* full pages */
(fullpages - 1) * UsableBytesInPage; /* full pages */
if (offset > 0)
{
Assert(offset >= SizeOfXLogShortPHD);
@ -2508,7 +2507,7 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
/* signal that we need to wakeup walsenders later */
WalSndWakeupRequest();
LogwrtResult.Flush = LogwrtResult.Write; /* end of page */
LogwrtResult.Flush = LogwrtResult.Write; /* end of page */
if (XLogArchivingActive())
XLogArchiveNotifySeg(openLogSegNo);
@ -4377,7 +4376,7 @@ static void
WriteControlFile(void)
{
int fd;
char buffer[PG_CONTROL_SIZE]; /* need not be aligned */
char buffer[PG_CONTROL_SIZE]; /* need not be aligned */
/*
* Initialize version and compatibility-check fields
@ -6531,7 +6530,7 @@ StartupXLOG(void)
ereport(LOG,
(errmsg("using previous checkpoint record at %X/%X",
(uint32) (checkPointLoc >> 32), (uint32) checkPointLoc)));
InRecovery = true; /* force recovery even if SHUTDOWNED */
InRecovery = true; /* force recovery even if SHUTDOWNED */
}
else
ereport(PANIC,
@ -8835,7 +8834,7 @@ CreateCheckPoint(int flags)
if (shutdown)
{
if (flags & CHECKPOINT_END_OF_RECOVERY)
LocalXLogInsertAllowed = -1; /* return to "check" state */
LocalXLogInsertAllowed = -1; /* return to "check" state */
else
LocalXLogInsertAllowed = 0; /* never again write WAL */
}
@ -9965,7 +9964,7 @@ xlog_outrec(StringInfo buf, XLogReaderState *record)
appendStringInfoString(buf, " FPW");
}
}
#endif /* WAL_DEBUG */
#endif /* WAL_DEBUG */
/*
* Returns a string describing an XLogRecord, consisting of its identity

View File

@ -61,9 +61,9 @@ typedef struct
} registered_buffer;
static registered_buffer *registered_buffers;
static int max_registered_buffers; /* allocated size */
static int max_registered_block_id = 0; /* highest block_id + 1
* currently registered */
static int max_registered_buffers; /* allocated size */
static int max_registered_block_id = 0; /* highest block_id + 1 currently
* registered */
/*
* A chain of XLogRecDatas to hold the "main data" of a WAL record, registered
@ -438,7 +438,7 @@ XLogInsert(RmgrId rmid, uint8 info)
if (IsBootstrapProcessingMode() && rmid != RM_XLOG_ID)
{
XLogResetInsertion();
EndPos = SizeOfXLogLongPHD; /* start of 1st chkpt record */
EndPos = SizeOfXLogLongPHD; /* start of 1st chkpt record */
return EndPos;
}

View File

@ -974,7 +974,7 @@ out:
return found;
}
#endif /* FRONTEND */
#endif /* FRONTEND */
/* ----------------------------------------

View File

@ -46,7 +46,7 @@
#include "utils/relmapper.h"
#include "utils/tqual.h"
uint32 bootstrap_data_checksum_version = 0; /* No checksum */
uint32 bootstrap_data_checksum_version = 0; /* No checksum */
#define ALLOC(t, c) \
@ -163,7 +163,7 @@ static struct typmap *Ap = NULL;
static Datum values[MAXATTR]; /* current row's attribute values */
static bool Nulls[MAXATTR];
static MemoryContext nogc = NULL; /* special no-gc mem context */
static MemoryContext nogc = NULL; /* special no-gc mem context */
/*
* At bootstrap time, we first declare all the indices to be built, and
@ -680,7 +680,7 @@ DefineAttr(char *name, char *type, int attnum, int nullness)
namestrcpy(&attrtypes[attnum]->attname, name);
elog(DEBUG4, "column %s %s", NameStr(attrtypes[attnum]->attname), type);
attrtypes[attnum]->attnum = attnum + 1; /* fillatt */
attrtypes[attnum]->attnum = attnum + 1; /* fillatt */
typeoid = gettype(type);

View File

@ -157,7 +157,7 @@ dumpacl(Acl *acl)
DatumGetCString(DirectFunctionCall1(aclitemout,
PointerGetDatum(aip + i))));
}
#endif /* ACLDEBUG */
#endif /* ACLDEBUG */
/*

View File

@ -97,12 +97,12 @@ typedef struct
} ObjectAddressExtra;
/* ObjectAddressExtra flag bits */
#define DEPFLAG_ORIGINAL 0x0001 /* an original deletion target */
#define DEPFLAG_NORMAL 0x0002 /* reached via normal dependency */
#define DEPFLAG_AUTO 0x0004 /* reached via auto dependency */
#define DEPFLAG_INTERNAL 0x0008 /* reached via internal dependency */
#define DEPFLAG_EXTENSION 0x0010 /* reached via extension dependency */
#define DEPFLAG_REVERSE 0x0020 /* reverse internal/extension link */
#define DEPFLAG_ORIGINAL 0x0001 /* an original deletion target */
#define DEPFLAG_NORMAL 0x0002 /* reached via normal dependency */
#define DEPFLAG_AUTO 0x0004 /* reached via auto dependency */
#define DEPFLAG_INTERNAL 0x0008 /* reached via internal dependency */
#define DEPFLAG_EXTENSION 0x0010 /* reached via extension dependency */
#define DEPFLAG_REVERSE 0x0020 /* reverse internal/extension link */
/* expansible list of ObjectAddresses */
@ -150,7 +150,7 @@ static const Oid object_classes[] = {
OperatorClassRelationId, /* OCLASS_OPCLASS */
OperatorFamilyRelationId, /* OCLASS_OPFAMILY */
AccessMethodRelationId, /* OCLASS_AM */
AccessMethodOperatorRelationId, /* OCLASS_AMOP */
AccessMethodOperatorRelationId, /* OCLASS_AMOP */
AccessMethodProcedureRelationId, /* OCLASS_AMPROC */
RewriteRelationId, /* OCLASS_REWRITE */
TriggerRelationId, /* OCLASS_TRIGGER */
@ -163,7 +163,7 @@ static const Oid object_classes[] = {
AuthIdRelationId, /* OCLASS_ROLE */
DatabaseRelationId, /* OCLASS_DATABASE */
TableSpaceRelationId, /* OCLASS_TBLSPACE */
ForeignDataWrapperRelationId, /* OCLASS_FDW */
ForeignDataWrapperRelationId, /* OCLASS_FDW */
ForeignServerRelationId, /* OCLASS_FOREIGN_SERVER */
UserMappingRelationId, /* OCLASS_USER_MAPPING */
DefaultAclRelationId, /* OCLASS_DEFACL */
@ -399,7 +399,7 @@ performMultipleDeletions(const ObjectAddresses *objects,
findDependentObjects(thisobj,
DEPFLAG_ORIGINAL,
flags,
NULL, /* empty stack */
NULL, /* empty stack */
targetObjects,
objects,
&depRel);
@ -1405,7 +1405,7 @@ recordDependencyOnSingleRelExpr(const ObjectAddress *depender,
rte.type = T_RangeTblEntry;
rte.rtekind = RTE_RELATION;
rte.relid = relId;
rte.relkind = RELKIND_RELATION; /* no need for exactness here */
rte.relkind = RELKIND_RELATION; /* no need for exactness here */
context.rtables = list_make1(list_make1(&rte));
@ -1871,7 +1871,7 @@ find_expr_references_walker(Node *node,
TargetEntry *tle = (TargetEntry *) lfirst(lc);
if (tle->resjunk)
continue; /* ignore junk tlist items */
continue; /* ignore junk tlist items */
add_object_address(OCLASS_CLASS, rte->relid, tle->resno,
context->addrs);
}

View File

@ -950,25 +950,25 @@ AddNewRelationType(const char *typeName,
return
TypeCreate(new_row_type, /* optional predetermined OID */
typeName, /* type name */
typeNamespace, /* type namespace */
typeNamespace, /* type namespace */
new_rel_oid, /* relation oid */
new_rel_kind, /* relation kind */
ownerid, /* owner's ID */
-1, /* internal size (varlena) */
TYPTYPE_COMPOSITE, /* type-type (composite) */
TYPCATEGORY_COMPOSITE, /* type-category (ditto) */
TYPCATEGORY_COMPOSITE, /* type-category (ditto) */
false, /* composite types are never preferred */
DEFAULT_TYPDELIM, /* default array delimiter */
F_RECORD_IN, /* input procedure */
F_RECORD_OUT, /* output procedure */
F_RECORD_RECV, /* receive procedure */
F_RECORD_SEND, /* send procedure */
F_RECORD_RECV, /* receive procedure */
F_RECORD_SEND, /* send procedure */
InvalidOid, /* typmodin procedure - none */
InvalidOid, /* typmodout procedure - none */
InvalidOid, /* analyze procedure - default */
InvalidOid, /* array element type - irrelevant */
false, /* this is not an array type */
new_array_type, /* array type if any */
new_array_type, /* array type if any */
InvalidOid, /* domain base type - irrelevant */
NULL, /* default value - none */
NULL, /* default binary representation */
@ -1218,7 +1218,7 @@ heap_create_with_catalog(const char *relname,
relarrayname = makeArrayTypeName(relname, relnamespace);
TypeCreate(new_array_oid, /* force the type's OID to this */
TypeCreate(new_array_oid, /* force the type's OID to this */
relarrayname, /* Array type name */
relnamespace, /* Same namespace as parent */
InvalidOid, /* Not composite, no relationOid */
@ -1560,7 +1560,7 @@ RemoveAttributeById(Oid relid, AttrNumber attnum)
tuple = SearchSysCacheCopy2(ATTNUM,
ObjectIdGetDatum(relid),
Int16GetDatum(attnum));
if (!HeapTupleIsValid(tuple)) /* shouldn't happen */
if (!HeapTupleIsValid(tuple)) /* shouldn't happen */
elog(ERROR, "cache lookup failed for attribute %d of relation %u",
attnum, relid);
attStruct = (Form_pg_attribute) GETSTRUCT(tuple);
@ -1725,7 +1725,7 @@ RemoveAttrDefaultById(Oid attrdefId)
tuple = SearchSysCacheCopy2(ATTNUM,
ObjectIdGetDatum(myrelid),
Int16GetDatum(myattnum));
if (!HeapTupleIsValid(tuple)) /* shouldn't happen */
if (!HeapTupleIsValid(tuple)) /* shouldn't happen */
elog(ERROR, "cache lookup failed for attribute %d of relation %u",
myattnum, myrelid);
@ -2083,7 +2083,7 @@ StoreRelCheck(Relation rel, char *ccname, Node *expr,
*/
constrOid =
CreateConstraintEntry(ccname, /* Constraint Name */
RelationGetNamespace(rel), /* namespace */
RelationGetNamespace(rel), /* namespace */
CONSTRAINT_CHECK, /* Constraint Type */
false, /* Is Deferrable */
false, /* Is Deferred */
@ -2091,9 +2091,9 @@ StoreRelCheck(Relation rel, char *ccname, Node *expr,
RelationGetRelid(rel), /* relation */
attNos, /* attrs in the constraint */
keycount, /* # attrs in the constraint */
InvalidOid, /* not a domain constraint */
InvalidOid, /* no associated index */
InvalidOid, /* Foreign key fields */
InvalidOid, /* not a domain constraint */
InvalidOid, /* no associated index */
InvalidOid, /* Foreign key fields */
NULL,
NULL,
NULL,
@ -2102,14 +2102,14 @@ StoreRelCheck(Relation rel, char *ccname, Node *expr,
' ',
' ',
' ',
NULL, /* not an exclusion constraint */
expr, /* Tree form of check constraint */
NULL, /* not an exclusion constraint */
expr, /* Tree form of check constraint */
ccbin, /* Binary form of check constraint */
ccsrc, /* Source form of check constraint */
is_local, /* conislocal */
inhcount, /* coninhcount */
is_no_inherit, /* connoinherit */
is_internal); /* internally constructed? */
is_internal); /* internally constructed? */
pfree(ccbin);
pfree(ccsrc);

View File

@ -158,7 +158,7 @@ relationHasPrimaryKey(Relation rel)
HeapTuple indexTuple;
indexTuple = SearchSysCache1(INDEXRELID, ObjectIdGetDatum(indexoid));
if (!HeapTupleIsValid(indexTuple)) /* should not happen */
if (!HeapTupleIsValid(indexTuple)) /* should not happen */
elog(ERROR, "cache lookup failed for index %u", indexoid);
result = ((Form_pg_index) GETSTRUCT(indexTuple))->indisprimary;
ReleaseSysCache(indexTuple);
@ -332,7 +332,7 @@ ConstructTupleDescriptor(Relation heapRelation,
/*
* here we are indexing on a normal attribute (1...n)
*/
if (atnum > natts) /* safety check */
if (atnum > natts) /* safety check */
elog(ERROR, "invalid column number %d", atnum);
from = heapTupDesc->attrs[AttrNumberGetAttrOffset(atnum)];
}
@ -420,7 +420,7 @@ ConstructTupleDescriptor(Relation heapRelation,
/*
* Set the attribute name as specified by caller.
*/
if (colnames_item == NULL) /* shouldn't happen */
if (colnames_item == NULL) /* shouldn't happen */
elog(ERROR, "too few entries in colnames list");
namestrcpy(&to->attname, (const char *) lfirst(colnames_item));
colnames_item = lnext(colnames_item);
@ -954,7 +954,7 @@ index_create(Relation heapRelation,
else
{
elog(ERROR, "constraint must be PRIMARY, UNIQUE or EXCLUDE");
constraintType = 0; /* keep compiler quiet */
constraintType = 0; /* keep compiler quiet */
}
index_constraint_create(heapRelation,
@ -964,9 +964,9 @@ index_create(Relation heapRelation,
constraintType,
deferrable,
initdeferred,
false, /* already marked primary */
false, /* pg_index entry is OK */
false, /* no old dependencies */
false, /* already marked primary */
false, /* pg_index entry is OK */
false, /* no old dependencies */
allow_system_table_mods,
is_internal);
}
@ -1205,7 +1205,7 @@ index_constraint_create(Relation heapRelation,
indexInfo->ii_KeyAttrNumbers,
indexInfo->ii_NumIndexAttrs,
InvalidOid, /* no domain */
indexRelationId, /* index OID */
indexRelationId, /* index OID */
InvalidOid, /* no foreign key */
NULL,
NULL,
@ -1216,12 +1216,12 @@ index_constraint_create(Relation heapRelation,
' ',
' ',
indexInfo->ii_ExclusionOps,
NULL, /* no check constraint */
NULL, /* no check constraint */
NULL,
NULL,
true, /* islocal */
true, /* islocal */
0, /* inhcount */
true, /* noinherit */
true, /* noinherit */
is_internal);
/*
@ -2259,7 +2259,7 @@ IndexBuildHeapRangeScan(Relation heapRelation,
if (IsBootstrapProcessingMode() || indexInfo->ii_Concurrent)
{
snapshot = RegisterSnapshot(GetTransactionSnapshot());
OldestXmin = InvalidTransactionId; /* not used */
OldestXmin = InvalidTransactionId; /* not used */
/* "any visible" mode is not compatible with this */
Assert(!anyvisible);
@ -2272,8 +2272,8 @@ IndexBuildHeapRangeScan(Relation heapRelation,
}
scan = heap_beginscan_strat(heapRelation, /* relation */
snapshot, /* snapshot */
0, /* number of keys */
snapshot, /* snapshot */
0, /* number of keys */
NULL, /* scan key */
true, /* buffer access strategy OK */
allow_sync); /* syncscan OK? */
@ -2524,7 +2524,7 @@ IndexBuildHeapRangeScan(Relation heapRelation,
break;
default:
elog(ERROR, "unexpected HeapTupleSatisfiesVacuum result");
indexIt = tupleIsAlive = false; /* keep compiler quiet */
indexIt = tupleIsAlive = false; /* keep compiler quiet */
break;
}
@ -2677,8 +2677,8 @@ IndexCheckExclusion(Relation heapRelation,
*/
snapshot = RegisterSnapshot(GetLatestSnapshot());
scan = heap_beginscan_strat(heapRelation, /* relation */
snapshot, /* snapshot */
0, /* number of keys */
snapshot, /* snapshot */
0, /* number of keys */
NULL, /* scan key */
true, /* buffer access strategy OK */
true); /* syncscan OK */
@ -2997,8 +2997,8 @@ validate_index_heapscan(Relation heapRelation,
* match the sorted TIDs.
*/
scan = heap_beginscan_strat(heapRelation, /* relation */
snapshot, /* snapshot */
0, /* number of keys */
snapshot, /* snapshot */
0, /* number of keys */
NULL, /* scan key */
true, /* buffer access strategy OK */
false); /* syncscan not OK */

View File

@ -42,7 +42,7 @@ CatalogOpenIndexes(Relation heapRel)
ResultRelInfo *resultRelInfo;
resultRelInfo = makeNode(ResultRelInfo);
resultRelInfo->ri_RangeTableIndex = 1; /* dummy */
resultRelInfo->ri_RangeTableIndex = 1; /* dummy */
resultRelInfo->ri_RelationDesc = heapRel;
resultRelInfo->ri_TrigDesc = NULL; /* we don't fire triggers */
@ -136,7 +136,7 @@ CatalogIndexInsert(CatalogIndexState indstate, HeapTuple heapTuple)
index_insert(relationDescs[i], /* index relation */
values, /* array of index Datums */
isnull, /* is-null flags */
&(heapTuple->t_self), /* tid of heap tuple */
&(heapTuple->t_self), /* tid of heap tuple */
heapRelation,
relationDescs[i]->rd_index->indisunique ?
UNIQUE_CHECK_YES : UNIQUE_CHECK_NO,

View File

@ -157,7 +157,7 @@ static bool baseSearchPathValid = true;
typedef struct
{
List *searchPath; /* the desired search path */
Oid creationNamespace; /* the desired creation namespace */
Oid creationNamespace; /* the desired creation namespace */
int nestLevel; /* subtransaction nesting level */
} OverrideStackEntry;
@ -273,7 +273,7 @@ RangeVarGetRelidExtended(const RangeVar *relation, LOCKMODE lockmode,
if (relation->relpersistence == RELPERSISTENCE_TEMP)
{
if (!OidIsValid(myTempNamespace))
relId = InvalidOid; /* this probably can't happen? */
relId = InvalidOid; /* this probably can't happen? */
else
{
if (relation->schemaname)
@ -1665,7 +1665,7 @@ OpernameGetCandidates(List *names, char oprkind, bool missing_schema_ok)
/* We have a match with a previous result */
Assert(pathpos != prevResult->pathpos);
if (pathpos > prevResult->pathpos)
continue; /* keep previous result */
continue; /* keep previous result */
/* replace previous result */
prevResult->pathpos = pathpos;
prevResult->oid = HeapTupleGetOid(opertup);
@ -3428,7 +3428,7 @@ PopOverrideSearchPath(void)
entry = (OverrideStackEntry *) linitial(overrideStack);
activeSearchPath = entry->searchPath;
activeCreationNamespace = entry->creationNamespace;
activeTempCreationPending = false; /* XXX is this OK? */
activeTempCreationPending = false; /* XXX is this OK? */
}
else
{
@ -3876,7 +3876,7 @@ AtEOXact_Namespace(bool isCommit, bool parallel)
{
myTempNamespace = InvalidOid;
myTempToastNamespace = InvalidOid;
baseSearchPathValid = false; /* need to rebuild list */
baseSearchPathValid = false; /* need to rebuild list */
}
myTempNamespaceSubID = InvalidSubTransactionId;
}
@ -3928,7 +3928,7 @@ AtEOSubXact_Namespace(bool isCommit, SubTransactionId mySubid,
/* TEMP namespace creation failed, so reset state */
myTempNamespace = InvalidOid;
myTempToastNamespace = InvalidOid;
baseSearchPathValid = false; /* need to rebuild list */
baseSearchPathValid = false; /* need to rebuild list */
}
}
@ -3953,7 +3953,7 @@ AtEOSubXact_Namespace(bool isCommit, SubTransactionId mySubid,
entry = (OverrideStackEntry *) linitial(overrideStack);
activeSearchPath = entry->searchPath;
activeCreationNamespace = entry->creationNamespace;
activeTempCreationPending = false; /* XXX is this OK? */
activeTempCreationPending = false; /* XXX is this OK? */
}
else
{

View File

@ -97,19 +97,18 @@ typedef struct
Oid class_oid; /* oid of catalog */
Oid oid_index_oid; /* oid of index on system oid column */
int oid_catcache_id; /* id of catcache on system oid column */
int name_catcache_id; /* id of catcache on (name,namespace),
* or (name) if the object does not
* live in a namespace */
int name_catcache_id; /* id of catcache on (name,namespace), or
* (name) if the object does not live in a
* namespace */
AttrNumber attnum_name; /* attnum of name field */
AttrNumber attnum_namespace; /* attnum of namespace field */
AttrNumber attnum_namespace; /* attnum of namespace field */
AttrNumber attnum_owner; /* attnum of owner field */
AttrNumber attnum_acl; /* attnum of acl field */
AclObjectKind acl_kind; /* ACL_KIND_* of this object type */
bool is_nsp_name_unique; /* can the nsp/name combination (or
* name alone, if there's no
* namespace) be considered a unique
* identifier for an object of this
* class? */
bool is_nsp_name_unique; /* can the nsp/name combination (or name
* alone, if there's no namespace) be
* considered a unique identifier for an
* object of this class? */
} ObjectPropertyType;
static const ObjectPropertyType ObjectProperty[] =

View File

@ -1553,7 +1553,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
*/
i = 0;
partexprs_item = list_head(key->partexprs);
partexprs_item_saved = partexprs_item; /* placate compiler */
partexprs_item_saved = partexprs_item; /* placate compiler */
forboth(cell1, spec->lowerdatums, cell2, spec->upperdatums)
{
EState *estate;

View File

@ -83,9 +83,9 @@ AggregateCreate(const char *aggName,
Oid finalfn = InvalidOid; /* can be omitted */
Oid combinefn = InvalidOid; /* can be omitted */
Oid serialfn = InvalidOid; /* can be omitted */
Oid deserialfn = InvalidOid; /* can be omitted */
Oid deserialfn = InvalidOid; /* can be omitted */
Oid mtransfn = InvalidOid; /* can be omitted */
Oid minvtransfn = InvalidOid; /* can be omitted */
Oid minvtransfn = InvalidOid; /* can be omitted */
Oid mfinalfn = InvalidOid; /* can be omitted */
Oid sortop = InvalidOid; /* can be omitted */
Oid *aggArgTypes = parameterTypes->values;
@ -605,30 +605,30 @@ AggregateCreate(const char *aggName,
myself = ProcedureCreate(aggName,
aggNamespace,
false, /* no replacement */
false, /* doesn't return a set */
false, /* no replacement */
false, /* doesn't return a set */
finaltype, /* returnType */
GetUserId(), /* proowner */
INTERNALlanguageId, /* languageObjectId */
InvalidOid, /* no validator */
GetUserId(), /* proowner */
INTERNALlanguageId, /* languageObjectId */
InvalidOid, /* no validator */
"aggregate_dummy", /* placeholder proc */
NULL, /* probin */
true, /* isAgg */
false, /* isWindowFunc */
false, /* security invoker (currently not
* definable for agg) */
false, /* isLeakProof */
false, /* isStrict (not needed for agg) */
PROVOLATILE_IMMUTABLE, /* volatility (not
* needed for agg) */
NULL, /* probin */
true, /* isAgg */
false, /* isWindowFunc */
false, /* security invoker (currently not
* definable for agg) */
false, /* isLeakProof */
false, /* isStrict (not needed for agg) */
PROVOLATILE_IMMUTABLE, /* volatility (not needed
* for agg) */
proparallel,
parameterTypes, /* paramTypes */
allParameterTypes, /* allParamTypes */
parameterModes, /* parameterModes */
parameterNames, /* parameterNames */
parameterDefaults, /* parameterDefaults */
PointerGetDatum(NULL), /* trftypes */
PointerGetDatum(NULL), /* proconfig */
PointerGetDatum(NULL), /* trftypes */
PointerGetDatum(NULL), /* proconfig */
1, /* procost */
0); /* prorows */
procOid = myself.objectId;

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