mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Pre-beta mechanical code beautification.
Run pgindent, pgperltidy, and reformat-dat-files. I manually fixed a couple of comments that pgindent uglified.
This commit is contained in:
@@ -2343,7 +2343,7 @@ _copyJsonReturning(const JsonReturning *from)
|
||||
static JsonValueExpr *
|
||||
_copyJsonValueExpr(const JsonValueExpr *from)
|
||||
{
|
||||
JsonValueExpr *newnode = makeNode(JsonValueExpr);
|
||||
JsonValueExpr *newnode = makeNode(JsonValueExpr);
|
||||
|
||||
COPY_NODE_FIELD(raw_expr);
|
||||
COPY_NODE_FIELD(formatted_expr);
|
||||
@@ -2358,7 +2358,7 @@ _copyJsonValueExpr(const JsonValueExpr *from)
|
||||
static JsonParseExpr *
|
||||
_copyJsonParseExpr(const JsonParseExpr *from)
|
||||
{
|
||||
JsonParseExpr *newnode = makeNode(JsonParseExpr);
|
||||
JsonParseExpr *newnode = makeNode(JsonParseExpr);
|
||||
|
||||
COPY_NODE_FIELD(expr);
|
||||
COPY_NODE_FIELD(output);
|
||||
@@ -2488,7 +2488,7 @@ _copyJsonObjectAgg(const JsonObjectAgg *from)
|
||||
static JsonOutput *
|
||||
_copyJsonOutput(const JsonOutput *from)
|
||||
{
|
||||
JsonOutput *newnode = makeNode(JsonOutput);
|
||||
JsonOutput *newnode = makeNode(JsonOutput);
|
||||
|
||||
COPY_NODE_FIELD(typeName);
|
||||
COPY_NODE_FIELD(returning);
|
||||
@@ -2550,7 +2550,7 @@ _copyJsonArrayQueryConstructor(const JsonArrayQueryConstructor *from)
|
||||
static JsonExpr *
|
||||
_copyJsonExpr(const JsonExpr *from)
|
||||
{
|
||||
JsonExpr *newnode = makeNode(JsonExpr);
|
||||
JsonExpr *newnode = makeNode(JsonExpr);
|
||||
|
||||
COPY_SCALAR_FIELD(op);
|
||||
COPY_NODE_FIELD(formatted_expr);
|
||||
@@ -2614,7 +2614,7 @@ _copyJsonItemCoercions(const JsonItemCoercions *from)
|
||||
static JsonFuncExpr *
|
||||
_copyJsonFuncExpr(const JsonFuncExpr *from)
|
||||
{
|
||||
JsonFuncExpr *newnode = makeNode(JsonFuncExpr);
|
||||
JsonFuncExpr *newnode = makeNode(JsonFuncExpr);
|
||||
|
||||
COPY_SCALAR_FIELD(op);
|
||||
COPY_NODE_FIELD(common);
|
||||
@@ -2651,7 +2651,7 @@ _copyJsonIsPredicate(const JsonIsPredicate *from)
|
||||
static JsonBehavior *
|
||||
_copyJsonBehavior(const JsonBehavior *from)
|
||||
{
|
||||
JsonBehavior *newnode = makeNode(JsonBehavior);
|
||||
JsonBehavior *newnode = makeNode(JsonBehavior);
|
||||
|
||||
COPY_SCALAR_FIELD(btype);
|
||||
COPY_NODE_FIELD(default_expr);
|
||||
@@ -2665,7 +2665,7 @@ _copyJsonBehavior(const JsonBehavior *from)
|
||||
static JsonCommon *
|
||||
_copyJsonCommon(const JsonCommon *from)
|
||||
{
|
||||
JsonCommon *newnode = makeNode(JsonCommon);
|
||||
JsonCommon *newnode = makeNode(JsonCommon);
|
||||
|
||||
COPY_NODE_FIELD(expr);
|
||||
COPY_NODE_FIELD(pathspec);
|
||||
@@ -2682,7 +2682,7 @@ _copyJsonCommon(const JsonCommon *from)
|
||||
static JsonArgument *
|
||||
_copyJsonArgument(const JsonArgument *from)
|
||||
{
|
||||
JsonArgument *newnode = makeNode(JsonArgument);
|
||||
JsonArgument *newnode = makeNode(JsonArgument);
|
||||
|
||||
COPY_NODE_FIELD(val);
|
||||
COPY_STRING_FIELD(name);
|
||||
@@ -2696,7 +2696,7 @@ _copyJsonArgument(const JsonArgument *from)
|
||||
static JsonTable *
|
||||
_copyJsonTable(const JsonTable *from)
|
||||
{
|
||||
JsonTable *newnode = makeNode(JsonTable);
|
||||
JsonTable *newnode = makeNode(JsonTable);
|
||||
|
||||
COPY_NODE_FIELD(common);
|
||||
COPY_NODE_FIELD(columns);
|
||||
@@ -5480,7 +5480,7 @@ _copyExtensibleNode(const ExtensibleNode *from)
|
||||
static Integer *
|
||||
_copyInteger(const Integer *from)
|
||||
{
|
||||
Integer *newnode = makeNode(Integer);
|
||||
Integer *newnode = makeNode(Integer);
|
||||
|
||||
COPY_SCALAR_FIELD(ival);
|
||||
|
||||
@@ -5500,7 +5500,7 @@ _copyFloat(const Float *from)
|
||||
static Boolean *
|
||||
_copyBoolean(const Boolean *from)
|
||||
{
|
||||
Boolean *newnode = makeNode(Boolean);
|
||||
Boolean *newnode = makeNode(Boolean);
|
||||
|
||||
COPY_SCALAR_FIELD(boolval);
|
||||
|
||||
@@ -5520,7 +5520,7 @@ _copyString(const String *from)
|
||||
static BitString *
|
||||
_copyBitString(const BitString *from)
|
||||
{
|
||||
BitString *newnode = makeNode(BitString);
|
||||
BitString *newnode = makeNode(BitString);
|
||||
|
||||
COPY_STRING_FIELD(bsval);
|
||||
|
||||
|
||||
@@ -2802,8 +2802,7 @@ static bool
|
||||
_equalA_Const(const A_Const *a, const A_Const *b)
|
||||
{
|
||||
/*
|
||||
* Hack for in-line val field. Also val is not valid is isnull is
|
||||
* true.
|
||||
* Hack for in-line val field. Also val is not valid is isnull is true.
|
||||
*/
|
||||
if (!a->isnull && !b->isnull &&
|
||||
!equal(&a->val, &b->val))
|
||||
|
||||
@@ -1003,7 +1003,7 @@ exprCollation(const Node *expr)
|
||||
break;
|
||||
case T_JsonExpr:
|
||||
{
|
||||
JsonExpr *jexpr = (JsonExpr *) expr;
|
||||
JsonExpr *jexpr = (JsonExpr *) expr;
|
||||
JsonCoercion *coercion = jexpr->result_coercion;
|
||||
|
||||
if (!coercion)
|
||||
@@ -1239,7 +1239,8 @@ exprSetCollation(Node *expr, Oid collation)
|
||||
if (ctor->coercion)
|
||||
exprSetCollation((Node *) ctor->coercion, collation);
|
||||
else
|
||||
Assert(!OidIsValid(collation)); /* result is always a json[b] type */
|
||||
Assert(!OidIsValid(collation)); /* result is always a
|
||||
* json[b] type */
|
||||
}
|
||||
break;
|
||||
case T_JsonIsPredicate:
|
||||
@@ -1247,7 +1248,7 @@ exprSetCollation(Node *expr, Oid collation)
|
||||
break;
|
||||
case T_JsonExpr:
|
||||
{
|
||||
JsonExpr *jexpr = (JsonExpr *) expr;
|
||||
JsonExpr *jexpr = (JsonExpr *) expr;
|
||||
JsonCoercion *coercion = jexpr->result_coercion;
|
||||
|
||||
if (!coercion)
|
||||
@@ -2496,7 +2497,7 @@ expression_tree_walker(Node *node,
|
||||
return walker(((JsonIsPredicate *) node)->expr, context);
|
||||
case T_JsonExpr:
|
||||
{
|
||||
JsonExpr *jexpr = (JsonExpr *) node;
|
||||
JsonExpr *jexpr = (JsonExpr *) node;
|
||||
|
||||
if (walker(jexpr->formatted_expr, context))
|
||||
return true;
|
||||
@@ -3568,8 +3569,8 @@ expression_tree_mutator(Node *node,
|
||||
break;
|
||||
case T_JsonExpr:
|
||||
{
|
||||
JsonExpr *jexpr = (JsonExpr *) node;
|
||||
JsonExpr *newnode;
|
||||
JsonExpr *jexpr = (JsonExpr *) node;
|
||||
JsonExpr *newnode;
|
||||
|
||||
FLATCOPY(newnode, jexpr, JsonExpr);
|
||||
MUTATE(newnode->path_spec, jexpr->path_spec, Node *);
|
||||
@@ -4545,7 +4546,7 @@ raw_expression_tree_walker(Node *node,
|
||||
break;
|
||||
case T_JsonTableColumn:
|
||||
{
|
||||
JsonTableColumn *jtc = (JsonTableColumn *) node;
|
||||
JsonTableColumn *jtc = (JsonTableColumn *) node;
|
||||
|
||||
if (walker(jtc->typeName, context))
|
||||
return true;
|
||||
|
||||
@@ -3613,8 +3613,8 @@ static void
|
||||
_outFloat(StringInfo str, const Float *node)
|
||||
{
|
||||
/*
|
||||
* We assume the value is a valid numeric literal and so does not
|
||||
* need quoting.
|
||||
* We assume the value is a valid numeric literal and so does not need
|
||||
* quoting.
|
||||
*/
|
||||
appendStringInfoString(str, node->fval);
|
||||
}
|
||||
@@ -3629,8 +3629,8 @@ static void
|
||||
_outString(StringInfo str, const String *node)
|
||||
{
|
||||
/*
|
||||
* We use outToken to provide escaping of the string's content,
|
||||
* but we don't want it to do anything with an empty string.
|
||||
* We use outToken to provide escaping of the string's content, but we
|
||||
* don't want it to do anything with an empty string.
|
||||
*/
|
||||
appendStringInfoChar(str, '"');
|
||||
if (node->sval[0] != '\0')
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
Integer *
|
||||
makeInteger(int i)
|
||||
{
|
||||
Integer *v = makeNode(Integer);
|
||||
Integer *v = makeNode(Integer);
|
||||
|
||||
v->ival = i;
|
||||
return v;
|
||||
@@ -48,7 +48,7 @@ makeFloat(char *numericStr)
|
||||
Boolean *
|
||||
makeBoolean(bool val)
|
||||
{
|
||||
Boolean *v = makeNode(Boolean);
|
||||
Boolean *v = makeNode(Boolean);
|
||||
|
||||
v->boolval = val;
|
||||
return v;
|
||||
|
||||
Reference in New Issue
Block a user