提交 fcf3e71f 编写于 作者: H Heikki Linnakangas

Whitespace fixes, to match upstream code better.

上级 7b35da14
......@@ -747,7 +747,6 @@ ExecGrant_Relation(InternalGrant *istmt)
}
else
{
/*
* Adjust the default permissions based on whether it is a
* sequence
......@@ -808,7 +807,7 @@ ExecGrant_Relation(InternalGrant *istmt)
}
}
}
/*
* Get owner ID and working copy of existing ACL. If
* there's no ACL, substitute the proper default.
......@@ -822,7 +821,7 @@ ExecGrant_Relation(InternalGrant *istmt)
ownerId);
else
old_acl = DatumGetAclPCopy(aclDatum);
/* Determine ID to do the grant as, and available grant options */
select_best_grantor(GetUserId(), this_privileges,
old_acl, ownerId,
......@@ -2037,6 +2036,7 @@ pg_class_aclmask(Oid table_oid, Oid roleid,
}
}
}
/*
* Otherwise, superusers bypass all permission-checking.
*/
......
......@@ -2344,6 +2344,7 @@ cost_hashjoin(HashPath *path, PlannerInfo *root)
path->jpath.path.total_cost = startup_cost + run_cost;
}
/*
* cost_qual_eval
* Estimate the CPU costs of evaluating a WHERE clause.
......@@ -3172,6 +3173,7 @@ set_cte_size_estimates(PlannerInfo *root, RelOptInfo *rel, Plan *cteplan)
set_baserel_size_estimates(root, rel);
}
/*
* set_rel_width
* Set the estimated output width of a base relation.
......
......@@ -2668,7 +2668,6 @@ create_ctescan_plan(PlannerInfo *root, Path *best_path,
return scan_plan;
}
/*
* create_worktablescan_plan
* Returns a worktablescan plan for the base relation scanned by 'best_path'
......@@ -2696,7 +2695,7 @@ create_worktablescan_plan(PlannerInfo *root, Path *best_path,
*/
levelsup = rte->ctelevelsup;
if (levelsup == 0) /* shouldn't happen */
elog(ERROR, "bad levelsup for CTE \"%s\"", rte->ctename);
elog(ERROR, "bad levelsup for CTE \"%s\"", rte->ctename);
levelsup--;
cteroot = root;
while (levelsup-- > 0)
......@@ -2705,7 +2704,7 @@ create_worktablescan_plan(PlannerInfo *root, Path *best_path,
if (!cteroot) /* shouldn't happen */
elog(ERROR, "bad levelsup for CTE \"%s\"", rte->ctename);
}
if (cteroot->wt_param_id < 0) /* shouldn't happen */
if (cteroot->wt_param_id < 0) /* shouldn't happen */
elog(ERROR, "could not find param ID for CTE \"%s\"", rte->ctename);
/* Sort clauses into best execution order */
......
......@@ -591,7 +591,7 @@ IncrementVarSublevelsUp_walker(Node *node,
if (IsA(node, Aggref))
{
Aggref *agg = (Aggref *) node;
if (agg->agglevelsup >= context->min_sublevels_up)
agg->agglevelsup += context->delta_sublevels_up;
/* fall through to recurse into argument */
......@@ -599,7 +599,7 @@ IncrementVarSublevelsUp_walker(Node *node,
if (IsA(node, WindowRef))
{
WindowRef *wref = (WindowRef *) node;
if (wref->winlevelsup >= context->min_sublevels_up)
wref->winlevelsup += context->delta_sublevels_up;
/* fall through to recurse into argument */
......
......@@ -1389,6 +1389,7 @@ convert_priv_string(text *priv_type_text)
return ACL_NO_RIGHTS; /* keep compiler quiet */
}
/*
* has_table_privilege variants
* These are all named "has_table_privilege" at the SQL level.
......@@ -1883,6 +1884,7 @@ convert_database_priv_string(text *priv_type_text)
return ACL_NO_RIGHTS; /* keep compiler quiet */
}
/*
* has_function_privilege variants
* These are all named "has_function_privilege" at the SQL level.
......
......@@ -103,6 +103,7 @@ static ArrayType *array_fill_internal(ArrayType *dims, ArrayType *lbs,
Datum value, bool isnull, Oid elmtype,
FunctionCallInfo fcinfo);
/*
* array_in :
* converts an array from the external format in "string" to
......
......@@ -3473,7 +3473,7 @@ DecodeISO8601Interval(char *str,
if (*str != '-')
return DTERR_BAD_FORMAT;
str++;
dterr = ParseISO8601Number(str, &str, &val, &fval);
if (dterr)
return dterr;
......
......@@ -147,7 +147,7 @@ int2vectorin(PG_FUNCTION_ARGS)
while (*intString && isspace((unsigned char) *intString))
intString++;
if (*intString == '\0')
break;
break;
result->values[n] = pg_atoi(intString, sizeof(int16), ' ');
while (*intString && !isspace((unsigned char) *intString))
intString++;
......
......@@ -4403,7 +4403,6 @@ get_rule_expr(Node *node, deparse_context *context,
IsA(strip_implicit_coercions(linitial(args)),
CaseTestExpr))
w = (Node *) lsecond(args);
}
}
......@@ -5081,7 +5080,8 @@ get_func_expr(FuncExpr *expr, deparse_context *context,
}
appendStringInfo(buf, "%s(",
generate_function_name(funcoid, nargs, argtypes, &is_variadic));
generate_function_name(funcoid, nargs, argtypes,
&is_variadic));
nargs = 0;
foreach(l, expr->args)
{
......@@ -6525,7 +6525,8 @@ generate_relation_name(Oid relid, List *namespaces)
* The result includes all necessary quoting and schema-prefixing.
*/
static char *
generate_function_name(Oid funcid, int nargs, Oid *argtypes, bool *is_variadic)
generate_function_name(Oid funcid, int nargs, Oid *argtypes,
bool *is_variadic)
{
HeapTuple proctup;
Form_pg_proc procform;
......
......@@ -696,25 +696,25 @@ DATA(insert OID = 6994 (gp_relation_node PGNSP PGUID -1 f c t \054 5094 0 0 reco
#define TYPTYPE_ENUM 'e' /* enumerated type */
#define TYPTYPE_PSEUDO 'p' /* pseudo-type */
/*
/*
* typcategory is from Postgres 9.0 catalog changes.
* Used only (so far) for JSON functions
*/
# define TYPCATEGORY_INVALID '\0' /* not an allowed category */
# define TYPCATEGORY_ARRAY 'A'
# define TYPCATEGORY_BOOLEAN 'B'
# define TYPCATEGORY_COMPOSITE 'C'
# define TYPCATEGORY_DATETIME 'D'
# define TYPCATEGORY_ENUM 'E'
# define TYPCATEGORY_GEOMETRIC 'G'
# define TYPCATEGORY_NETWORK 'I' /* think INET */
# define TYPCATEGORY_NUMERIC 'N'
# define TYPCATEGORY_PSEUDOTYPE 'P'
# define TYPCATEGORY_STRING 'S'
# define TYPCATEGORY_TIMESPAN 'T'
# define TYPCATEGORY_USER 'U'
# define TYPCATEGORY_BITSTRING 'V' /* er ... "varbit"? */
# define TYPCATEGORY_UNKNOWN 'X'
#define TYPCATEGORY_INVALID '\0' /* not an allowed category */
#define TYPCATEGORY_ARRAY 'A'
#define TYPCATEGORY_BOOLEAN 'B'
#define TYPCATEGORY_COMPOSITE 'C'
#define TYPCATEGORY_DATETIME 'D'
#define TYPCATEGORY_ENUM 'E'
#define TYPCATEGORY_GEOMETRIC 'G'
#define TYPCATEGORY_NETWORK 'I' /* think INET */
#define TYPCATEGORY_NUMERIC 'N'
#define TYPCATEGORY_PSEUDOTYPE 'P'
#define TYPCATEGORY_STRING 'S'
#define TYPCATEGORY_TIMESPAN 'T'
#define TYPCATEGORY_USER 'U'
#define TYPCATEGORY_BITSTRING 'V' /* er ... "varbit"? */
#define TYPCATEGORY_UNKNOWN 'X'
/* Is a type OID a polymorphic pseudotype? (Beware of multiple evaluation) */
#define IsPolymorphicType(typid) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册