* further down in the plan tree.
*/
ps = queryDesc->planstate;
- if (IsA(ps, GatherState) &&((Gather *) ps->plan)->invisible)
+ if (IsA(ps, GatherState) && ((Gather *) ps->plan)->invisible)
{
ps = outerPlanState(ps);
es->hide_workers = true;
{
bool useprefix;
- useprefix = (IsA(planstate->plan, SubqueryScan) ||es->verbose);
+ useprefix = (IsA(planstate->plan, SubqueryScan) || es->verbose);
show_qual(qual, qlabel, planstate, ancestors, useprefix, es);
}
for (;;)
{
/* only one varno, so no need to check that */
- if (IsA(expr, Var) &&((Var *) expr)->varattno == varattno)
+ if (IsA(expr, Var) && ((Var *) expr)->varattno == varattno)
return false;
else if (IsA(expr, RelabelType))
expr = (Node *) ((RelabelType *) expr)->arg;
* DefineDomain.)
*/
if (defaultExpr == NULL ||
- (IsA(defaultExpr, Const) &&((Const *) defaultExpr)->constisnull))
+ (IsA(defaultExpr, Const) && ((Const *) defaultExpr)->constisnull))
{
/* Default is NULL, drop it */
defaultExpr = NULL;
*colnos = bms_add_member(*colnos, var->varattno);
return false;
}
- if (IsA(node, Aggref) ||IsA(node, GroupingFunc))
+ if (IsA(node, Aggref) || IsA(node, GroupingFunc))
{
/* do not descend into aggregate exprs */
return false;
TargetEntry *te = (TargetEntry *) lfirst(lc);
Expr *expr = te->expr;
- if ((IsA(expr, FuncExpr) &&((FuncExpr *) expr)->funcretset) ||
- (IsA(expr, OpExpr) &&((OpExpr *) expr)->opretset))
+ if ((IsA(expr, FuncExpr) && ((FuncExpr *) expr)->funcretset) ||
+ (IsA(expr, OpExpr) && ((OpExpr *) expr)->opretset))
{
state->elems[off] = (Node *)
ExecInitFunctionResultSet(expr, state->ps.ps_ExprContext,
int
be_tls_init(bool isServerStart)
{
- STACK_OF(X509_NAME) *root_cert_list = NULL;
+ STACK_OF(X509_NAME) * root_cert_list = NULL;
SSL_CTX *context;
int ssl_ver_min = -1;
int ssl_ver_max = -1;
if (obj == NULL)
appendStringInfoString(str, "<>");
- else if (IsA(obj, List) ||IsA(obj, IntList) || IsA(obj, OidList))
+ else if (IsA(obj, List) || IsA(obj, IntList) || IsA(obj, OidList))
_outList(str, obj);
else if (IsA(obj, Integer) ||
IsA(obj, Float) ||
* The whole issue is moot if we are working from a unique-ified outer
* input, or if we know we don't need to mark/restore at all.
*/
- if (IsA(outer_path, UniquePath) ||path->skip_mark_restore)
+ if (IsA(outer_path, UniquePath) || path->skip_mark_restore)
rescannedtuples = 0;
else
{
static void
set_param_references(PlannerInfo *root, Plan *plan)
{
- Assert(IsA(plan, Gather) ||IsA(plan, GatherMerge));
+ Assert(IsA(plan, Gather) || IsA(plan, GatherMerge));
if (plan->lefttree->extParam)
{
* workers can help project. But if there is something that is not
* parallel-safe in the target expressions, then we can't.
*/
- if ((IsA(path, GatherPath) ||IsA(path, GatherMergePath)) &&
+ if ((IsA(path, GatherPath) || IsA(path, GatherMergePath)) &&
is_parallel_safe(root, (Node *) target->exprs))
{
/*
/* If it's a set-operation tree, drill down to leftmost SelectStmt */
while (stmt && stmt->op != SETOP_NONE)
stmt = stmt->larg;
- Assert(stmt && IsA(stmt, SelectStmt) &&stmt->larg == NULL);
+ Assert(stmt && IsA(stmt, SelectStmt) && stmt->larg == NULL);
if (stmt->intoClause)
{
if (tle->resjunk)
continue;
if (tle->expr &&
- (IsA(tle->expr, Const) ||IsA(tle->expr, Param)) &&
+ (IsA(tle->expr, Const) || IsA(tle->expr, Param)) &&
exprType((Node *) tle->expr) == UNKNOWNOID)
expr = tle->expr;
else
*/
if (context->sublevels_up == 0)
{
- if ((IsA(node, FuncExpr) &&((FuncExpr *) node)->funcretset) ||
- (IsA(node, OpExpr) &&((OpExpr *) node)->opretset))
+ if ((IsA(node, FuncExpr) && ((FuncExpr *) node)->funcretset) ||
+ (IsA(node, OpExpr) && ((OpExpr *) node)->opretset))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("aggregate function calls cannot contain set-returning function calls"),
* unadorned NULL that's not accepted back by the grammar.
*/
if (exprKind == EXPR_KIND_LIMIT && limitOption == LIMIT_OPTION_WITH_TIES &&
- IsA(clause, A_Const) &&((A_Const *) clause)->val.type == T_Null)
+ IsA(clause, A_Const) && ((A_Const *) clause)->val.type == T_Null)
ereport(ERROR,
(errcode(ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE),
errmsg("row count cannot be NULL in FETCH FIRST ... WITH TIES clause")));
list_length(a->name) == 1 &&
strcmp(strVal(linitial(a->name)), "=") == 0 &&
(exprIsNullConstant(lexpr) || exprIsNullConstant(rexpr)) &&
- (!IsA(lexpr, CaseTestExpr) &&!IsA(rexpr, CaseTestExpr)))
+ (!IsA(lexpr, CaseTestExpr) && !IsA(rexpr, CaseTestExpr)))
{
NullTest *n = makeNode(NullTest);
if (IsA(rightop, RelabelType))
rightop = (Node *) ((RelabelType *) rightop)->arg;
- if (IsA(leftop, Var) &&IsA(rightop, Const))
+ if (IsA(leftop, Var) && IsA(rightop, Const))
{
var = (Var *) leftop;
cst = (Const *) rightop;
varonleft = true;
}
- else if (IsA(leftop, Const) &&IsA(rightop, Var))
+ else if (IsA(leftop, Const) && IsA(rightop, Var))
{
var = (Var *) rightop;
cst = (Const *) leftop;
typmod = (Node *) lsecond(expr->args);
- if (IsA(typmod, Const) &&!((Const *) typmod)->constisnull)
+ if (IsA(typmod, Const) && !((Const *) typmod)->constisnull)
{
Node *source = (Node *) linitial(expr->args);
int32 old_precis = exprTypmod(source);
if (lconv->thousands_sep && *lconv->thousands_sep)
Np->L_thousands_sep = lconv->thousands_sep;
/* Make sure thousands separator doesn't match decimal point symbol. */
- else if (strcmp(Np->decimal, ",") !=0)
+ else if (strcmp(Np->decimal, ",") != 0)
Np->L_thousands_sep = ",";
else
Np->L_thousands_sep = ".";
typmod = (Node *) lsecond(expr->args);
- if (IsA(typmod, Const) &&!((Const *) typmod)->constisnull)
+ if (IsA(typmod, Const) && !((Const *) typmod)->constisnull)
{
Node *source = (Node *) linitial(expr->args);
int32 old_typmod = exprTypmod(source);
*/
bool need_paren = (PRETTY_PAREN(context)
|| IsA(expr, FuncExpr)
- ||IsA(expr, Aggref)
- ||IsA(expr, WindowFunc));
+ || IsA(expr, Aggref)
+ || IsA(expr, WindowFunc));
if (need_paren)
appendStringInfoChar(context->buf, '(');
need_paren_on_right = PRETTY_PAREN(context) &&
!IsA(j->rarg, RangeTblRef) &&
- !(IsA(j->rarg, JoinExpr) &&((JoinExpr *) j->rarg)->alias != NULL);
+ !(IsA(j->rarg, JoinExpr) && ((JoinExpr *) j->rarg)->alias != NULL);
if (!PRETTY_PAREN(context) || j->alias != NULL)
appendStringInfoChar(buf, '(');
typmod = (Node *) lsecond(expr->args);
- if (IsA(typmod, Const) &&!((Const *) typmod)->constisnull)
+ if (IsA(typmod, Const) && !((Const *) typmod)->constisnull)
{
Node *source = (Node *) linitial(expr->args);
int32 new_typmod = DatumGetInt32(((Const *) typmod)->constvalue);
typmod = (Node *) lsecond(expr->args);
- if (IsA(typmod, Const) &&!((Const *) typmod)->constisnull)
+ if (IsA(typmod, Const) && !((Const *) typmod)->constisnull)
{
Node *source = (Node *) linitial(expr->args);
int32 new_typmod = DatumGetInt32(((Const *) typmod)->constvalue);
typmod = (Node *) lsecond(expr->args);
- if (IsA(typmod, Const) &&!((Const *) typmod)->constisnull)
+ if (IsA(typmod, Const) && !((Const *) typmod)->constisnull)
{
Node *source = (Node *) linitial(expr->args);
int32 old_typmod = exprTypmod(source);
}
free(buf);
- if (cfclose(cfp) !=0)
+ if (cfclose(cfp) != 0)
fatal("could not close data file \"%s\": %m", filename);
}
*/
if (strcmp(schema_query->catname,
"pg_catalog.pg_class c") == 0 &&
- strncmp(text, "pg_", 3) !=0)
+ strncmp(text, "pg_", 3) != 0)
{
appendPQExpBufferStr(&query_buffer,
" AND c.relnamespace <> (SELECT oid FROM"
*/
if (*str == '-')
{
- dummy_lex.input = unconstify(char *, str) +1;
+ dummy_lex.input = unconstify(char *, str) + 1;
dummy_lex.input_length = len - 1;
}
else
for (i = p + 1; isdigit((unsigned char) text[i]); i++)
/* empty loop body */ ;
if (!isalpha((unsigned char) text[i]) &&
- isascii((unsigned char) text[i]) &&text[i] != '_')
+ isascii((unsigned char) text[i]) && text[i] != '_')
/* not dollar delimited quote */
return p;
}
for (len = 1; (*text)[ptr + len] && isvarchar((*text)[ptr + len]); len++)
/* skip */ ;
- if (!(newcopy = (char *) ecpg_alloc(strlen(*text) -len + strlen(buffer) + 1, lineno)))
+ if (!(newcopy = (char *) ecpg_alloc(strlen(*text) - len + strlen(buffer) + 1, lineno)))
{
ecpg_free(buffer);
return false;
int *names_examined,
char **first_name)
{
- STACK_OF(GENERAL_NAME) *peer_san;
+ STACK_OF(GENERAL_NAME) * peer_san;
int i;
int rc = 0;
if (IsA(tle_expr, Const))
break;
/* Otherwise, it had better be a Param or an outer Var */
- Assert(IsA(tle_expr, Param) ||(IsA(tle_expr, Var) &&
- ((Var *) tle_expr)->varno == OUTER_VAR));
+ Assert(IsA(tle_expr, Param) || (IsA(tle_expr, Var) &&
+ ((Var *) tle_expr)->varno == OUTER_VAR));
/* Descend to the child node */
plan = plan->lefttree;
}
* Do two's-complement negation even on non-two's-complement machines.
* If the result would be minval - 1, return minval.
*/
- result -= !TWOS_COMPLEMENT(int32) &&result != 0;
+ result -= !TWOS_COMPLEMENT(int32) && result != 0;
result += minval;
}
return result;
int64 one = 1;
int64 halfmaxval = one << (64 - 2);
int64 maxval = halfmaxval - 1 + halfmaxval;
- int64 minval = -TWOS_COMPLEMENT(int64) -maxval;
+ int64 minval = -TWOS_COMPLEMENT(int64) - maxval;
result = codep[0] & 0x7f;
for (i = 1; i < 8; ++i)
* Do two's-complement negation even on non-two's-complement machines.
* If the result would be minval - 1, return minval.
*/
- result -= !TWOS_COMPLEMENT(int64) &&result != 0;
+ result -= !TWOS_COMPLEMENT(int64) && result != 0;
result += minval;
}
return result;
static bool
differ_by_repeat(const pg_time_t t1, const pg_time_t t0)
{
- if (TYPE_BIT(pg_time_t) -TYPE_SIGNED(pg_time_t) <SECSPERREPEAT_BITS)
+ if (TYPE_BIT(pg_time_t) - TYPE_SIGNED(pg_time_t) < SECSPERREPEAT_BITS)
return 0;
return t1 - t0 == SECSPERREPEAT;
}
int leapdays;
tdelta = tdays / DAYSPERLYEAR;
- if (!((!TYPE_SIGNED(pg_time_t) ||INT_MIN <= tdelta)
+ if (!((!TYPE_SIGNED(pg_time_t) || INT_MIN <= tdelta)
&& tdelta <= INT_MAX))
goto out_of_range;
idelta = tdelta;
static char *
_conv(int n, const char *format, char *pt, const char *ptlim)
{
- char buf[INT_STRLEN_MAXIMUM(int) +1];
+ char buf[INT_STRLEN_MAXIMUM(int) + 1];
sprintf(buf, format, n);
return _add(buf, pt, ptlim);
umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
#endif
progname = argv[0];
- if (TYPE_BIT(zic_t) <64)
+ if (TYPE_BIT(zic_t) < 64)
{
fprintf(stderr, "%s: %s\n", progname,
_("wild compilation-time specification of zic_t"));
if (type == NULL || *type == '\0')
return true;
buf = emalloc(1 + 4 * strlen(yitcommand) + 2
- + INT_STRLEN_MAXIMUM(zic_t) +2 + 4 * strlen(type) + 2);
+ + INT_STRLEN_MAXIMUM(zic_t) + 2 + 4 * strlen(type) + 2);
b = shellquote(buf, yitcommand);
*b++ = ' ';
b += sprintf(b, INT64_FORMAT, year);
use Getopt::Long;
# Update for pg_bsd_indent version
-my $INDENT_VERSION = "2.1";
+my $INDENT_VERSION = "2.1.1";
# Our standard indent settings
my $indent_opts =
exit 1;
}
- if (`$indent --version` !~ m/ $INDENT_VERSION$/)
+ if (`$indent --version` !~ m/ $INDENT_VERSION /)
{
print STDERR
"You do not appear to have $indent version $INDENT_VERSION installed on your system.\n";