1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-18 12:22:09 +03:00

Final pgindent + perltidy run for 9.6.

This commit is contained in:
Tom Lane
2016-08-15 13:42:51 -04:00
parent 05d8dec690
commit b5bce6c1ec
26 changed files with 175 additions and 151 deletions

View File

@@ -264,8 +264,8 @@ brinvalidate(Oid opclassoid)
continue; /* got it */
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator class \"%s\" is missing support function %d",
opclassname, i)));
errmsg("brin operator class \"%s\" is missing support function %d",
opclassname, i)));
result = false;
}

View File

@@ -243,8 +243,8 @@ ginvalidate(Oid opclassoid)
continue; /* don't need both, see check below loop */
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gin operator class \"%s\" is missing support function %d",
opclassname, i)));
errmsg("gin operator class \"%s\" is missing support function %d",
opclassname, i)));
result = false;
}
if (!opclassgroup ||

View File

@@ -261,8 +261,8 @@ gistvalidate(Oid opclassoid)
continue; /* optional methods */
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gist operator class \"%s\" is missing support function %d",
opclassname, i)));
errmsg("gist operator class \"%s\" is missing support function %d",
opclassname, i)));
result = false;
}

View File

@@ -186,9 +186,9 @@ hashvalidate(Oid opclassoid)
{
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" lacks support function for operator %s",
opfamilyname,
format_operator(oprform->amopopr))));
errmsg("hash operator family \"%s\" lacks support function for operator %s",
opfamilyname,
format_operator(oprform->amopopr))));
result = false;
}
}

View File

@@ -4571,7 +4571,7 @@ heap_lock_tuple(Relation relation, HeapTuple tuple,
ItemId lp;
Page page;
Buffer vmbuffer = InvalidBuffer;
BlockNumber block;
BlockNumber block;
TransactionId xid,
xmax;
uint16 old_infomask,
@@ -5643,7 +5643,7 @@ static HTSU_Result
heap_lock_updated_tuple_rec(Relation rel, ItemPointer tid, TransactionId xid,
LockTupleMode mode)
{
HTSU_Result result;
HTSU_Result result;
ItemPointerData tupid;
HeapTupleData mytup;
Buffer buf;
@@ -6698,6 +6698,7 @@ heap_prepare_freeze_tuple(HeapTupleHeader tuple, TransactionId cutoff_xid,
if (tuple->t_infomask & HEAP_MOVED)
{
xid = HeapTupleHeaderGetXvac(tuple);
/*
* For Xvac, we ignore the cutoff_xid and just always perform the
* freeze operation. The oldest release in which such a value can
@@ -8841,9 +8842,9 @@ heap_xlog_lock(XLogReaderState *record)
*/
if (xlrec->flags & XLH_LOCK_ALL_FROZEN_CLEARED)
{
RelFileNode rnode;
RelFileNode rnode;
Buffer vmbuffer = InvalidBuffer;
BlockNumber block;
BlockNumber block;
Relation reln;
XLogRecGetBlockTag(record, 0, &rnode, NULL, &block);
@@ -8914,9 +8915,9 @@ heap_xlog_lock_updated(XLogReaderState *record)
*/
if (xlrec->flags & XLH_LOCK_ALL_FROZEN_CLEARED)
{
RelFileNode rnode;
RelFileNode rnode;
Buffer vmbuffer = InvalidBuffer;
BlockNumber block;
BlockNumber block;
Relation reln;
XLogRecGetBlockTag(record, 0, &rnode, NULL, &block);

View File

@@ -1667,7 +1667,7 @@ toast_delete_datum(Relation rel, Datum value)
HeapTuple toasttup;
int num_indexes;
int validIndex;
SnapshotData SnapshotToast;
SnapshotData SnapshotToast;
if (!VARATT_IS_EXTERNAL_ONDISK(attr))
return;
@@ -1734,7 +1734,7 @@ toastrel_valueid_exists(Relation toastrel, Oid valueid)
int num_indexes;
int validIndex;
Relation *toastidxs;
SnapshotData SnapshotToast;
SnapshotData SnapshotToast;
/* Fetch a valid index relation */
validIndex = toast_open_indexes(toastrel,
@@ -1819,7 +1819,7 @@ toast_fetch_datum(struct varlena * attr)
int32 chunksize;
int num_indexes;
int validIndex;
SnapshotData SnapshotToast;
SnapshotData SnapshotToast;
if (!VARATT_IS_EXTERNAL_ONDISK(attr))
elog(ERROR, "toast_fetch_datum shouldn't be called for non-ondisk datums");
@@ -1998,7 +1998,7 @@ toast_fetch_datum_slice(struct varlena * attr, int32 sliceoffset, int32 length)
int32 chcpyend;
int num_indexes;
int validIndex;
SnapshotData SnapshotToast;
SnapshotData SnapshotToast;
if (!VARATT_IS_EXTERNAL_ONDISK(attr))
elog(ERROR, "toast_fetch_datum_slice shouldn't be called for non-ondisk datums");
@@ -2094,7 +2094,7 @@ toast_fetch_datum_slice(struct varlena * attr, int32 sliceoffset, int32 length)
init_toast_snapshot(&SnapshotToast);
nextidx = startchunk;
toastscan = systable_beginscan_ordered(toastrel, toastidxs[validIndex],
&SnapshotToast, nscankeys, toastkey);
&SnapshotToast, nscankeys, toastkey);
while ((ttup = systable_getnext_ordered(toastscan, ForwardScanDirection)) != NULL)
{
/*

View File

@@ -776,7 +776,7 @@ assign_client_encoding(const char *newval, void *extra)
*/
ereport(ERROR,
(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
errmsg("cannot change client_encoding in a parallel worker")));
errmsg("cannot change client_encoding in a parallel worker")));
}
/* We do not expect an error if PrepareClientEncoding succeeded */

View File

@@ -129,7 +129,7 @@ libpqrcv_get_conninfo(void)
{
PQconninfoOption *conn_opts;
PQconninfoOption *conn_opt;
PQExpBufferData buf;
PQExpBufferData buf;
char *retval;
Assert(streamConn != NULL);
@@ -145,7 +145,7 @@ libpqrcv_get_conninfo(void)
/* build a clean connection string from pieces */
for (conn_opt = conn_opts; conn_opt->keyword != NULL; conn_opt++)
{
bool obfuscate;
bool obfuscate;
/* Skip debug and empty options */
if (strchr(conn_opt->dispchar, 'D') ||

View File

@@ -193,10 +193,11 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit)
ResetLatch(MyLatch);
/*
* Acquiring the lock is not needed, the latch ensures proper barriers.
* If it looks like we're done, we must really be done, because once
* walsender changes the state to SYNC_REP_WAIT_COMPLETE, it will never
* update it again, so we can't be seeing a stale value in that case.
* Acquiring the lock is not needed, the latch ensures proper
* barriers. If it looks like we're done, we must really be done,
* because once walsender changes the state to SYNC_REP_WAIT_COMPLETE,
* it will never update it again, so we can't be seeing a stale value
* in that case.
*/
if (MyProc->syncRepState == SYNC_REP_WAIT_COMPLETE)
break;

View File

@@ -433,7 +433,8 @@ getNextFlagFromString(IspellDict *Conf, char **sflagset, char *sflag)
if (Conf->flagMode == FM_LONG && maxstep > 0)
ereport(ERROR,
(errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("invalid affix flag \"%s\" with \"long\" flag value", sbuf)));
errmsg("invalid affix flag \"%s\" with \"long\" flag value",
sbuf)));
*sflag = '\0';
}
@@ -1263,8 +1264,9 @@ NIImportOOAffixes(IspellDict *Conf, const char *filename)
else if (STRNCMP(s, "default") != 0)
ereport(ERROR,
(errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("Ispell dictionary supports only \"default\", "
"\"long\", and \"num\" flag value")));
errmsg("Ispell dictionary supports only "
"\"default\", \"long\", "
"and \"num\" flag values")));
}
}

View File

@@ -1849,9 +1849,9 @@ jsonb_object_agg_transfn(PG_FUNCTION_ARGS)
single_scalar = false;
/*
* values can be anything, including structured and null, so we treat
* them as in json_agg_transfn, except that single scalars are always
* pushed as WJB_VALUE items.
* values can be anything, including structured and null, so we treat them
* as in json_agg_transfn, except that single scalars are always pushed as
* WJB_VALUE items.
*/
while ((type = JsonbIteratorNext(&it, &v, false)) != WJB_DONE)

View File

@@ -430,15 +430,16 @@ pushStop(TSQueryParserState state)
#define STACKDEPTH 32
typedef struct OperatorElement {
int8 op;
int16 distance;
typedef struct OperatorElement
{
int8 op;
int16 distance;
} OperatorElement;
static void
pushOpStack(OperatorElement *stack, int *lenstack, int8 op, int16 distance)
{
if (*lenstack == STACKDEPTH) /* internal error */
if (*lenstack == STACKDEPTH) /* internal error */
elog(ERROR, "tsquery stack too small");
stack[*lenstack].op = op;
@@ -449,20 +450,20 @@ pushOpStack(OperatorElement *stack, int *lenstack, int8 op, int16 distance)
static void
cleanOpStack(TSQueryParserState state,
OperatorElement *stack, int *lenstack, int8 op)
OperatorElement *stack, int *lenstack, int8 op)
{
int opPriority = OP_PRIORITY(op);
int opPriority = OP_PRIORITY(op);
while(*lenstack)
while (*lenstack)
{
/* NOT is right associative unlike to others */
if ((op != OP_NOT && opPriority > OP_PRIORITY(stack[*lenstack - 1].op)) ||
(op == OP_NOT && opPriority >= OP_PRIORITY(stack[*lenstack - 1].op)))
(op == OP_NOT && opPriority >= OP_PRIORITY(stack[*lenstack - 1].op)))
break;
(*lenstack)--;
pushOperator(state, stack[*lenstack].op,
stack[*lenstack].distance);
stack[*lenstack].distance);
}
}
@@ -480,7 +481,7 @@ makepol(TSQueryParserState state,
ts_tokentype type;
int lenval = 0;
char *strval = NULL;
OperatorElement opstack[STACKDEPTH];
OperatorElement opstack[STACKDEPTH];
int lenstack = 0;
int16 weight = 0;
bool prefix;
@@ -503,7 +504,7 @@ makepol(TSQueryParserState state,
makepol(state, pushval, opaque);
break;
case PT_CLOSE:
cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */);
cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */ );
return;
case PT_ERR:
default:
@@ -514,7 +515,7 @@ makepol(TSQueryParserState state,
}
}
cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */);
cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */ );
}
static void
@@ -845,8 +846,8 @@ infix(INFIX *in, int parentPriority, bool rightPhraseOp)
in->curpol++;
if (priority < parentPriority ||
/* phrase operator depends on order */
(op == OP_PHRASE && rightPhraseOp))
/* phrase operator depends on order */
(op == OP_PHRASE && rightPhraseOp))
{
needParenthesis = true;
RESIZEBUF(in, 2);
@@ -916,7 +917,7 @@ tsqueryout(PG_FUNCTION_ARGS)
nrm.cur = nrm.buf = (char *) palloc(sizeof(char) * nrm.buflen);
*(nrm.cur) = '\0';
nrm.op = GETOPERAND(query);
infix(&nrm, -1 /* lowest priority */, false);
infix(&nrm, -1 /* lowest priority */ , false);
PG_FREE_IF_COPY(query, 0);
PG_RETURN_CSTRING(nrm.buf);

View File

@@ -406,7 +406,7 @@ normalize_phrase_tree(NODE *node)
if (node->valnode->qoperator.oper == OP_NOT)
{
NODE *orignode = node;
NODE *orignode = node;
/* eliminate NOT sequence */
while (node->valnode->type == QI_OPR &&
@@ -430,8 +430,8 @@ normalize_phrase_tree(NODE *node)
node->right = normalize_phrase_tree(node->right);
/*
* if subtree contains only nodes with higher "priority" then
* we are done. See comment near NODE_PRIORITY()
* if subtree contains only nodes with higher "priority" then we are
* done. See comment near NODE_PRIORITY()
*/
if (NODE_PRIORITY(node) <= NODE_PRIORITY(node->right) &&
NODE_PRIORITY(node) <= NODE_PRIORITY(node->left))

View File

@@ -299,9 +299,9 @@ struct Tuplesortstate
* Function to read a stored tuple from tape back into memory. 'len' is
* the already-read length of the stored tuple. Create a palloc'd copy,
* initialize tuple/datum1/isnull1 in the target SortTuple struct, and
* decrease state->availMem by the amount of memory space consumed.
* (See batchUsed notes for details on how memory is handled when
* incremental accounting is abandoned.)
* decrease state->availMem by the amount of memory space consumed. (See
* batchUsed notes for details on how memory is handled when incremental
* accounting is abandoned.)
*/
void (*readtup) (Tuplesortstate *state, SortTuple *stup,
int tapenum, unsigned int len);
@@ -309,8 +309,8 @@ struct Tuplesortstate
/*
* Function to move a caller tuple. This is usually implemented as a
* memmove() shim, but function may also perform additional fix-up of
* caller tuple where needed. Batch memory support requires the
* movement of caller tuples from one location in memory to another.
* caller tuple where needed. Batch memory support requires the movement
* of caller tuples from one location in memory to another.
*/
void (*movetup) (void *dest, void *src, unsigned int len);