You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by GitBox <gi...@apache.org> on 2023/01/01 15:28:18 UTC

[GitHub] [age] muhammadshoaib opened a new pull request, #469: rebased on PG13 current version

muhammadshoaib opened a new pull request, #469:
URL: https://github.com/apache/age/pull/469

   `This is an initial release for PG13 based on current version of PG12
   
   Contributor 
   - Shoaib <mu...@gmail.com> 
   - John Gemignani <jr...@gmail.com>
   - Josh Innis <Jo...@gmail.com>
   - Dehowe Feng <de...@gmail.com>
   - Eya Badal <ba...@gmail.com>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on PR #469:
URL: https://github.com/apache/age/pull/469#issuecomment-1420040527

   @muhammadshoaib It doesn't build against PG 13.9 Am I doing something wrong?
   
   ```
   gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -ggdb -O0 -fno-omit-frame-pointer -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/server -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/internal  -D_GNU_SOURCE   -c -o src/backend/parser/cypher_clause.o src/backend/parser/cypher_clause.c -MMD -MP -MF .deps/cypher_clause.Po
   src/backend/parser/cypher_clause.c: In function ‘transform_cypher_unwind’:
   src/backend/parser/cypher_clause.c:1111:9: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
            pnsi = transform_prev_cypher_clause(cpstate, clause->prev, true);
            ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘transform_cypher_return’:
   src/backend/parser/cypher_clause.c:1777:9: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
            transform_prev_cypher_clause(cpstate, clause->prev, true);
            ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘transform_cypher_clause_with_where’:
   src/backend/parser/cypher_clause.c:1960:9: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
            pnsi = transform_cypher_clause_as_subquery(cpstate, transform, clause, NULL, true);
            ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘transform_clause_for_join’:
   src/backend/parser/cypher_clause.c:2008:48: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
                                                   clause, alias, false);
                                                   ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘transform_cypher_match_pattern’:
   src/backend/parser/cypher_clause.c:2185:13: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
                pnsi = transform_prev_cypher_clause(cpstate, clause->prev, true);
                ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘transform_cypher_sub_pattern’:
   src/backend/parser/cypher_clause.c:2328:47: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
                                                  NULL, true);
                                                  ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘variable_exists’:
   src/backend/parser/cypher_clause.c:4428:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
        ParseNamespaceItem *pnsi;
        ^
   src/backend/parser/cypher_clause.c: At top level:
   src/backend/parser/cypher_clause.c:4730:1: error: conflicting types for ‘transform_cypher_clause_as_subquery’
    transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
    ^
   src/backend/parser/cypher_clause.c:280:2: note: previous declaration of ‘transform_cypher_clause_as_subquery’ was here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c:280:2: warning: ‘transform_cypher_clause_as_subquery’ used but never defined [enabled by default]
   make: *** [src/backend/parser/cypher_clause.o] Error 1
   gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -ggdb -O0 -fno-omit-frame-pointer -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/server -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/internal  -D_GNU_SOURCE   -c -o src/backend/parser/cypher_clause.o src/backend/parser/cypher_clause.c -MMD -MP -MF .deps/cypher_clause.Po
   src/backend/parser/cypher_clause.c: In function ‘transform_cypher_unwind’:
   src/backend/parser/cypher_clause.c:1111:9: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
            pnsi = transform_prev_cypher_clause(cpstate, clause->prev, true);
            ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘transform_cypher_return’:
   src/backend/parser/cypher_clause.c:1777:9: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
            transform_prev_cypher_clause(cpstate, clause->prev, true);
            ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘transform_cypher_clause_with_where’:
   src/backend/parser/cypher_clause.c:1960:9: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
            pnsi = transform_cypher_clause_as_subquery(cpstate, transform, clause, NULL, true);
            ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘transform_clause_for_join’:
   src/backend/parser/cypher_clause.c:2008:48: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
                                                   clause, alias, false);
                                                   ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘transform_cypher_match_pattern’:
   src/backend/parser/cypher_clause.c:2185:13: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
                pnsi = transform_prev_cypher_clause(cpstate, clause->prev, true);
                ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘transform_cypher_sub_pattern’:
   src/backend/parser/cypher_clause.c:2328:47: error: too many arguments to function ‘transform_cypher_clause_as_subquery’
                                                  NULL, true);
                                                  ^
   src/backend/parser/cypher_clause.c:280:2: note: declared here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c: In function ‘variable_exists’:
   src/backend/parser/cypher_clause.c:4428:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
        ParseNamespaceItem *pnsi;
        ^
   src/backend/parser/cypher_clause.c: At top level:
   src/backend/parser/cypher_clause.c:4730:1: error: conflicting types for ‘transform_cypher_clause_as_subquery’
    transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
    ^
   src/backend/parser/cypher_clause.c:280:2: note: previous declaration of ‘transform_cypher_clause_as_subquery’ was here
    *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
     ^
   src/backend/parser/cypher_clause.c:280:2: warning: ‘transform_cypher_clause_as_subquery’ used but never defined [enabled by default]
   make: *** [src/backend/parser/cypher_clause.o] Error 1
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on PR #469:
URL: https://github.com/apache/age/pull/469#issuecomment-1439031277

   @muhammadshoaib Looks good, you just need to fix this by removing the declaration -
   
   ```
   gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -ggdb -O0 -fno-omit-frame-pointer -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/server -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/internal  -D_GNU_SOURCE   -c -o src/backend/parser/cypher_clause.o src/backend/parser/cypher_clause.c -MMD -MP -MF .deps/cypher_clause.Po
   src/backend/parser/cypher_clause.c:211:14: warning: ‘makeTargetListFromRTE’ declared ‘static’ but never defined [-Wunused-function]
    static List *makeTargetListFromRTE(ParseState *pstate, RangeTblEntry *rte);
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani merged pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani merged PR #469:
URL: https://github.com/apache/age/pull/469


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on PR #469:
URL: https://github.com/apache/age/pull/469#issuecomment-1421287038

   @muhammadshoaib -
   
   All of the "needs adjustment" above, still need adjusting. Most are due to the unmodified parameters that follow a function that was modified.
   
   The build is a lot cleaner, less those two minor issues which should be straightforward to fix.
   
   Just fix those issues and it looks good to go.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on a diff in pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on code in PR #469:
URL: https://github.com/apache/age/pull/469#discussion_r1098097903


##########
src/backend/parser/cypher_clause.c:
##########
@@ -760,12 +771,12 @@ transform_cypher_union_tree(cypher_parsestate *cpstate, cypher_clause *clause,
          */
         snprintf(returnName, sizeof(returnName), "*SELECT* %d ",
                  list_length(pstate->p_rtable) + 1);
-        rte = addRangeTableEntryForSubquery(pstate,
+        pnsi = addRangeTableEntryForSubquery(pstate,
                                             returnQuery,

Review Comment:
   need adjusted



##########
src/backend/parser/cypher_clause.c:
##########
@@ -4586,8 +4616,9 @@ transform_create_cypher_new_node(cypher_parsestate *cpstate,
     // Store the relid
     rel->relid = RelationGetRelid(label_relation);
 
-    rte = addRangeTableEntryForRelation((ParseState *)cpstate, label_relation,
+    pnsi = addRangeTableEntryForRelation((ParseState *)cpstate, label_relation,
                                         AccessShareLock, NULL, false, false);

Review Comment:
   needs adjustment



##########
src/backend/parser/cypher_clause.c:
##########
@@ -5601,5 +5639,24 @@ static void handle_prev_clause(cypher_parsestate *cpstate, Query *query,
     }
 
     // add all the rte's attributes to the current queries targetlist
-    query->targetList = expandRelAttrs(pstate, rte, rtindex, 0, -1);
+    query->targetList = expandNSItemAttrs(pstate, pnsi, 0, -1);
+}
+
+ParseNamespaceItem *find_pnsi(cypher_parsestate *cpstate, char *varname)
+{
+    ParseState *pstate = (ParseState *) cpstate;
+    ListCell *lc;
+
+    foreach (lc, pstate->p_namespace)
+    {
+        ParseNamespaceItem *pnsi = (ParseNamespaceItem *)lfirst(lc);
+        Alias *alias = pnsi->p_rte->alias;
+        if (!alias)
+            continue;

Review Comment:
   needs  {}



##########
src/backend/parser/cypher_clause.c:
##########
@@ -5479,8 +5517,9 @@ transform_merge_cypher_node(cypher_parsestate *cpstate, List **target_list,
     // Store the relid
     rel->relid = RelationGetRelid(label_relation);
 
-    rte = addRangeTableEntryForRelation((ParseState *)cpstate, label_relation,
+    pnsi = addRangeTableEntryForRelation((ParseState *)cpstate, label_relation,
                                         AccessShareLock, NULL, false, false);

Review Comment:
   may need adjustment



##########
src/backend/parser/cypher_clause.c:
##########
@@ -5374,8 +5410,9 @@ transform_merge_cypher_edge(cypher_parsestate *cpstate, List **target_list,
     // Store the relid
     rel->relid = RelationGetRelid(label_relation);
 
-    rte = addRangeTableEntryForRelation((ParseState *)cpstate, label_relation,
+    pnsi = addRangeTableEntryForRelation((ParseState *)cpstate, label_relation,
                                         AccessShareLock, NULL, false, false);

Review Comment:
   may need adjustment



##########
src/backend/parser/cypher_clause.c:
##########
@@ -5601,5 +5639,24 @@ static void handle_prev_clause(cypher_parsestate *cpstate, Query *query,
     }
 
     // add all the rte's attributes to the current queries targetlist
-    query->targetList = expandRelAttrs(pstate, rte, rtindex, 0, -1);
+    query->targetList = expandNSItemAttrs(pstate, pnsi, 0, -1);
+}
+
+ParseNamespaceItem *find_pnsi(cypher_parsestate *cpstate, char *varname)
+{
+    ParseState *pstate = (ParseState *) cpstate;
+    ListCell *lc;
+
+    foreach (lc, pstate->p_namespace)
+    {
+        ParseNamespaceItem *pnsi = (ParseNamespaceItem *)lfirst(lc);
+        Alias *alias = pnsi->p_rte->alias;
+        if (!alias)
+            continue;
+
+        if (!strcmp(alias->aliasname, varname))
+            return pnsi;

Review Comment:
   needs {}



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on PR #469:
URL: https://github.com/apache/age/pull/469#issuecomment-1432222469

   @muhammadshoaib Please squash the commits, then I will merge the PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on PR #469:
URL: https://github.com/apache/age/pull/469#issuecomment-1430052981

   @muhammadshoaib There are 2 pending minor changes above and this warning message -
   
   gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -ggdb -O0 -fno-omit-frame-pointer -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/server -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/internal  -D_GNU_SOURCE   -c -o src/backend/parser/cypher_clause.o src/backend/parser/cypher_clause.c -MMD -MP -MF .deps/cypher_clause.Po
   src/backend/parser/cypher_clause.c: In function ‘variable_exists’:
   src/backend/parser/cypher_clause.c:4429:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
        ParseNamespaceItem *pnsi;
        ^
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on a diff in pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on code in PR #469:
URL: https://github.com/apache/age/pull/469#discussion_r1106075211


##########
src/backend/utils/adt/agtype_gin.c:
##########
@@ -48,7 +48,7 @@ typedef struct PathHashStack
 static Datum make_text_key(char flag, const char *str, int len);
 static Datum make_scalar_key(const agtype_value *scalar_val, bool is_key);
 
-#define MAXINT8LEN        25
+ // #define MAXINT8LEN        25

Review Comment:
   Don't comment out code, just remove it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on PR #469:
URL: https://github.com/apache/age/pull/469#issuecomment-1399130498

   @muhammadshoaib It looks like there are formatting issues in `src/backend/parser/cypher_clause.c`
   
   Otherwise, looks good.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on PR #469:
URL: https://github.com/apache/age/pull/469#issuecomment-1435149540

   @muhammadshoaib Everything builds without issue. Let's see if we can rebase/merge PG12 back into 13 to bring 13 up to 12.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on a diff in pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on code in PR #469:
URL: https://github.com/apache/age/pull/469#discussion_r1098097054


##########
src/backend/parser/cypher_clause.c:
##########
@@ -517,11 +520,14 @@ static Query *transform_cypher_union(cypher_parsestate *cpstate,
     qry->targetList = NIL;
     targetvars = NIL;
     targetnames = NIL;
-    left_tlist = list_head(leftmostQuery->targetList);
+    sortnscolumns = (ParseNamespaceColumn *)
+            palloc0(list_length(cypher_union_statement->colTypes) * sizeof(ParseNamespaceColumn));
+	sortcolindex = 0;
 
-    forthree(lct, cypher_union_statement->colTypes,
+    forfour(lct, cypher_union_statement->colTypes,
              lcm, cypher_union_statement->colTypmods,
-             lcc, cypher_union_statement->colCollations)
+             lcc, cypher_union_statement->colCollations,
+             left_tlist, leftmostQuery->targetList)

Review Comment:
   still offset too much



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on PR #469:
URL: https://github.com/apache/age/pull/469#issuecomment-1421277896

   You fixed the building of the extension, less these 2 minor issues -
   ```
   gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -ggdb -O0 -fno-omit-frame-pointer -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/server -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/internal  -D_GNU_SOURCE   -c -o src/backend/parser/cypher_clause.o src/backend/parser/cypher_clause.c -MMD -MP -MF .deps/cypher_clause.Po
   src/backend/parser/cypher_clause.c: In function ‘variable_exists’:
   src/backend/parser/cypher_clause.c:4429:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
        ParseNamespaceItem *pnsi;
        ^
   gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -ggdb -O0 -fno-omit-frame-pointer -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/server -I/home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/internal  -D_GNU_SOURCE   -c -o src/backend/utils/adt/agtype_gin.o src/backend/utils/adt/agtype_gin.c -MMD -MP -MF .deps/agtype_gin.Po
   src/backend/utils/adt/agtype_gin.c:51:0: warning: "MAXINT8LEN" redefined [enabled by default]
    #define MAXINT8LEN        25
    ^
   In file included from src/backend/utils/adt/agtype_gin.c:37:0:
   /home/jgemignani/POSTGRESQL/postgresql-13.9/psql-13.9-5432-pgsql/include/server/utils/builtins.h:22:0: note: this is the location of the previous definition
    #define MAXINT8LEN 20
    ^
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on a diff in pull request #469: Inital version PG13 current version

Posted by GitBox <gi...@apache.org>.
jrgemignani commented on code in PR #469:
URL: https://github.com/apache/age/pull/469#discussion_r1068695728


##########
drivers/golang/parser/Age.g4:
##########
@@ -79,7 +79,7 @@ BOOL
    ;
 
 NULL
-   : 'null'
+   : 'null' 
    ;

Review Comment:
   Trailing whitespace after 'null'?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on pull request #469: Inital version PG13 current version

Posted by GitBox <gi...@apache.org>.
jrgemignani commented on PR #469:
URL: https://github.com/apache/age/pull/469#issuecomment-1370160188

   @muhammadshoaib This doesn't look like it is based off of the current alpha/PG13 or PG12 branch


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] jrgemignani commented on a diff in pull request #469: Inital version PG13 current version

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on code in PR #469:
URL: https://github.com/apache/age/pull/469#discussion_r1091303539


##########
src/backend/parser/cypher_clause.c:
##########
@@ -276,7 +276,7 @@ transform_cypher_merge_mark_tuple_position(List *target_list,
 #define transform_prev_cypher_clause(cpstate, prev_clause, add_rte_to_query) \
     transform_cypher_clause_as_subquery(cpstate, transform_cypher_clause, \
                                         prev_clause, NULL, add_rte_to_query)
-static RangeTblEntry *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
+static ParseNamespaceItem *transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
                                                           transform_method transform,

Review Comment:
   needs proper indentation.



##########
src/backend/parser/cypher_clause.c:
##########
@@ -455,8 +456,10 @@ static Query *transform_cypher_union(cypher_parsestate *cpstate,
     ListCell *left_tlist, *lct, *lcm, *lcc;
     List *targetvars, *targetnames, *sv_namespace;
     int sv_rtable_length;
-    RangeTblEntry *jrte;
     int tllen;
+    ParseNamespaceItem *nsitem;
+	ParseNamespaceColumn *sortnscolumns;
+	int			sortcolindex;

Review Comment:
   Please check formatting.



##########
src/backend/parser/cypher_clause.c:
##########
@@ -302,26 +302,27 @@ static List *add_target_to_group_list(cypher_parsestate *cpstate,
                                       List *targetlist, int location);
 static void advance_transform_entities_to_next_clause(List *entities);
 
-static ParseNamespaceItem *create_namespace_item(RangeTblEntry *rte, bool p_rel_visible,
-                                             bool p_cols_visible, bool p_lateral_only,
-                                             bool p_lateral_ok);
+static ParseNamespaceItem *get_namespace_item(ParseState *pstate,
+                                                 RangeTblEntry *rte);
 static List *make_target_list_from_join(ParseState *pstate,
                                     RangeTblEntry *rte);
 static Expr *add_volatile_wrapper(Expr *node);
 static FuncExpr *make_clause_func_expr(char *function_name,
                                        Node *clause_information);
 /* for VLE support */
-static RangeTblEntry *transform_RangeFunction(cypher_parsestate *cpstate,
+static ParseNamespaceItem *transform_RangeFunction(cypher_parsestate *cpstate,
                                               RangeFunction *r);
 static Node *transform_VLE_Function(cypher_parsestate *cpstate, Node *n,
                                     RangeTblEntry **top_rte, int *top_rti,
                                     List **namespace);
-static RangeTblEntry *append_VLE_Func_to_FromClause(cypher_parsestate *cpstate,
+static ParseNamespaceItem *append_VLE_Func_to_FromClause(cypher_parsestate *cpstate,
                                                     Node *n);
 static void setNamespaceLateralState(List *namespace, bool lateral_only,
                                      bool lateral_ok);
 static bool isa_special_VLE_case(cypher_path *path);
 
+ParseNamespaceItem *find_pnsi(cypher_parsestate *cpstate, char *varname);
+

Review Comment:
   If this is static, it needs to state it. If this is external facing, it needs to be in a header file.



##########
src/backend/parser/cypher_clause.c:
##########
@@ -547,7 +553,14 @@ static Query *transform_cypher_union(cypher_parsestate *cpstate,
         qry->targetList = lappend(qry->targetList, tle);
         targetvars = lappend(targetvars, var);
         targetnames = lappend(targetnames, makeString(colName));
-        left_tlist = lnext(left_tlist);
+        sortnscolumns[sortcolindex].p_varno = leftmostRTI;
+		sortnscolumns[sortcolindex].p_varattno = lefttle->resno;

Review Comment:
   incorrect indentation.



##########
src/backend/parser/cypher_clause.c:
##########
@@ -455,8 +456,10 @@ static Query *transform_cypher_union(cypher_parsestate *cpstate,
     ListCell *left_tlist, *lct, *lcm, *lcc;
     List *targetvars, *targetnames, *sv_namespace;
     int sv_rtable_length;
-    RangeTblEntry *jrte;
     int tllen;
+    ParseNamespaceItem *nsitem;
+	ParseNamespaceColumn *sortnscolumns;

Review Comment:
   incorrect indentation.



##########
src/backend/parser/cypher_clause.c:
##########
@@ -302,26 +302,27 @@ static List *add_target_to_group_list(cypher_parsestate *cpstate,
                                       List *targetlist, int location);
 static void advance_transform_entities_to_next_clause(List *entities);
 
-static ParseNamespaceItem *create_namespace_item(RangeTblEntry *rte, bool p_rel_visible,
-                                             bool p_cols_visible, bool p_lateral_only,
-                                             bool p_lateral_ok);
+static ParseNamespaceItem *get_namespace_item(ParseState *pstate,
+                                                 RangeTblEntry *rte);

Review Comment:
   needs proper indentation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org