Remove JsonPathSpec typedef
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 4 May 2022 15:36:31 +0000 (17:36 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 4 May 2022 15:36:31 +0000 (17:36 +0200)
It doesn't seem very useful, and it's a bit in the way of the planned
node support automation.

Discussion: https://www.postgresql.org/message-id/202204191140.3wsbevfhqmu3@alvherre.pgsql

src/backend/parser/parse_jsontable.c
src/include/nodes/parsenodes.h

index 0dea7c998e6ea888360ee8128af68d04fc4fe6ce..5ee63cf57f022b10d85cf90ec80470650e87ffe9 100644 (file)
@@ -73,7 +73,7 @@ transformJsonTableColumn(JsonTableColumn *jtc, Node *contextItemExpr,
        JsonFuncExpr *jfexpr = makeNode(JsonFuncExpr);
        JsonCommon *common = makeNode(JsonCommon);
        JsonOutput *output = makeNode(JsonOutput);
-       JsonPathSpec pathspec;
+       char       *pathspec;
        JsonFormat *default_format;
 
        jfexpr->op =
index b1f81feb469e9c424cd78602c8c91168514d22a2..9a716f3794fd0ca4344db74da8fcd7ee7dd0aa96 100644 (file)
@@ -1619,12 +1619,6 @@ typedef enum JsonTableColumnType
        JTC_NESTED,
 } JsonTableColumnType;
 
-/*
- * JsonPathSpec -
- *             representation of JSON path constant
- */
-typedef char *JsonPathSpec;
-
 /*
  * JsonOutput -
  *             representation of JSON output clause (RETURNING type [FORMAT format])
@@ -1688,7 +1682,7 @@ typedef struct JsonTableColumn
        JsonTableColumnType coltype;    /* column type */
        char       *name;                               /* column name */
        TypeName   *typeName;                   /* column type name */
-       JsonPathSpec pathspec;                  /* path specification, if any */
+       char       *pathspec;                   /* path specification, if any */
        char       *pathname;                   /* path name, if any */
        JsonFormat *format;                             /* JSON format clause, if specified */
        JsonWrapper     wrapper;                        /* WRAPPER behavior for formatted columns */