You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2022/10/17 18:19:07 UTC

[GitHub] [age] susano0 opened a new issue, #334: Vertex Naming Convention/Rules

susano0 opened a new issue, #334:
URL: https://github.com/apache/age/issues/334

   I found that there is no naming convention for creating vertex labels. It's a similar issue as mentioned in #317.  
   
   I suggest the following rules:
   
   1. Label name must begin either with an alphabet or an underscore.
   2. The name can also include numbers after the first character.
   3. No spaces or other special characters except underscore should be allowed.


-- 
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: dev-unsubscribe@age.apache.org.apache.org

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


[GitHub] [age] rafsun42 commented on issue #334: Vertex Naming Convention/Rules

Posted by GitBox <gi...@apache.org>.
rafsun42 commented on issue #334:
URL: https://github.com/apache/age/issues/334#issuecomment-1289636065

   I tried Neo4j aura. It actually throws error if naming rules are not followed. However, if the name is escaped with backtick, no rules apply anymore.
   
   Same principe for database names. But graph names have additional rules. I mention them in #317.


-- 
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: dev-unsubscribe@age.apache.org

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


[GitHub] [age] jrgemignani commented on issue #334: Vertex Naming Convention/Rules

Posted by GitBox <gi...@apache.org>.
jrgemignani commented on issue #334:
URL: https://github.com/apache/age/issues/334#issuecomment-1281672837

   Thank you for opening this issue!
   
   As with all naming conventions, lets be sure to align ours with other graph databases for consistency.


-- 
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: dev-unsubscribe@age.apache.org

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


[GitHub] [age] rafsun42 commented on issue #334: Vertex Naming Convention/Rules

Posted by GitBox <gi...@apache.org>.
rafsun42 commented on issue #334:
URL: https://github.com/apache/age/issues/334#issuecomment-1288170653

   @susano0 I see you are leaning towards Neo4j's naming rules. But, it seems these rules are already implemented for vertices (and possibly edges). 
   
   When I execute the following, 
   ```pgsql 
   select * from cypher('y', $$ CREATE (n:1first) RETURN n $$) as (a agtype);
   ```
   I get this error:
   ```
   ERROR:  syntax error at or near "1"
   LINE 1: select * from cypher('y', $$ CREATE (n:1first) RETURN n $$) ...
                                                  ^
   ```
   This example violates Neo4j's 2nd naming rule that `Names should not begin with a number`. I tried violating other rules as well. AGE was able to prevent all of them. 
   
   If AGE can prevent the violations, doesn't it mean naming rules are already implemented?


-- 
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: dev-unsubscribe@age.apache.org

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


[GitHub] [age] susano0 commented on issue #334: Vertex Naming Convention/Rules

Posted by GitBox <gi...@apache.org>.
susano0 commented on issue #334:
URL: https://github.com/apache/age/issues/334#issuecomment-1288467476

   @rafsun42 No, you can create vertex and edge labels without errors if you don't use a cypher query.  So, it needs to be fixed. Please see the examples below. 
   ```
   SELECT create_vlabel('gcc1','1');
   NOTICE:  VLabel "1" has been created
   ```
   ```
   SELECT create_vlabel('gcc1','\n');
   NOTICE:  VLabel "\n" has been created
   ```
   
   


-- 
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: dev-unsubscribe@age.apache.org

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


Re: [I] Vertex Naming Convention/Rules [age]

Posted by "rafsun42 (via GitHub)" <gi...@apache.org>.
rafsun42 closed issue #334: Vertex Naming Convention/Rules
URL: https://github.com/apache/age/issues/334


-- 
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: dev-unsubscribe@age.apache.org

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


[GitHub] [age] jrgemignani commented on issue #334: Vertex Naming Convention/Rules

Posted by GitBox <gi...@apache.org>.
jrgemignani commented on issue #334:
URL: https://github.com/apache/age/issues/334#issuecomment-1289371002

   The `CREATE (n:1first)` is likely due to a grammar rule in the grammar file `src/backend/parser/cypher_gram.y`. It likely only allows identifiers in that spot.
   
   My question is, does Neo4j complain if you use `1first` as a label? They may say that you shouldn't, but still allow you to use it. I would verify that it is **explicitly** disallowed.


-- 
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: dev-unsubscribe@age.apache.org

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


[GitHub] [age] jrgemignani commented on issue #334: Vertex Naming Convention/Rules

Posted by GitBox <gi...@apache.org>.
jrgemignani commented on issue #334:
URL: https://github.com/apache/age/issues/334#issuecomment-1303838249

   I think that for all names for labels, vertices, and edges, that we need to comply with Neo4j's standards. 
   
   Additionally, I think that it is a good idea to be a bit strict with valid names due to potential security issues by allowing escaped or control characters.
   
   So, lets follow Neo4j but disallow escaped characters.


-- 
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: dev-unsubscribe@age.apache.org

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