Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Mark some new location fields as ParseLoc
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 16 Apr 2024 18:22:41 +0000 (20:22 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 16 Apr 2024 18:22:41 +0000 (20:22 +0200)
Some new code probably didn't see 605721f819f and continued to use
type int for parse location fields.  Fix those.

src/include/nodes/parsenodes.h
src/include/nodes/primnodes.h

index f763f790b1808511536ab1e46db35e6d4089c19b..0cab89084375662249ed71164a1d9e69721207a9 100644 (file)
@@ -1799,7 +1799,7 @@ typedef struct JsonFuncExpr
    JsonBehavior *on_error;     /* ON ERROR behavior */
    JsonWrapper wrapper;        /* array wrapper behavior (JSON_QUERY only) */
    JsonQuotes  quotes;         /* omit or keep quotes? (JSON_QUERY only) */
-   int         location;       /* token location, or -1 if unknown */
+   ParseLoc    location;       /* token location, or -1 if unknown */
 } JsonFuncExpr;
 
 /*
@@ -1813,8 +1813,8 @@ typedef struct JsonTablePathSpec
 
    Node       *string;
    char       *name;
-   int         name_location;
-   int         location;       /* location of 'string' */
+   ParseLoc    name_location;
+   ParseLoc    location;       /* location of 'string' */
 } JsonTablePathSpec;
 
 /*
@@ -1831,7 +1831,7 @@ typedef struct JsonTable
    JsonBehavior *on_error;     /* ON ERROR behavior */
    Alias      *alias;          /* table alias in FROM clause */
    bool        lateral;        /* does it have LATERAL prefix? */
-   int         location;       /* token location, or -1 if unknown */
+   ParseLoc    location;       /* token location, or -1 if unknown */
 } JsonTable;
 
 /*
@@ -1864,7 +1864,7 @@ typedef struct JsonTableColumn
    List       *columns;        /* nested columns */
    JsonBehavior *on_empty;     /* ON EMPTY behavior */
    JsonBehavior *on_error;     /* ON ERROR behavior */
-   int         location;       /* token location, or -1 if unknown */
+   ParseLoc    location;       /* token location, or -1 if unknown */
 } JsonTableColumn;
 
 /*
index dafe93a4c95501c4c19262a3296755bb23251fc3..6b0172f4275925c15dbc15bb32ed615091d8df27 100644 (file)
@@ -1756,7 +1756,7 @@ typedef struct JsonBehavior
    JsonBehaviorType btype;
    Node       *expr;
    bool        coerce;
-   int         location;       /* token location, or -1 if unknown */
+   ParseLoc    location;       /* token location, or -1 if unknown */
 } JsonBehavior;
 
 /*
@@ -1825,7 +1825,7 @@ typedef struct JsonExpr
    Oid         collation;
 
    /* Original JsonFuncExpr's location */
-   int         location;
+   ParseLoc    location;
 } JsonExpr;
 
 /*