This is an automated email from the ASF dual-hosted git repository.

jgemignani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/age.git


The following commit(s) were added to refs/heads/master by this push:
     new f88e6d1e Master to PostgreSQL version 15 (#1123)
f88e6d1e is described below

commit f88e6d1e1fe9396e867f42560065db07f9d12f16
Author: John Gemignani <[email protected]>
AuthorDate: Fri Aug 11 15:32:28 2023 -0700

    Master to PostgreSQL version 15 (#1123)
    
    PR for moving the master branch up to PostgreSQL 15.
    
    Contains all of the latest work in the master branch in addition to
    all of the changes made to go from PostgreSQL version 14 to 15.
    
    ---------
    
    Co-authored-by: John Gemignani <[email protected]>
    Co-authored-by: Muhammad Taha Naveed <[email protected]>
    Co-authored-by: Shoaib <[email protected]>
    Co-authored-by: Panagiotis Foliadis <[email protected]>
    Co-authored-by: Matheus Farias <[email protected]>
    Co-authored-by: Mohamed Mokhtar <[email protected]>
    Co-authored-by: Hannan Aamir <[email protected]>
---
 .github/workflows/go-driver.yml       | 12 ++---
 .github/workflows/installcheck.yaml   | 30 +++++------
 .github/workflows/jdbc-driver.yaml    | 12 ++---
 .github/workflows/nodejs-driver.yaml  | 12 ++---
 .github/workflows/python-driver.yaml  | 12 ++---
 README.md                             |  2 +-
 RELEASE                               |  4 +-
 docker/Dockerfile                     |  4 +-
 docker/Dockerfile.dev                 |  2 +-
 regress/expected/expr.out             |  6 +--
 src/backend/catalog/ag_catalog.c      |  4 +-
 src/backend/commands/graph_commands.c |  4 +-
 src/backend/commands/label_commands.c | 12 ++---
 src/backend/executor/cypher_delete.c  |  4 +-
 src/backend/parser/cypher_analyze.c   |  2 +-
 src/backend/parser/cypher_clause.c    | 53 +++++++++----------
 src/backend/parser/cypher_expr.c      | 42 ++++++++++------
 src/backend/parser/cypher_gram.y      | 95 +++++++++++++++++++----------------
 src/backend/utils/adt/agtype.c        | 81 ++++++++++++++++++-----------
 src/include/nodes/cypher_nodes.h      |  2 +-
 20 files changed, 221 insertions(+), 174 deletions(-)

diff --git a/.github/workflows/go-driver.yml b/.github/workflows/go-driver.yml
index d9f69a5e..adbacc93 100644
--- a/.github/workflows/go-driver.yml
+++ b/.github/workflows/go-driver.yml
@@ -2,10 +2,10 @@ name: Go Driver Tests
 
 on:
   push:
-    branches: [ "master", "PG14" ]
+    branches: [ "master", "PG15" ]
 
   pull_request:
-    branches: [ "master", "PG14" ]
+    branches: [ "master", "PG15" ]
 
 jobs:
   build:
@@ -26,14 +26,14 @@ jobs:
         if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
           if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
             echo "TAG=latest" >> $GITHUB_ENV
-          elif [[ "$GITHUB_REF" == "refs/heads/PG14" ]]; then
-            echo "TAG=PG14_latest" >> $GITHUB_ENV
+          elif [[ "$GITHUB_REF" == "refs/heads/PG15" ]]; then
+            echo "TAG=PG15_latest" >> $GITHUB_ENV
           fi
         elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
           if [[ "$GITHUB_BASE_REF" == "master" ]]; then
             echo "TAG=latest" >> $GITHUB_ENV
-          elif [[ "$GITHUB_BASE_REF" == "PG14" ]]; then
-            echo "TAG=PG14_latest" >> $GITHUB_ENV
+          elif [[ "$GITHUB_BASE_REF" == "PG15" ]]; then
+            echo "TAG=PG15_latest" >> $GITHUB_ENV
           fi
         fi
 
diff --git a/.github/workflows/installcheck.yaml 
b/.github/workflows/installcheck.yaml
index 9e831494..3709c974 100644
--- a/.github/workflows/installcheck.yaml
+++ b/.github/workflows/installcheck.yaml
@@ -2,32 +2,32 @@ name: Build / Regression
 
 on:
   push:
-    branches: [ 'master', 'PG14' ]
+    branches: [ 'master', 'PG15' ]
   pull_request:
-    branches: [ 'master', 'PG14' ]
+    branches: [ 'master', 'PG15' ]
 
 jobs:
   build:
     runs-on: ubuntu-latest
 
     steps:
-      - name: Get latest commit id of PostgreSQL 14
+      - name: Get latest commit id of PostgreSQL 15
         run: |
-          echo "PG_COMMIT_HASH=$(git ls-remote 
git://git.postgresql.org/git/postgresql.git refs/heads/REL_14_STABLE | awk 
'{print $1}')" >> $GITHUB_ENV
+          echo "PG_COMMIT_HASH=$(git ls-remote 
git://git.postgresql.org/git/postgresql.git refs/heads/REL_15_STABLE | awk 
'{print $1}')" >> $GITHUB_ENV
 
-      - name: Cache PostgreSQL 14
+      - name: Cache PostgreSQL 15
         uses: actions/cache@v3
-        id: pg14cache
+        id: pg15cache
         with:
-          path: ~/pg14
-          key: ${{ runner.os }}-v1-pg14-${{ env.PG_COMMIT_HASH }}
+          path: ~/pg15
+          key: ${{ runner.os }}-v1-pg15-${{ env.PG_COMMIT_HASH }}
 
-      - name: Install PostgreSQL 14
-        if: steps.pg14cache.outputs.cache-hit != 'true'
+      - name: Install PostgreSQL 15
+        if: steps.pg15cache.outputs.cache-hit != 'true'
         run: |
-          git clone --depth 1 --branch REL_14_STABLE 
git://git.postgresql.org/git/postgresql.git ~/pg14source
-          cd ~/pg14source
-          ./configure --prefix=$HOME/pg14 CFLAGS="-std=gnu99 -ggdb -O0" 
--enable-cassert
+          git clone --depth 1 --branch REL_15_STABLE 
git://git.postgresql.org/git/postgresql.git ~/pg15source
+          cd ~/pg15source
+          ./configure --prefix=$HOME/pg15 CFLAGS="-std=gnu99 -ggdb -O0" 
--enable-cassert
           make install -j$(nproc) > /dev/null
 
       - uses: actions/checkout@v3
@@ -35,12 +35,12 @@ jobs:
       - name: Build
         id: build
         run: |
-          make PG_CONFIG=$HOME/pg14/bin/pg_config install -j$(nproc)
+          make PG_CONFIG=$HOME/pg15/bin/pg_config install -j$(nproc)
 
       - name: Regression tests
         id: regression_tests
         run: |
-          make PG_CONFIG=$HOME/pg14/bin/pg_config installcheck
+          make PG_CONFIG=$HOME/pg15/bin/pg_config installcheck
         continue-on-error: true
 
       - name: Dump regression test errors
diff --git a/.github/workflows/jdbc-driver.yaml 
b/.github/workflows/jdbc-driver.yaml
index 9be72f8c..7dda51a4 100644
--- a/.github/workflows/jdbc-driver.yaml
+++ b/.github/workflows/jdbc-driver.yaml
@@ -2,10 +2,10 @@ name: JDBC Driver Tests
 
 on:
   push:
-    branches: [ "master", "PG14" ]
+    branches: [ "master", "PG15" ]
 
   pull_request:
-    branches: [ "master", "PG14" ]
+    branches: [ "master", "PG15" ]
 
 jobs:
   build:
@@ -28,14 +28,14 @@ jobs:
         if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
           if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
             echo "TAG=latest" >> $GITHUB_ENV
-          elif [[ "$GITHUB_REF" == "refs/heads/PG14" ]]; then
-            echo "TAG=PG14_latest" >> $GITHUB_ENV
+          elif [[ "$GITHUB_REF" == "refs/heads/PG15" ]]; then
+            echo "TAG=PG15_latest" >> $GITHUB_ENV
           fi
         elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
           if [[ "$GITHUB_BASE_REF" == "master" ]]; then
             echo "TAG=latest" >> $GITHUB_ENV
-          elif [[ "$GITHUB_BASE_REF" == "PG14" ]]; then
-            echo "TAG=PG14_latest" >> $GITHUB_ENV
+          elif [[ "$GITHUB_BASE_REF" == "PG15" ]]; then
+            echo "TAG=PG15_latest" >> $GITHUB_ENV
           fi
         fi
 
diff --git a/.github/workflows/nodejs-driver.yaml 
b/.github/workflows/nodejs-driver.yaml
index 78303591..36356a7c 100644
--- a/.github/workflows/nodejs-driver.yaml
+++ b/.github/workflows/nodejs-driver.yaml
@@ -2,10 +2,10 @@ name: Nodejs Driver Tests
 
 on:
   push:
-    branches: [ "master", "PG14" ]
+    branches: [ "master", "PG15" ]
 
   pull_request:
-    branches: [ "master", "PG14" ]
+    branches: [ "master", "PG15" ]
 
 jobs:
   build:
@@ -23,14 +23,14 @@ jobs:
         if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
           if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
             echo "TAG=latest" >> $GITHUB_ENV
-          elif [[ "$GITHUB_REF" == "refs/heads/PG14" ]]; then
-            echo "TAG=PG14_latest" >> $GITHUB_ENV
+          elif [[ "$GITHUB_REF" == "refs/heads/PG15" ]]; then
+            echo "TAG=PG15_latest" >> $GITHUB_ENV
           fi
         elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
           if [[ "$GITHUB_BASE_REF" == "master" ]]; then
             echo "TAG=latest" >> $GITHUB_ENV
-          elif [[ "$GITHUB_BASE_REF" == "PG14" ]]; then
-            echo "TAG=PG14_latest" >> $GITHUB_ENV
+          elif [[ "$GITHUB_BASE_REF" == "PG15" ]]; then
+            echo "TAG=PG15_latest" >> $GITHUB_ENV
           fi
         fi
 
diff --git a/.github/workflows/python-driver.yaml 
b/.github/workflows/python-driver.yaml
index 2bb6206f..9a7f3559 100644
--- a/.github/workflows/python-driver.yaml
+++ b/.github/workflows/python-driver.yaml
@@ -2,10 +2,10 @@ name: Python Driver Tests
 
 on:
   push:
-    branches: [ "master", "PG14" ]
+    branches: [ "master", "PG15" ]
 
   pull_request:
-    branches: [ "master", "PG14" ]
+    branches: [ "master", "PG15" ]
 
 jobs:
   build:
@@ -23,14 +23,14 @@ jobs:
         if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
           if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
             echo "TAG=latest" >> $GITHUB_ENV
-          elif [[ "$GITHUB_REF" == "refs/heads/PG14" ]]; then
-            echo "TAG=PG14_latest" >> $GITHUB_ENV
+          elif [[ "$GITHUB_REF" == "refs/heads/PG15" ]]; then
+            echo "TAG=PG15_latest" >> $GITHUB_ENV
           fi
         elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
           if [[ "$GITHUB_BASE_REF" == "master" ]]; then
             echo "TAG=latest" >> $GITHUB_ENV
-          elif [[ "$GITHUB_BASE_REF" == "PG14" ]]; then
-            echo "TAG=PG14_latest" >> $GITHUB_ENV
+          elif [[ "$GITHUB_BASE_REF" == "PG15" ]]; then
+            echo "TAG=PG15_latest" >> $GITHUB_ENV
           fi
         fi
 
diff --git a/README.md b/README.md
index 60b3347c..821b968a 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@
   </a>
   &nbsp;
   <a href="https://www.postgresql.org/docs/14/index.html";>
-    <img src="https://img.shields.io/badge/Version-PostgreSQL 
14-00008B?labelColor=gray&style=flat&link=https://www.postgresql.org/docs/14/index.html"/>
+    <img src="https://img.shields.io/badge/Version-Postgresql 
15-00008B?labelColor=gray&style=flat&link=https://www.postgresql.org/docs/14/index.html"/>
   </a>
   &nbsp;
   <a href="https://github.com/apache/age/issues";>
diff --git a/RELEASE b/RELEASE
index 329a9307..2709a91c 100644
--- a/RELEASE
+++ b/RELEASE
@@ -15,11 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
-Release Notes for Apache AGE release 0.0.0 for PG 14
+Release Notes for Apache AGE release 0.0.0 for PG 15
 
 Apache AGE 0.0.0 - Release Notes
 
-NOTE: This is an initial release of PG14. There are no upgrade
+NOTE: This is an initial release of PG15. There are no upgrade
       scripts to this release.
 
 **************************************************************
diff --git a/docker/Dockerfile b/docker/Dockerfile
index ac9803d5..45298538 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -16,14 +16,14 @@
 # limitations under the License.
 #
 
-FROM postgres:14
+FROM postgres:15
 
 RUN apt-get update \
     && apt-get install -y --no-install-recommends --no-install-suggests \
        bison \
        build-essential \
        flex \
-       postgresql-server-dev-14 \
+       postgresql-server-dev-15 \
        locales
 
 ENV LANG=en_US.UTF-8
diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev
index 8162f5b5..8d5c0000 100644
--- a/docker/Dockerfile.dev
+++ b/docker/Dockerfile.dev
@@ -24,7 +24,7 @@ RUN apt-get install --assume-yes --no-install-recommends 
--no-install-suggests \
   bison \
   build-essential \
   flex \
-  postgresql-server-dev-14 \
+  postgresql-server-dev-15 \
   locales
 
 ENV LANG=en_US.UTF-8
diff --git a/regress/expected/expr.out b/regress/expected/expr.out
index 1cdfaddb..c4c16506 100644
--- a/regress/expected/expr.out
+++ b/regress/expected/expr.out
@@ -2917,9 +2917,9 @@ $$) AS (toFloatList agtype);
 SELECT * FROM cypher('expr', $$
     RETURN toFloatList(['1.9432', 8.6222, '9.4111212', 344.22])
 $$) AS (toFloatList agtype);
-               tofloatlist               
------------------------------------------
- [1.9432, 8.6222, 9.4111212, 344.220001]
+             tofloatlist             
+-------------------------------------
+ [1.9432, 8.6222, 9.4111212, 344.22]
 (1 row)
 
 SELECT * FROM cypher('expr', $$
diff --git a/src/backend/catalog/ag_catalog.c b/src/backend/catalog/ag_catalog.c
index f7ed249c..60a576a9 100644
--- a/src/backend/catalog/ag_catalog.c
+++ b/src/backend/catalog/ag_catalog.c
@@ -137,8 +137,8 @@ static bool is_age_drop(PlannedStmt *pstmt)
 
         if (IsA(obj, String))
         {
-            Value *val = (Value *)obj;
-            char *str = val->val.str;
+            String *val = (String *)obj;
+            char *str = val->sval;
 
             if (!pg_strcasecmp(str, "age"))
                 return true;
diff --git a/src/backend/commands/graph_commands.c 
b/src/backend/commands/graph_commands.c
index 7df40b94..2d70e65a 100644
--- a/src/backend/commands/graph_commands.c
+++ b/src/backend/commands/graph_commands.c
@@ -148,7 +148,7 @@ static Oid create_schema_for_graph(const Name graph_name)
     integer = SystemTypeName("int4");
     data_type = makeDefElem("as", (Node *)integer, -1);
     maxvalue = makeDefElem("maxvalue", (Node *)makeInteger(LABEL_ID_MAX), -1);
-    cycle = makeDefElem("cycle", (Node *)makeInteger(true), -1);
+    cycle = makeDefElem("cycle", (Node *)makeBoolean(true), -1);
     seq_stmt->options = list_make3(data_type, maxvalue, cycle);
     seq_stmt->ownerId = InvalidOid;
     seq_stmt->for_identity = false;
@@ -198,7 +198,7 @@ Datum drop_graph(PG_FUNCTION_ARGS)
 static void drop_schema_for_graph(char *graph_name_str, const bool cascade)
 {
     DropStmt *drop_stmt;
-    Value *schema_name;
+    String *schema_name;
     List *label_id_seq_name;
     DropBehavior behavior;
 
diff --git a/src/backend/commands/label_commands.c 
b/src/backend/commands/label_commands.c
index 6eb991da..b2e07870 100644
--- a/src/backend/commands/label_commands.c
+++ b/src/backend/commands/label_commands.c
@@ -516,12 +516,12 @@ static FuncCall *build_id_default_func_expr(char 
*graph_name, char *label_name,
     label_id_func_name = list_make2(makeString("ag_catalog"),
                                     makeString("_label_id"));
     graph_name_const = makeNode(A_Const);
-    graph_name_const->val.type = T_String;
-    graph_name_const->val.val.str = graph_name;
+    graph_name_const->val.sval.type = T_String;
+    graph_name_const->val.sval.sval = graph_name;
     graph_name_const->location = -1;
     label_name_const = makeNode(A_Const);
-    label_name_const->val.type = T_String;
-    label_name_const->val.val.str = label_name;
+    label_name_const->val.sval.type = T_String;
+    label_name_const->val.sval.sval = label_name;
     label_name_const->location = -1;
     label_id_func_args = list_make2(graph_name_const, label_name_const);
     label_id_func = makeFuncCall(label_id_func_name, label_id_func_args, 
COERCE_SQL_SYNTAX, -1);
@@ -530,8 +530,8 @@ static FuncCall *build_id_default_func_expr(char 
*graph_name, char *label_name,
     nextval_func_name = SystemFuncName("nextval");
     qualified_seq_name = quote_qualified_identifier(schema_name, seq_name);
     qualified_seq_name_const = makeNode(A_Const);
-    qualified_seq_name_const->val.type = T_String;
-    qualified_seq_name_const->val.val.str = qualified_seq_name;
+    qualified_seq_name_const->val.sval.type = T_String;
+    qualified_seq_name_const->val.sval.sval = qualified_seq_name;
     qualified_seq_name_const->location = -1;
     regclass_cast = makeNode(TypeCast);
     regclass_cast->typeName = SystemTypeName("regclass");
diff --git a/src/backend/executor/cypher_delete.c 
b/src/backend/executor/cypher_delete.c
index 68fafae7..795d4c0e 100644
--- a/src/backend/executor/cypher_delete.c
+++ b/src/backend/executor/cypher_delete.c
@@ -377,13 +377,13 @@ static void process_delete_list(CustomScanState *node)
         ResultRelInfo *resultRelInfo;
         HeapTuple heap_tuple;
         char *label_name;
-        Value *pos;
+        Integer *pos;
         int entity_position;
 
         item = lfirst(lc);
 
         pos = item->entity_position;
-        entity_position = pos->val.ival;
+        entity_position = pos->ival;
 
         /* skip if the entity is null */
         if (scanTupleSlot->tts_isnull[entity_position - 1])
diff --git a/src/backend/parser/cypher_analyze.c 
b/src/backend/parser/cypher_analyze.c
index cafe880d..a481b315 100644
--- a/src/backend/parser/cypher_analyze.c
+++ b/src/backend/parser/cypher_analyze.c
@@ -798,7 +798,7 @@ static Query *analyze_cypher_and_coerce(List *stmt, 
RangeTblFunction *rtfunc,
 
 
     addNSItemToQuery(pstate, pnsi, true, true, true);
-    query->targetList = expandNSItemAttrs(pstate, pnsi, 0, -1);
+    query->targetList = expandNSItemAttrs(pstate, pnsi, 0, true, -1);
 
     markTargetListOrigins(pstate, query->targetList);
 
diff --git a/src/backend/parser/cypher_clause.c 
b/src/backend/parser/cypher_clause.c
index 299f1203..ba74db06 100644
--- a/src/backend/parser/cypher_clause.c
+++ b/src/backend/parser/cypher_clause.c
@@ -1341,7 +1341,7 @@ static Query *transform_cypher_unwind(cypher_parsestate 
*cpstate,
                      errmsg("invalid value for rtindex")));
         }
 
-        query->targetList = expandNSItemAttrs(pstate, pnsi, 0, -1);
+        query->targetList = expandNSItemAttrs(pstate, pnsi, 0, true, -1);
     }
 
     target_syntax_loc = exprLocation((const Node *) self->target);
@@ -1400,7 +1400,8 @@ static List 
*transform_cypher_delete_item_list(cypher_parsestate *cpstate,
     {
         Node *expr = lfirst(lc);
         ColumnRef *col;
-        Value *val, *pos;
+        String *val;
+        Integer *pos;
         int resno;
 
         cypher_delete_item *item = make_ag_node(cypher_delete_item);
@@ -1427,13 +1428,13 @@ static List 
*transform_cypher_delete_item_list(cypher_parsestate *cpstate,
                     (errmsg_internal("unexpected Node for cypher_clause")));
         }
 
-        resno = get_target_entry_resno(query->targetList, val->val.str);
+        resno = get_target_entry_resno(query->targetList, val->sval);
         if (resno == -1)
         {
             ereport(ERROR,
                     (errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
                      errmsg("undefined reference to variable %s in DELETE 
clause",
-                            val->val.str),
+                            val->sval),
                      parser_errposition(pstate, col->location)));
         }
 
@@ -1441,7 +1442,7 @@ static List 
*transform_cypher_delete_item_list(cypher_parsestate *cpstate,
 
         pos = makeInteger(resno);
 
-        item->var_name = val->val.str;
+        item->var_name = val->sval;
         item->entity_position = pos;
 
         items = lappend(items, item);
@@ -1539,7 +1540,7 @@ cypher_update_information 
*transform_cypher_remove_item_list(
         ColumnRef *ref;
         A_Indirection *ind;
         char *variable_name, *property_name;
-        Value *property_node, *variable_node;
+        String *property_node, *variable_node;
 
         item = make_ag_node(cypher_update_item);
 
@@ -1585,7 +1586,7 @@ cypher_update_information 
*transform_cypher_remove_item_list(
 
         variable_node = linitial(ref->fields);
 
-        variable_name = variable_node->val.str;
+        variable_name = variable_node->sval;
         item->var_name = variable_name;
 
         item->entity_position = get_target_entry_resno(query->targetList,
@@ -1620,7 +1621,7 @@ cypher_update_information 
*transform_cypher_remove_item_list(
                      errmsg("REMOVE clause expects a property name"),
                      parser_errposition(pstate, set_item->location)));
         }
-        property_name = property_node->val.str;
+        property_name = property_node->sval;
         item->prop_name = property_name;
 
         info->set_items = lappend(info->set_items, item);
@@ -1648,7 +1649,7 @@ cypher_update_information *transform_cypher_set_item_list(
         ColumnRef *ref;
         A_Indirection *ind;
         char *variable_name, *property_name;
-        Value *property_node, *variable_node;
+        String *property_node, *variable_node;
         int is_entire_prop_update = 0; // true if a map is assigned to variable
 
         // LHS of set_item must be a variable or an indirection.
@@ -1748,7 +1749,7 @@ cypher_update_information *transform_cypher_set_item_list(
                          parser_errposition(pstate, set_item->location)));
             }
 
-            property_name = property_node->val.str;
+            property_name = property_node->sval;
             item->prop_name = property_name;
         }
 
@@ -1762,7 +1763,7 @@ cypher_update_information *transform_cypher_set_item_list(
                      parser_errposition(pstate, set_item->location)));
         }
 
-        variable_name = variable_node->val.str;
+        variable_name = variable_node->sval;
         item->var_name = variable_name;
 
         item->entity_position = get_target_entry_resno(query->targetList,
@@ -2330,7 +2331,7 @@ static Query 
*transform_cypher_clause_with_where(cypher_parsestate *cpstate,
          * all the variables that are introduced in the previous clause to the
          * next clause
          */
-        query->targetList = expandNSItemAttrs(pstate, pnsi, 0, -1);
+        query->targetList = expandNSItemAttrs(pstate, pnsi, 0, true, -1);
 
         markTargetListOrigins(pstate, query->targetList);
 
@@ -2611,7 +2612,7 @@ static Query 
*transform_cypher_match_pattern(cypher_parsestate *cpstate,
              * next clause
              */
             pnsi = get_namespace_item(pstate, rte);
-            query->targetList = expandNSItemAttrs(pstate, pnsi, 0, -1);
+            query->targetList = expandNSItemAttrs(pstate, pnsi, 0, true, -1);
         }
 
         transform_match_pattern(cpstate, query, self->pattern, where);
@@ -3049,7 +3050,7 @@ static FuncCall 
*prevent_duplicate_edges(cypher_parsestate *cpstate,
     List *edges = NIL;
     ListCell *lc;
     List *qualified_function_name;
-    Value *ag_catalog, *edge_fn;
+    String *ag_catalog, *edge_fn;
 
     ag_catalog = makeString("ag_catalog");
     edge_fn = makeString("_ag_enforce_edge_uniqueness");
@@ -3154,8 +3155,8 @@ static List 
*make_join_condition_for_edge(cypher_parsestate *cpstate,
     {
         Node *left_id = NULL;
         Node *right_id = NULL;
-        Value *ag_catalog = makeString("ag_catalog");
-        Value *func_name;
+        String *ag_catalog = makeString("ag_catalog");
+        String *func_name;
         List *qualified_func_name;
         List *args = NIL;
         List *quals = NIL;
@@ -3205,7 +3206,7 @@ static List 
*make_join_condition_for_edge(cypher_parsestate *cpstate,
             prev_edge->type == ENT_VLE_EDGE)
         {
             List *qualified_name, *args;
-            Value *match_qual;
+            String *match_qual;
             FuncCall *fc;
 
             match_qual = makeString("age_match_two_vle_edges");
@@ -3348,8 +3349,8 @@ static List 
*make_join_condition_for_edge(cypher_parsestate *cpstate,
 static Node *make_type_cast_to_agtype(Node *arg)
 {
     TypeCast *n = makeNode(TypeCast);
-    Value *ag_catalog = makeString("ag_catalog");
-    Value *agtype_str = makeString("agtype");
+    String *ag_catalog = makeString("ag_catalog");
+    String *agtype_str = makeString("agtype");
     List *qualified_name = list_make2(ag_catalog, agtype_str);
 
     n->arg = arg;
@@ -3366,8 +3367,8 @@ static Node *make_bool_a_const(bool state)
 {
     A_Const *n = makeNode(A_Const);
 
-    n->val.type = T_String;
-    n->val.val.str = (state ? "true" : "false");
+    n->val.sval.type = T_String;
+    n->val.sval.sval = (state ? "true" : "false");
     n->location = -1;
 
     // typecast to agtype
@@ -3416,7 +3417,7 @@ static List *join_to_entity(cypher_parsestate *cpstate,
     else if (entity->type == ENT_VLE_EDGE)
     {
         List *qualified_name, *args;
-        Value *ag_catalog, *match_qual;
+        String *ag_catalog, *match_qual;
         bool is_left_side;
         FuncCall *fc;
 
@@ -3539,12 +3540,12 @@ static A_Expr 
*filter_vertices_on_label_id(cypher_parsestate *cpstate,
                                                           cpstate->graph_oid);
     A_Const *n;
     FuncCall *fc;
-    Value *ag_catalog, *extract_label_id;
+    String *ag_catalog, *extract_label_id;
     int32 label_id = lcd->id;
 
     n = makeNode(A_Const);
-    n->val.type = T_Integer;
-    n->val.val.ival = label_id;
+    n->val.ival.type = T_Integer;
+    n->val.ival.ival = label_id;
     n->location = -1;
 
     ag_catalog = makeString("ag_catalog");
@@ -6803,7 +6804,7 @@ static void handle_prev_clause(cypher_parsestate 
*cpstate, Query *query,
     }
 
     // add all the rte's attributes to the current queries targetlist
-    query->targetList = expandNSItemAttrs(pstate, pnsi, 0, -1);
+    query->targetList = expandNSItemAttrs(pstate, pnsi, 0, true, -1);
 }
 
 ParseNamespaceItem *find_pnsi(cypher_parsestate *cpstate, char *varname)
diff --git a/src/backend/parser/cypher_expr.c b/src/backend/parser/cypher_expr.c
index a5465230..1f6c9469 100644
--- a/src/backend/parser/cypher_expr.c
+++ b/src/backend/parser/cypher_expr.c
@@ -42,7 +42,6 @@
 #include "parser/parse_relation.h"
 #include "utils/builtins.h"
 #include "utils/float.h"
-#include "utils/int8.h"
 #include "utils/lsyscache.h"
 #include "utils/syscache.h"
 
@@ -211,23 +210,27 @@ static Node *transform_A_Const(cypher_parsestate 
*cpstate, A_Const *ac)
 {
     ParseState *pstate = (ParseState *)cpstate;
     ParseCallbackState pcbstate;
-    Value *v = &ac->val;
+
     Datum d = (Datum)0;
     bool is_null = false;
     Const *c;
 
     setup_parser_errposition_callback(&pcbstate, pstate, ac->location);
-    switch (nodeTag(v))
+    switch (nodeTag(&ac->val))
     {
     case T_Integer:
-        d = integer_to_agtype((int64)intVal(v));
+        d = integer_to_agtype((int64)intVal(&ac->val));
         break;
     case T_Float:
         {
-            char *n = strVal(v);
+           char *n = ac->val.sval.sval;
+            char *endptr;
             int64 i;
+            errno = 0;
+
+            i = strtoi64(ac->val.fval.fval, &endptr, 10);
 
-            if (scanint8(n, true, &i))
+            if (errno == 0 && *endptr == '\0')
             {
                 d = integer_to_agtype(i);
             }
@@ -240,15 +243,22 @@ static Node *transform_A_Const(cypher_parsestate 
*cpstate, A_Const *ac)
         }
         break;
     case T_String:
-        d = string_to_agtype(strVal(v));
+        d = string_to_agtype(strVal(&ac->val));
         break;
-    case T_Null:
-        is_null = true;
+    case T_Boolean:
+        d = boolean_to_agtype(boolVal(&ac->val));
         break;
     default:
-        ereport(ERROR,
-                (errmsg_internal("unrecognized node type: %d", nodeTag(v))));
-        return NULL;
+        if (ac->isnull)
+        {
+           is_null = true;
+       }
+        else
+        {
+           ereport(ERROR, (errmsg_internal("unrecognized node type: %d",
+                                            nodeTag(&ac->val))));
+           return NULL;
+       }
     }
     cancel_parser_errposition_callback(&pcbstate);
 
@@ -865,7 +875,7 @@ static Node *transform_A_Indirection(cypher_parsestate 
*cpstate,
             if (!indices->lidx)
             {
                 A_Const *n = makeNode(A_Const);
-                n->val.type = T_Null;
+                n->isnull = true;
                 n->location = -1;
                 node = transform_cypher_expr_recurse(cpstate, (Node *)n);
             }
@@ -879,7 +889,7 @@ static Node *transform_A_Indirection(cypher_parsestate 
*cpstate,
             if (!indices->uidx)
             {
                 A_Const *n = makeNode(A_Const);
-                n->val.type = T_Null;
+                n->isnull = true;
                 n->location = -1;
                 node = transform_cypher_expr_recurse(cpstate, (Node *)n);
             }
@@ -1092,7 +1102,7 @@ static Node *transform_FuncCall(cypher_parsestate 
*cpstate, FuncCall *fn)
     if (list_length(fn->funcname) == 1)
     {
         /* get the name, size, and the ag name allocated */
-        char *name = ((Value*)linitial(fn->funcname))->val.str;
+        char *name = ((String*)linitial(fn->funcname))->sval;
         int pnlen = strlen(name);
         char *ag_name = palloc(pnlen + 5);
         int i;
@@ -1286,7 +1296,7 @@ static Node *transform_CaseExpr(cypher_parsestate 
*cpstate, CaseExpr
     {
         A_Const    *n = makeNode(A_Const);
 
-        n->val.type = T_Null;
+        n->isnull = true;
         n->location = -1;
         defresult = (Node *) n;
     }
diff --git a/src/backend/parser/cypher_gram.y b/src/backend/parser/cypher_gram.y
index 26908122..1b3d9d4e 100644
--- a/src/backend/parser/cypher_gram.y
+++ b/src/backend/parser/cypher_gram.y
@@ -200,7 +200,7 @@ static Node *make_not_expr(Node *expr, int location);
 
 // arithmetic operators
 static Node *do_negate(Node *n, int location);
-static void do_negate_float(Value *v);
+static void do_negate_float(Float *v);
 
 // indirection
 static Node *append_indirection(Node *expr, Node *selector);
@@ -349,7 +349,7 @@ call_stmt:
                 FuncCall *fc = (FuncCall*)$4;
                 ColumnRef *cr = (ColumnRef*)$2;
                 List *fields = cr->fields;
-                Value *string = linitial(fields);
+                String *string = linitial(fields);
 
                 /*
                  * A function can only be qualified with a single schema. So, 
we
@@ -396,7 +396,7 @@ call_stmt:
                 FuncCall *fc = (FuncCall*)$4;
                 ColumnRef *cr = (ColumnRef*)$2;
                 List *fields = cr->fields;
-                Value *string = linitial(fields);
+                String *string = linitial(fields);
 
                 /*
                  * A function can only be qualified with a single schema. So, 
we
@@ -584,7 +584,7 @@ cypher_varlen_opt:
                 A_Const    *lidx = (A_Const *) n->lidx;
                 A_Const    *uidx = (A_Const *) n->uidx;
 
-                if (lidx->val.val.ival > uidx->val.val.ival)
+                if (lidx->val.ival.ival > uidx->val.ival.ival)
                     ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR),
                                     errmsg("invalid range"),
                                     ag_scanner_errposition(@2, scanner)));
@@ -1466,7 +1466,7 @@ expr:
             {
                 ColumnRef *cr = (ColumnRef*)$3;
                 List *fields = cr->fields;
-                Value *string = linitial(fields);
+                String *string = linitial(fields);
 
                 $$ = append_indirection($1, (Node*)string);
             }
@@ -1481,7 +1481,7 @@ expr:
                 FuncCall *fc = (FuncCall*)$3;
                 ColumnRef *cr = (ColumnRef*)$1;
                 List *fields = cr->fields;
-                Value *string = linitial(fields);
+                String *string = linitial(fields);
 
                 /*
                  * A function can only be qualified with a single schema. So, 
we
@@ -1505,7 +1505,7 @@ expr:
             {
                 ColumnRef *cr = (ColumnRef*)$3;
                 List *fields = cr->fields;
-                Value *string = linitial(fields);
+                String *string = linitial(fields);
 
                 $$ = append_indirection($1, (Node*)string);
             }
@@ -1521,10 +1521,12 @@ expr:
              * supported
              */
             else
+            {
                 ereport(ERROR,
                         (errcode(ERRCODE_SYNTAX_ERROR),
                          errmsg("invalid indirection syntax"),
                          ag_scanner_errposition(@1, scanner)));
+            }
         }
     | expr TYPECAST symbolic_name
         {
@@ -1841,7 +1843,7 @@ var_name:
             ereport(ERROR,
                 (errcode(ERRCODE_SYNTAX_ERROR),
                     errmsg("%s is only for internal use", AGE_DEFAULT_PREFIX),
-                    ag_scanner_errposition(@1, scanner)));   
+                    ag_scanner_errposition(@1, scanner)));
         }
     }
     ;
@@ -2008,14 +2010,14 @@ static Node *do_negate(Node *n, int location)
         // report the constant's location as that of the '-' sign
         c->location = location;
 
-        if (c->val.type == T_Integer)
+        if (c->val.ival.type == T_Integer)
         {
-            c->val.val.ival = -c->val.val.ival;
+            c->val.ival.ival = -c->val.ival.ival;
             return n;
         }
-        else if (c->val.type == T_Float)
+        else if (c->val.fval.type == T_Float)
         {
-            do_negate_float(&c->val);
+            do_negate_float(&c->val.fval);
             return n;
         }
     }
@@ -2023,14 +2025,27 @@ static Node *do_negate(Node *n, int location)
     return (Node *)makeSimpleA_Expr(AEXPR_OP, "-", NULL, n, location);
 }
 
-static void do_negate_float(Value *v)
+static void do_negate_float(Float *v)
 {
+    char *oldval = NULL;
+
+    Assert(v != NULL);
     Assert(IsA(v, Float));
 
-    if (v->val.str[0] == '-')
-        v->val.str = v->val.str + 1; // just strip the '-'
+    oldval = v->fval;
+
+    if (*oldval == '+')
+    {
+        oldval++;
+    }
+    if (*oldval == '-')
+    {
+        v->fval = oldval+1;    /* just strip the '-' */
+    }
     else
-        v->val.str = psprintf("-%s", v->val.str);
+    {
+        v->fval = psprintf("-%s", oldval);
+    }
 }
 
 /*
@@ -2064,60 +2079,56 @@ static Node *append_indirection(Node *expr, Node 
*selector)
 
 static Node *make_int_const(int i, int location)
 {
-    A_Const *n;
+    A_Const *n = makeNode(A_Const);
 
-    n = makeNode(A_Const);
-    n->val.type = T_Integer;
-    n->val.val.ival = i;
+    n->val.ival.type = T_Integer;
+    n->val.ival.ival = i;
     n->location = location;
 
-    return (Node *)n;
+    return (Node *) n;
 }
 
 static Node *make_float_const(char *s, int location)
 {
-    A_Const *n;
+    A_Const *n = makeNode(A_Const);
 
-    n = makeNode(A_Const);
-    n->val.type = T_Float;
-    n->val.val.str = s;
+    n->val.fval.type = T_Float;
+    n->val.fval.fval = s;
     n->location = location;
 
-    return (Node *)n;
+    return (Node *) n;
 }
 
 static Node *make_string_const(char *s, int location)
 {
-    A_Const *n;
+    A_Const *n = makeNode(A_Const);
 
-    n = makeNode(A_Const);
-    n->val.type = T_String;
-    n->val.val.str = s;
+    n->val.sval.type = T_String;
+    n->val.sval.sval = s;
     n->location = location;
 
-    return (Node *)n;
+    return (Node *) n;
 }
 
 static Node *make_bool_const(bool b, int location)
 {
-    cypher_bool_const *n;
+    A_Const *n = makeNode(A_Const);
 
-    n = make_ag_node(cypher_bool_const);
-    n->boolean = b;
+    n->val.boolval.type = T_Boolean;
+    n->val.boolval.boolval = b;
     n->location = location;
 
-    return (Node *)n;
+    return (Node *) n;
 }
 
 static Node *make_null_const(int location)
 {
-    A_Const *n;
+    A_Const *n = makeNode(A_Const);
 
-    n = makeNode(A_Const);
-    n->val.type = T_Null;
+    n->isnull = true;
     n->location = location;
 
-    return (Node *)n;
+    return (Node *) n;
 }
 
 /*
@@ -2149,7 +2160,7 @@ static Node *make_function_expr(List *func_name, List 
*exprs, int location)
         char *name;
 
         /* get the name of the function */
-        name = ((Value*)linitial(func_name))->val.str;
+        name = ((String*)linitial(func_name))->sval;
 
         /*
          * Check for openCypher functions that are directly mapped to PG
@@ -2247,7 +2258,7 @@ static Node *make_set_op(SetOperation op, bool 
all_or_distinct, List *larg,
 /* check if A_Expr is a comparison expression */
 static bool is_A_Expr_a_comparison_operation(A_Expr *a)
 {
-    Value *v = NULL;
+    String *v = NULL;
     char *opr_name = NULL;
 
     /* we don't support qualified comparison operators */
@@ -2263,7 +2274,7 @@ static bool is_A_Expr_a_comparison_operation(A_Expr *a)
     Assert(v->type == T_String);
 
     /* get the string value */
-    opr_name = v->val.str;
+    opr_name = v->sval;
 
     /* verify it is a comparison operation */
     if (strcmp(opr_name, "<") == 0)
diff --git a/src/backend/utils/adt/agtype.c b/src/backend/utils/adt/agtype.c
index 815a731a..fbfae7bb 100644
--- a/src/backend/utils/adt/agtype.c
+++ b/src/backend/utils/adt/agtype.c
@@ -55,7 +55,6 @@
 #include "utils/builtins.h"
 #include "utils/float.h"
 #include "utils/fmgroids.h"
-#include "utils/int8.h"
 #include "utils/lsyscache.h"
 #include "utils/rel.h"
 #include "utils/snapmgr.h"
@@ -960,7 +959,7 @@ static void agtype_in_scalar(void *pstate, char *token,
     case AGTYPE_TOKEN_INTEGER:
         Assert(token != NULL);
         v.type = AGTV_INTEGER;
-        scanint8(token, false, &v.val.int_value);
+        v.val.int_value = pg_strtoint64(token);
         break;
     case AGTYPE_TOKEN_FLOAT:
         Assert(token != NULL);
@@ -5336,7 +5335,7 @@ Datum age_tofloat(PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1(age_tofloatlist);
 /*
- * toFloatList() converts a list of values and returns a list of floating 
point values. 
+ * toFloatList() converts a list of values and returns a list of floating 
point values.
  * If any values are not convertible to floating point they will be null in 
the list returned.
  */
 Datum age_tofloatlist(PG_FUNCTION_ARGS)
@@ -5349,7 +5348,7 @@ Datum age_tofloatlist(PG_FUNCTION_ARGS)
     int count;
     int i;
     bool is_valid = false;
-    float float_num;
+    float8 float_num;
     char buffer[64];
 
     /* check for null */
@@ -5358,17 +5357,22 @@ Datum age_tofloatlist(PG_FUNCTION_ARGS)
         PG_RETURN_NULL();
     }
     agt_arg = AG_GET_ARG_AGTYPE_P(0);
+
     /* check for an array */
     if (!AGT_ROOT_IS_ARRAY(agt_arg) || AGT_ROOT_IS_SCALAR(agt_arg))
+    {
         ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                         errmsg("toFloatList() argument must resolve to a list 
or null")));
+    }
 
     count = AGT_ROOT_COUNT(agt_arg);
 
     /* if we have an empty list or only one element in the list, return null */
     if (count == 0)
+    {
         PG_RETURN_NULL();
-    
+    }
+
     /* clear the result structure */
     MemSet(&agis_result, 0, sizeof(agtype_in_state));
 
@@ -5392,15 +5396,15 @@ Datum age_tofloatlist(PG_FUNCTION_ARGS)
             {
                 float_elem.type = AGTV_FLOAT;
                 float_elem.val.float_value = float8in_internal_null(string, 
NULL, "double precision",
-                                            string, &is_valid); 
+                                            string, &is_valid);
                 agis_result.res = push_agtype_value(&agis_result.parse_state, 
WAGT_ELEM, &float_elem);
             }
-            else 
+            else
             {
                 float_elem.type = AGTV_NULL;
                 agis_result.res = push_agtype_value(&agis_result.parse_state, 
WAGT_ELEM, &float_elem);
             }
-            
+
             break;
 
         case AGTV_FLOAT:
@@ -5413,7 +5417,7 @@ Datum age_tofloatlist(PG_FUNCTION_ARGS)
             agis_result.res = push_agtype_value(&agis_result.parse_state, 
WAGT_ELEM, &float_elem);
 
             break;
-            
+
         default:
 
             float_elem.type = AGTV_NULL;
@@ -5516,6 +5520,7 @@ Datum age_tointeger(PG_FUNCTION_ARGS)
         }
         else if (type == CSTRINGOID || type == TEXTOID)
         {
+            char *endptr;
             if (type == CSTRINGOID)
             {
                 string = DatumGetCString(arg);
@@ -5526,12 +5531,16 @@ Datum age_tointeger(PG_FUNCTION_ARGS)
             }
 
             /* convert it if it is a regular integer string */
-            is_valid = scanint8(string, true, &result);
+            result = strtoi64(string, &endptr, 10);
+
             /*
              * If it isn't an integer string, try converting it as a float
              * string.
              */
-            if (!is_valid)
+            result = float8in_internal_null(string, NULL, "double precision",
+                                            string, &is_valid);
+
+            if (*endptr != '\0')
             {
                 float8 f;
 
@@ -5542,7 +5551,7 @@ Datum age_tointeger(PG_FUNCTION_ARGS)
                  * return null.
                  */
                 if (!is_valid || isnan(f) || isinf(f) ||
-                    f < (float8)PG_INT64_MIN || f > (float8)PG_INT64_MAX)
+                    f < PG_INT64_MIN || f > (double)PG_INT64_MAX)
                 {
                     PG_RETURN_NULL();
                 }
@@ -5603,16 +5612,18 @@ Datum age_tointeger(PG_FUNCTION_ARGS)
         }
         else if (agtv_value->type == AGTV_STRING)
         {
+            char *endptr;
             /* we need a null terminated cstring */
             string = strndup(agtv_value->val.string.val,
                              agtv_value->val.string.len);
             /* convert it if it is a regular integer string */
-            is_valid = scanint8(string, true, &result);
+            result = strtoi64(string, &endptr, 10);
+
             /*
              * If it isn't an integer string, try converting it as a float
              * string.
              */
-            if (!is_valid)
+            if (*endptr != '\0')
             {
                 float8 f;
 
@@ -5653,7 +5664,7 @@ Datum age_tointeger(PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1(age_tointegerlist);
 /*
- * toIntegerList() converts a list of values and returns a list of integers 
point values. 
+ * toIntegerList() converts a list of values and returns a list of integers 
point values.
  * If any values are not convertible to integer they will be null in the list 
returned.
  */
 Datum age_tointegerlist(PG_FUNCTION_ARGS)
@@ -5677,14 +5688,18 @@ Datum age_tointegerlist(PG_FUNCTION_ARGS)
     agt_arg = AG_GET_ARG_AGTYPE_P(0);
     /* check for an array */
     if (!AGT_ROOT_IS_ARRAY(agt_arg) || AGT_ROOT_IS_SCALAR(agt_arg))
+    {
         ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                         errmsg("toIntegerList() argument must resolve to a 
list or null")));
+    }
 
     count = AGT_ROOT_COUNT(agt_arg);
 
     /* if we have an empty list or only one element in the list, return null */
     if (count == 0)
+    {
         PG_RETURN_NULL();
+    }
 
     /* clear the result structure */
     MemSet(&agis_result, 0, sizeof(agtype_in_state));
@@ -5707,13 +5722,12 @@ Datum age_tointegerlist(PG_FUNCTION_ARGS)
             string = elem->val.string.val;
             integer_elem.type = AGTV_INTEGER;
             integer_elem.val.int_value = atoi(string);
-            
+
             if (*string == '+' || *string == '-' || (*string >= '0' && *string 
<= '9'))
             {
                 is_float = 1;
                 while (*(++string))
                 {
-
                     if(!(*string >= '0' && *string <= '9'))
                     {
                         if(*string == '.' && is_float)
@@ -5726,7 +5740,7 @@ Datum age_tointegerlist(PG_FUNCTION_ARGS)
                             break;
                         }
                     }
-                }   
+                }
             }
             else
             {
@@ -5735,7 +5749,7 @@ Datum age_tointegerlist(PG_FUNCTION_ARGS)
             }
 
             agis_result.res = push_agtype_value(&agis_result.parse_state, 
WAGT_ELEM, &integer_elem);
-           
+
             break;
 
         case AGTV_FLOAT:
@@ -6199,7 +6213,7 @@ Datum age_tostring(PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1(age_tostringlist);
 /*
- * toStringList() converts a list of values and returns a list of String 
values. 
+ * toStringList() converts a list of values and returns a list of String 
values.
  * If any values are not convertible to string point they will be null in the 
list returned.
  */
 Datum age_tostringlist(PG_FUNCTION_ARGS)
@@ -6220,14 +6234,18 @@ Datum age_tostringlist(PG_FUNCTION_ARGS)
     agt_arg = AG_GET_ARG_AGTYPE_P(0);
     /* check for an array */
     if (!AGT_ROOT_IS_ARRAY(agt_arg) || AGT_ROOT_IS_SCALAR(agt_arg))
+    {
         ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                         errmsg("toStringList() argument must resolve to a list 
or null")));
+    }
 
     count = AGT_ROOT_COUNT(agt_arg);
 
     /* if we have an empty list or only one element in the list, return null */
     if (count == 0)
+    {
         PG_RETURN_NULL();
+    }
 
     /* clear the result structure */
     MemSet(&agis_result, 0, sizeof(agtype_in_state));
@@ -6251,25 +6269,28 @@ Datum age_tostringlist(PG_FUNCTION_ARGS)
             {
                 string_elem.type = AGTV_NULL;
 
-                agis_result.res = push_agtype_value(&agis_result.parse_state, 
WAGT_ELEM, &string_elem);
+                agis_result.res = push_agtype_value(&agis_result.parse_state,
+                                                    WAGT_ELEM, &string_elem);
             }
 
             string_elem.val.string.val = elem->val.string.val;
             string_elem.val.string.len = elem->val.string.len;
 
-            agis_result.res = push_agtype_value(&agis_result.parse_state, 
WAGT_ELEM, &string_elem);
+            agis_result.res = push_agtype_value(&agis_result.parse_state,
+                                                WAGT_ELEM, &string_elem);
 
             break;
 
         case AGTV_FLOAT:
-            
+
             sprintf(buffer, "%.*g", DBL_DIG, elem->val.float_value);
             string_elem.val.string.val = pstrdup(buffer);
             string_elem.val.string.len = strlen(buffer);
 
-            agis_result.res = push_agtype_value(&agis_result.parse_state, 
WAGT_ELEM, &string_elem);
+            agis_result.res = push_agtype_value(&agis_result.parse_state,
+                                                WAGT_ELEM, &string_elem);
 
-            break; 
+            break;
 
         case AGTV_INTEGER:
 
@@ -6277,19 +6298,23 @@ Datum age_tostringlist(PG_FUNCTION_ARGS)
             string_elem.val.string.val = pstrdup(buffer);
             string_elem.val.string.len = strlen(buffer);
 
-            agis_result.res = push_agtype_value(&agis_result.parse_state, 
WAGT_ELEM, &string_elem);
+            agis_result.res = push_agtype_value(&agis_result.parse_state,
+                                                WAGT_ELEM, &string_elem);
 
             break;
 
         default:
 
             string_elem.type = AGTV_NULL;
-            agis_result.res = push_agtype_value(&agis_result.parse_state, 
WAGT_ELEM, &string_elem);
+            agis_result.res = push_agtype_value(&agis_result.parse_state,
+                                                WAGT_ELEM, &string_elem);
 
             break;
         }
     }
-    agis_result.res = push_agtype_value(&agis_result.parse_state, 
WAGT_END_ARRAY, NULL);
+
+    agis_result.res = push_agtype_value(&agis_result.parse_state,
+                                        WAGT_END_ARRAY, NULL);
 
     PG_RETURN_POINTER(agtype_value_to_agtype(agis_result.res));
 }
diff --git a/src/include/nodes/cypher_nodes.h b/src/include/nodes/cypher_nodes.h
index 64318eb5..0b2f6534 100644
--- a/src/include/nodes/cypher_nodes.h
+++ b/src/include/nodes/cypher_nodes.h
@@ -393,7 +393,7 @@ typedef struct cypher_delete_information
 typedef struct cypher_delete_item
 {
     ExtensibleNode extensible;
-    Value *entity_position;
+    Integer *entity_position;
     char *var_name;
 } cypher_delete_item;
 


Reply via email to