1

I am trying to load 1,000,000 lines of data into AgensGraph. It is simple data with fake user profiles, and I named the label as "user".

However, ERROR statement popped out, and I believe it is because the word "user" is reserved as one of the reserved words of AgensGraph. When I changed the word to "person", it creates vertexes without any problem.

agraph=# LOAD FROM vlabel_user AS user CREATE (a:user=row_to_json(user)::jsonb);
ERROR:  syntax error at or near "user"
LINE 1: LOAD FROM vlabel_user AS user CREATE (a:user=row_to_json(use...

agraph=# LOAD FROM vlabel_user AS person CREATE (a:person=row_to_json(person)::jsonb);
GRAPH WRITE (INSERT VERTEX 1000000)

After I found this out, I wonder whether there are other words besides "user" that I cannot use. I couldn't find any information through the Google, so I am asking others' help.

KingKwan
  • 43
  • 6

2 Answers2

2

Right, "user" is reserved word. agensgraph is based on postgresql and supports all SQL queries available in postgresql. For this reason, all reserved words in postgresql are also reserved words in agensgraph. (The reserved words for postgresql can be found here.) If you want to use reserved words, enclose the identifier in double-quotes(e.g. : "user").

임형태
  • 21
  • 1
1

Additionaly, "MATCH" and "RETURN" are added to reserved keyword in AgensGraph for Cypher grammar.

Gitae Yun
  • 21
  • 1