Rename some node support functions for consistency
authorPeter Eisentraut
Wed, 21 Jul 2021 08:24:06 +0000 (10:24 +0200)
committerPeter Eisentraut
Wed, 21 Jul 2021 08:24:06 +0000 (10:24 +0200)
Some node function names didn't match their node type names exactly.
Fix those for consistency.

Discussion: https://www.postgresql.org/message-id/flat/c1097590-a6a4-486a-64b1-e1f9cc0533ce@enterprisedb.com

src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c

index 9d4893c50443ff7d5a1b2e29da3920d4bcd2eaf8..29020c908e87aa531abc7edcfd799d0cdd87f101 100644 (file)
@@ -2701,7 +2701,7 @@ _copyCommonTableExpr(const CommonTableExpr *from)
 }
 
 static A_Expr *
-_copyAExpr(const A_Expr *from)
+_copyA_Expr(const A_Expr *from)
 {
    A_Expr     *newnode = makeNode(A_Expr);
 
@@ -2737,7 +2737,7 @@ _copyParamRef(const ParamRef *from)
 }
 
 static A_Const *
-_copyAConst(const A_Const *from)
+_copyA_Const(const A_Const *from)
 {
    A_Const    *newnode = makeNode(A_Const);
 
@@ -2788,7 +2788,7 @@ _copyFuncCall(const FuncCall *from)
 }
 
 static A_Star *
-_copyAStar(const A_Star *from)
+_copyA_Star(const A_Star *from)
 {
    A_Star     *newnode = makeNode(A_Star);
 
@@ -2796,7 +2796,7 @@ _copyAStar(const A_Star *from)
 }
 
 static A_Indices *
-_copyAIndices(const A_Indices *from)
+_copyA_Indices(const A_Indices *from)
 {
    A_Indices  *newnode = makeNode(A_Indices);
 
@@ -5714,7 +5714,7 @@ copyObjectImpl(const void *from)
            retval = _copyDropSubscriptionStmt(from);
            break;
        case T_A_Expr:
-           retval = _copyAExpr(from);
+           retval = _copyA_Expr(from);
            break;
        case T_ColumnRef:
            retval = _copyColumnRef(from);
@@ -5723,16 +5723,16 @@ copyObjectImpl(const void *from)
            retval = _copyParamRef(from);
            break;
        case T_A_Const:
-           retval = _copyAConst(from);
+           retval = _copyA_Const(from);
            break;
        case T_FuncCall:
            retval = _copyFuncCall(from);
            break;
        case T_A_Star:
-           retval = _copyAStar(from);
+           retval = _copyA_Star(from);
            break;
        case T_A_Indices:
-           retval = _copyAIndices(from);
+           retval = _copyA_Indices(from);
            break;
        case T_A_Indirection:
            retval = _copyA_Indirection(from);
index b9cc7b199c0f3dfac8bd2e5e1b9d4b59b61b3cd4..8a1762000c3b8f75982a710a0d79a4f903ff7ad4 100644 (file)
@@ -2377,7 +2377,7 @@ _equalAlterPolicyStmt(const AlterPolicyStmt *a, const AlterPolicyStmt *b)
 }
 
 static bool
-_equalAExpr(const A_Expr *a, const A_Expr *b)
+_equalA_Expr(const A_Expr *a, const A_Expr *b)
 {
    COMPARE_SCALAR_FIELD(kind);
    COMPARE_NODE_FIELD(name);
@@ -2407,7 +2407,7 @@ _equalParamRef(const ParamRef *a, const ParamRef *b)
 }
 
 static bool
-_equalAConst(const A_Const *a, const A_Const *b)
+_equalA_Const(const A_Const *a, const A_Const *b)
 {
    if (!equal(&a->val, &b->val))   /* hack for in-line Value field */
        return false;
@@ -2435,13 +2435,13 @@ _equalFuncCall(const FuncCall *a, const FuncCall *b)
 }
 
 static bool
-_equalAStar(const A_Star *a, const A_Star *b)
+_equalA_Star(const A_Star *a, const A_Star *b)
 {
    return true;
 }
 
 static bool
-_equalAIndices(const A_Indices *a, const A_Indices *b)
+_equalA_Indices(const A_Indices *a, const A_Indices *b)
 {
    COMPARE_SCALAR_FIELD(is_slice);
    COMPARE_NODE_FIELD(lidx);
@@ -3710,7 +3710,7 @@ equal(const void *a, const void *b)
            retval = _equalDropSubscriptionStmt(a, b);
            break;
        case T_A_Expr:
-           retval = _equalAExpr(a, b);
+           retval = _equalA_Expr(a, b);
            break;
        case T_ColumnRef:
            retval = _equalColumnRef(a, b);
@@ -3719,16 +3719,16 @@ equal(const void *a, const void *b)
            retval = _equalParamRef(a, b);
            break;
        case T_A_Const:
-           retval = _equalAConst(a, b);
+           retval = _equalA_Const(a, b);
            break;
        case T_FuncCall:
            retval = _equalFuncCall(a, b);
            break;
        case T_A_Star:
-           retval = _equalAStar(a, b);
+           retval = _equalA_Star(a, b);
            break;
        case T_A_Indices:
-           retval = _equalAIndices(a, b);
+           retval = _equalA_Indices(a, b);
            break;
        case T_A_Indirection:
            retval = _equalA_Indirection(a, b);
index c9232d83c29744c2e7a674ff094aeaa0900a45bb..48202d22320509541e80ed484a6cfae11b3f3b38 100644 (file)
@@ -3338,7 +3338,7 @@ _outTableSampleClause(StringInfo str, const TableSampleClause *node)
 }
 
 static void
-_outAExpr(StringInfo str, const A_Expr *node)
+_outA_Expr(StringInfo str, const A_Expr *node)
 {
    WRITE_NODE_TYPE("AEXPR");
 
@@ -3486,7 +3486,7 @@ _outRawStmt(StringInfo str, const RawStmt *node)
 }
 
 static void
-_outAConst(StringInfo str, const A_Const *node)
+_outA_Const(StringInfo str, const A_Const *node)
 {
    WRITE_NODE_TYPE("A_CONST");
 
@@ -4430,7 +4430,7 @@ outNode(StringInfo str, const void *obj)
                _outTableSampleClause(str, obj);
                break;
            case T_A_Expr:
-               _outAExpr(str, obj);
+               _outA_Expr(str, obj);
                break;
            case T_ColumnRef:
                _outColumnRef(str, obj);
@@ -4442,7 +4442,7 @@ outNode(StringInfo str, const void *obj)
                _outRawStmt(str, obj);
                break;
            case T_A_Const:
-               _outAConst(str, obj);
+               _outA_Const(str, obj);
                break;
            case T_A_Star:
                _outA_Star(str, obj);