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

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

commit e1cc2232aa629cf05948e28b1bca4813c812fae3
Author: John Gemignani <[email protected]>
AuthorDate: Mon Jul 3 17:42:39 2023 -0700

    Post merge corrections and modifications
    
    On branch master_PG12 modified the following files -
    
        modified:   src/backend/executor/cypher_set.c
        modified:   src/backend/parser/cypher_clause.c
        modified:   src/backend/utils/adt/agtype.c
        modified:   src/backend/utils/adt/graphid.c
        modified:   age--1.3.0.sql
        modified:   regress/expected/catalog.out
        modified:   regress/sql/catalog.sql
        modified:   src/backend/nodes/cypher_readfuncs.c
        modified:   src/include/nodes/cypher_nodes.h
    
    These files were modified from specifying PG12 to
    specifying the master. Mostly related to the CI flow -
    
        modified:   .github/workflows/installcheck.yaml
        modified:   META.json
        modified:   drivers/docker-compose.yml
        modified:   
drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java
---
 .github/workflows/installcheck.yaml                | 32 +++++++++++-----------
 META.json                                          |  8 +++---
 age--1.3.0.sql                                     |  2 --
 drivers/docker-compose.yml                         |  2 +-
 .../org/apache/age/jdbc/BaseDockerizedTest.java    |  2 +-
 regress/expected/catalog.out                       |  8 +++---
 regress/sql/catalog.sql                            |  2 +-
 src/backend/executor/cypher_set.c                  |  4 +--
 src/backend/nodes/cypher_readfuncs.c               | 14 +++++-----
 src/backend/parser/cypher_clause.c                 |  8 +++---
 src/backend/utils/adt/agtype.c                     | 24 ++++++++--------
 src/backend/utils/adt/graphid.c                    |  6 ++--
 src/include/nodes/cypher_nodes.h                   |  6 ++--
 13 files changed, 57 insertions(+), 61 deletions(-)

diff --git a/.github/workflows/installcheck.yaml 
b/.github/workflows/installcheck.yaml
index b18921f2..c35979cd 100644
--- a/.github/workflows/installcheck.yaml
+++ b/.github/workflows/installcheck.yaml
@@ -2,32 +2,32 @@ name: Build / Regression
 
 on:
   push:
-    branches: [ 'master', 'PG11' ]
+    branches: [ 'master', 'PG12' ]
   pull_request:
-    branches: [ 'master', 'PG11' ]
+    branches: [ 'master', 'PG12' ]
 
 jobs:
   build:
     runs-on: ubuntu-latest
 
     steps:
-      - name: Get latest commit id of PostgreSQL 11
+      - name: Get latest commit id of PostgreSQL 12
         run: |
-          echo "PG_COMMIT_HASH=$(git ls-remote 
git://git.postgresql.org/git/postgresql.git refs/heads/REL_11_STABLE | awk 
'{print $1}')" >> $GITHUB_ENV
+          echo "PG_COMMIT_HASH=$(git ls-remote 
git://git.postgresql.org/git/postgresql.git refs/heads/REL_12_STABLE | awk 
'{print $1}')" >> $GITHUB_ENV
 
-      - name: Cache PostgreSQL 11
+      - name: Cache PostgreSQL 12
         uses: actions/cache@v3
-        id: pg11cache
+        id: pg12cache
         with:
-          path: ~/pg11
-          key: ${{ runner.os }}-v1-pg11-${{ env.PG_COMMIT_HASH }}
+          path: ~/pg12
+          key: ${{ runner.os }}-v1-pg12-${{ env.PG_COMMIT_HASH }}
 
-      - name: Install PostgreSQL 11
-        if: steps.pg11cache.outputs.cache-hit != 'true'
+      - name: Install PostgreSQL 12
+        if: steps.pg12cache.outputs.cache-hit != 'true'
         run: |
-          git clone --depth 1 --branch REL_11_STABLE 
git://git.postgresql.org/git/postgresql.git ~/pg11source
-          cd ~/pg11source
-          ./configure --prefix=$HOME/pg11 CFLAGS="-std=gnu99 -ggdb -O0" 
--enable-cassert
+          git clone --depth 1 --branch REL_12_STABLE 
git://git.postgresql.org/git/postgresql.git ~/pg12source
+          cd ~/pg12source
+          ./configure --prefix=$HOME/pg12 CFLAGS="-std=gnu99 -ggdb -O0" 
--enable-cassert
           make install -j$(nproc) > /dev/null
 
       - uses: actions/checkout@v3
@@ -35,14 +35,14 @@ jobs:
       - name: Build
         id: build
         run: |
-          make PG_CONFIG=$HOME/pg11/bin/pg_config install -j$(nproc)
+          make PG_CONFIG=$HOME/pg12/bin/pg_config install -j$(nproc)
 
       - name: Regression tests
         id: regression_tests
         run: |
-          make PG_CONFIG=$HOME/pg11/bin/pg_config installcheck
+          make PG_CONFIG=$HOME/pg12/bin/pg_config installcheck
         continue-on-error: true
-          
+
       - name: Dump regression test errors
         if: steps.regression_tests.outcome != 'success'
         run: |
diff --git a/META.json b/META.json
index e17fda2f..96f74022 100644
--- a/META.json
+++ b/META.json
@@ -2,7 +2,7 @@
    "name": "ApacheAGE",
    "abstract": "Apache AGE is a PostgreSQL Extension that provides graph 
database functionality",
    "description": "Apache AGE is a PostgreSQL Extension that provides graph 
database functionality. AGE is an acronym for A Graph Extension, and is 
inspired by Bitnine's fork of PostgreSQL 10, AgensGraph, which is a multi-model 
database. The goal of the project is to create single storage that can handle 
both relational and graph model data so that users can use standard ANSI SQL 
along with openCypher, the Graph query language. A graph consists of a set of 
vertices (also called nodes) an [...]
-   "version": "1.1.0",
+   "version": "1.3.0",
    "maintainer": [
       "[email protected]"
    ],
@@ -10,9 +10,9 @@
    "provides": {
       "ApacheAGE": {
          "abstract": "Apache AGE is a PostgreSQL Extension that provides graph 
database functionality",
-         "file": "age--1.1.0.sql",
+         "file": "age--1.3.0.sql",
          "docfile": "README.md",
-         "version": "1.1.0"
+         "version": "1.3.0"
       }
    },
    "prereqs": {
@@ -23,7 +23,7 @@
       }
    },
    "resources": {
-      "homepage": "https://github.com/apache/age/tree/AGE_PG12.1.0_ALPHA";,
+      "homepage": "https://github.com/apache/age/tree/master";,
       "bugtracker": {
          "web": "https://github.com/apache/age/issues";
       },
diff --git a/age--1.3.0.sql b/age--1.3.0.sql
index df636544..b364ad3e 100644
--- a/age--1.3.0.sql
+++ b/age--1.3.0.sql
@@ -24,7 +24,6 @@
 -- catalog tables
 --
 
-
 CREATE TABLE ag_graph (
   graphid oid NOT NULL,
   name name NOT NULL,
@@ -48,7 +47,6 @@ CREATE DOMAIN label_id AS int NOT NULL CHECK (VALUE > 0 AND 
VALUE <= 65535);
 CREATE DOMAIN label_kind AS "char" NOT NULL CHECK (VALUE = 'v' OR VALUE = 'e');
 
 CREATE TABLE ag_label (
-
   name name NOT NULL,
   graph oid NOT NULL,
   id label_id,
diff --git a/drivers/docker-compose.yml b/drivers/docker-compose.yml
index bd9bc06c..45ab86a3 100644
--- a/drivers/docker-compose.yml
+++ b/drivers/docker-compose.yml
@@ -1,7 +1,7 @@
 version: "3.3"
 services:
   db:
-    image: apache/age:PG12_latest
+    image: apache/age:${TAG}
     environment:
       - POSTGRES_USER=postgres
       - POSTGRES_PASSWORD=agens
diff --git 
a/drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java 
b/drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java
index b743258b..2ed48a73 100644
--- a/drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java
+++ b/drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java
@@ -56,7 +56,7 @@ public class BaseDockerizedTest {
             imageTag = "latest";
         }
         agensGraphContainer = new GenericContainer<>(DockerImageName
-            .parse("apache/age:PG12_latest"))
+            .parse("apache/age:" + imageTag))
             .withEnv("POSTGRES_PASSWORD", CORRECT_DB_PASSWORDS)
             .withExposedPorts(5432);
         agensGraphContainer.start();
diff --git a/regress/expected/catalog.out b/regress/expected/catalog.out
index 44ff2959..bc7b9434 100644
--- a/regress/expected/catalog.out
+++ b/regress/expected/catalog.out
@@ -28,10 +28,10 @@ NOTICE:  graph "graph" has been created
  
 (1 row)
 
-SELECT * FROM ag_graph WHERE name = 'graph';
- graphid | name  | namespace 
----------+-------+-----------
-   17639 | graph | graph
+SELECT name, namespace FROM ag_graph WHERE name = 'graph';
+ name  | namespace 
+-------+-----------
+ graph | graph
 (1 row)
 
 -- create a label to test drop_label()
diff --git a/regress/sql/catalog.sql b/regress/sql/catalog.sql
index 5ae04fcc..96c63e47 100644
--- a/regress/sql/catalog.sql
+++ b/regress/sql/catalog.sql
@@ -25,7 +25,7 @@ SET search_path TO ag_catalog;
 --
 
 SELECT create_graph('graph');
-SELECT * FROM ag_graph WHERE name = 'graph';
+SELECT name, namespace FROM ag_graph WHERE name = 'graph';
 
 -- create a label to test drop_label()
 SELECT * FROM cypher('graph', $$CREATE (:l)$$) AS r(a agtype);
diff --git a/src/backend/executor/cypher_set.c 
b/src/backend/executor/cypher_set.c
index 29c5fad2..7a8ec9b3 100644
--- a/src/backend/executor/cypher_set.c
+++ b/src/backend/executor/cypher_set.c
@@ -139,9 +139,7 @@ static HeapTuple update_entity_tuple(ResultRelInfo 
*resultRelInfo,
 
         result = table_tuple_update(resultRelInfo->ri_RelationDesc,
                                     &tuple->t_self, elemTupleSlot,
-                                    cid,
-                                    //estate->es_output_cid,
-                                    estate->es_snapshot,// NULL,
+                                    cid, estate->es_snapshot,
                                     estate->es_crosscheck_snapshot,
                                     true /* wait for commit */ ,
                                     &hufd, &lockmode, &update_indexes);
diff --git a/src/backend/nodes/cypher_readfuncs.c 
b/src/backend/nodes/cypher_readfuncs.c
index 45ecc306..89cedd57 100644
--- a/src/backend/nodes/cypher_readfuncs.c
+++ b/src/backend/nodes/cypher_readfuncs.c
@@ -186,8 +186,8 @@ void read_cypher_create_target_nodes(struct ExtensibleNode 
*node)
     READ_LOCALS(cypher_create_target_nodes);
 
     READ_NODE_FIELD(paths);
-    READ_INT_FIELD(flags);
-    READ_INT_FIELD(graph_oid);
+    READ_UINT_FIELD(flags);
+    READ_UINT_FIELD(graph_oid);
 }
 
 /*
@@ -212,7 +212,7 @@ void read_cypher_target_node(struct ExtensibleNode *node)
     READ_LOCALS(cypher_target_node);
 
     READ_CHAR_FIELD(type);
-    READ_INT_FIELD(flags);
+    READ_UINT_FIELD(flags);
     READ_ENUM_FIELD(dir, cypher_rel_dir);
     READ_NODE_FIELD(id_expr);
     READ_NODE_FIELD(id_expr_state);
@@ -236,7 +236,7 @@ void read_cypher_update_information(struct ExtensibleNode 
*node)
     READ_LOCALS(cypher_update_information);
 
     READ_NODE_FIELD(set_items);
-    READ_INT_FIELD(flags);
+    READ_UINT_FIELD(flags);
     READ_INT_FIELD(tuple_position);
     READ_STRING_FIELD(graph_name);
     READ_STRING_FIELD(clause_name);
@@ -268,9 +268,9 @@ void read_cypher_delete_information(struct ExtensibleNode 
*node)
     READ_LOCALS(cypher_delete_information);
 
     READ_NODE_FIELD(delete_items);
-    READ_INT_FIELD(flags);
+    READ_UINT_FIELD(flags);
     READ_STRING_FIELD(graph_name);
-    READ_INT_FIELD(graph_oid);
+    READ_UINT_FIELD(graph_oid);
     READ_BOOL_FIELD(detach);
 }
 
@@ -294,7 +294,7 @@ void read_cypher_merge_information(struct ExtensibleNode 
*node)
 {
     READ_LOCALS(cypher_merge_information);
 
-    READ_INT_FIELD(flags);
+    READ_UINT_FIELD(flags);
     READ_UINT_FIELD(graph_oid);
     READ_INT_FIELD(merge_function_attr);
     READ_NODE_FIELD(path);
diff --git a/src/backend/parser/cypher_clause.c 
b/src/backend/parser/cypher_clause.c
index 2fe8ee23..aaa719e2 100644
--- a/src/backend/parser/cypher_clause.c
+++ b/src/backend/parser/cypher_clause.c
@@ -279,15 +279,15 @@ static cypher_target_node 
*get_referenced_variable(ParseState *pstate,
 
 //call...[yield]
 static Query *transform_cypher_call_stmt(cypher_parsestate *cpstate,
-                                      cypher_clause *clause);
+                                         cypher_clause *clause);
 static Query *transform_cypher_call_subquery(cypher_parsestate *cpstate,
-                                          cypher_clause *clause);
+                                             cypher_clause *clause);
 
 //call...[yield]
 static Query *transform_cypher_call_stmt(cypher_parsestate *cpstate,
-                                      cypher_clause *clause);
+                                         cypher_clause *clause);
 static Query *transform_cypher_call_subquery(cypher_parsestate *cpstate,
-                                          cypher_clause *clause);
+                                             cypher_clause *clause);
 
 // transform
 #define PREV_CYPHER_CLAUSE_ALIAS 
AGE_DEFAULT_ALIAS_PREFIX"previous_cypher_clause"
diff --git a/src/backend/utils/adt/agtype.c b/src/backend/utils/adt/agtype.c
index fa75171a..f1ffc73e 100644
--- a/src/backend/utils/adt/agtype.c
+++ b/src/backend/utils/adt/agtype.c
@@ -163,21 +163,21 @@ static char *get_label_name(const char *graph_name, int64 
label_id);
 static float8 get_float_compatible_arg(Datum arg, Oid type, char *funcname,
                                        bool *is_null);
 static Numeric get_numeric_compatible_arg(Datum arg, Oid type, char *funcname,
-                                       bool *is_null,
-                                       enum agtype_value_type *ag_type);
+                                          bool *is_null,
+                                          enum agtype_value_type *ag_type);
 agtype *get_one_agtype_from_variadic_args(FunctionCallInfo fcinfo,
-                                                 int variadic_offset,
-                                                 int expected_nargs);
+                                          int variadic_offset,
+                                          int expected_nargs);
 
 static int64 get_int64_from_int_datums(Datum d, Oid type, char *funcname,
                                        bool *is_agnull);
 
 static agtype_iterator *get_next_object_key(agtype_iterator *it,
-                                             agtype_container *agtc,
-                                             agtype_value *key);
+                                            agtype_container *agtc,
+                                            agtype_value *key);
 static agtype_iterator *get_next_list_element(agtype_iterator *it,
-                                             agtype_container *agtc,
-                                             agtype_value *elem);
+                                              agtype_container *agtc,
+                                              agtype_value *elem);
 static int extract_variadic_args_min(FunctionCallInfo fcinfo,
                                      int variadic_start, bool convert_unknown,
                                      Datum **args, Oid **types, bool **nulls,
@@ -195,8 +195,8 @@ Oid get_AGTYPEOID(void)
     if (g_AGTYPEOID == InvalidOid)
     {
         g_AGTYPEOID = GetSysCacheOid2(TYPENAMENSP, Anum_pg_type_oid,
-                                    CStringGetDatum("agtype"),
-                                    
ObjectIdGetDatum(ag_catalog_namespace_id()));
+                                      CStringGetDatum("agtype"),
+                                      
ObjectIdGetDatum(ag_catalog_namespace_id()));
     }
 
     return g_AGTYPEOID;
@@ -4713,8 +4713,8 @@ static char *get_label_name(const char *graph_name, int64 
label_id)
     }
 
     /* get the label name */
-    result = NameStr(*DatumGetName(
-        heap_getattr(tuple, Anum_ag_label_name, tupdesc, &column_is_null)));
+    result = NameStr(*DatumGetName(heap_getattr(tuple, Anum_ag_label_name,
+                                                tupdesc, &column_is_null)));
     /* duplicate it */
     result = strdup(result);
 
diff --git a/src/backend/utils/adt/graphid.c b/src/backend/utils/adt/graphid.c
index 89bd8e52..2060fc66 100644
--- a/src/backend/utils/adt/graphid.c
+++ b/src/backend/utils/adt/graphid.c
@@ -36,9 +36,9 @@ Oid get_GRAPHIDOID(void)
 {
     if (g_GRAPHIDOID == InvalidOid)
     {
-      g_GRAPHIDOID = GetSysCacheOid2(TYPENAMENSP, Anum_pg_type_oid,
-                                         CStringGetDatum("graphid"),
-                                         
ObjectIdGetDatum(ag_catalog_namespace_id()));
+        g_GRAPHIDOID = GetSysCacheOid2(TYPENAMENSP, Anum_pg_type_oid,
+                                       CStringGetDatum("graphid"),
+                                       
ObjectIdGetDatum(ag_catalog_namespace_id()));
     }
 
     return g_GRAPHIDOID;
diff --git a/src/include/nodes/cypher_nodes.h b/src/include/nodes/cypher_nodes.h
index b017f307..64318eb5 100644
--- a/src/include/nodes/cypher_nodes.h
+++ b/src/include/nodes/cypher_nodes.h
@@ -362,7 +362,7 @@ typedef struct cypher_update_information
 {
     ExtensibleNode extensible;
     List *set_items;
-    int flags;
+    uint32 flags;
     AttrNumber tuple_position;
     char *graph_name;
     char *clause_name;
@@ -384,7 +384,7 @@ typedef struct cypher_delete_information
 {
     ExtensibleNode extensible;
     List *delete_items;
-    int flags;
+    uint32 flags;
     char *graph_name;
     uint32 graph_oid;
     bool detach;
@@ -400,7 +400,7 @@ typedef struct cypher_delete_item
 typedef struct cypher_merge_information
 {
     ExtensibleNode extensible;
-    int flags;
+    uint32 flags;
     uint32 graph_oid;
     AttrNumber merge_function_attr;
     cypher_create_path *path;

Reply via email to