If I understand this correctly, every query that is sent when using the Apache AGE extension is being parsed, analyzed, rewritten, and it eventually becomes an SQL statement that is being run in the backend process for postgres to actually execute the command.
When we use a simple match query like
SELECT * FROM cypher('graph', $$ MATCH (u) return u $$) as (u agtype);
what is the SQL statement that postgres runs to actually fetch the correct vertices?
Yes, you're right about the first part and understood it exactly as well.
However, for the second part, I think the statement for the simple query "Match (u) return u" would look something like this:
SELECT * FROM vertice_table;
Here, the vertice_table
is the name of the table in the database of PostgreSQL that contains the vertices of the graph. And Select *
will be used to fetch all the columns.