Closed sleepymole closed 2 years ago
@gozssky
My understanding is it will reference the key explicitly defined in vertex table first. If the key clause is missing in vertex table, it will try to references the underlying primary key.
You're right, that's how it works.
In addition, if two vertex table use the same underlying table, at least one table name need to be aliased. In this case, do we need to use the aliased table name in edge table's definition?
Yes you would indeed need to use the alias in the edge table's definition. If no alias is specified, the alias defaults to the table name without the schema part (i.e. my_schema.my_table
translates to my_schema.my_table AS my_table
).
@oskar-van-rest I got it, thank you very much for your reply!
I'm reading PGQL 1.4 Specification. I have some questions about the
CREATE PROPERTY GRAPH
statement.In the specification, we can specify the keys in the
CREATE PROPERTY GRAPH
statement itself. An example is:I want to know which key in vertex table does the edge table
PersonOwner
's source key actually reference? My understanding is it will reference the key explicitly defined in vertex table first. If the key clause is missing in vertex table, it will try to references the underlying primary key.In addition, if two vertex table use the same underlying table, at least one table name need to be aliased. In this case, do we need to use the aliased table name in edge table's definition?