Currently, the structure of Apache-age query is:
SELECT * FROM cypher(<graph_name>, <cypher_query>)
I am not sure how PostgreSQL is able to distinguish between regular sql queries and Cypher queries after loading age extension.
For now parsers can differentiate between cypher query and normal SQL queries by looking at cypher function in the from clause of select statement. [We are using this approach to distinguish between cypher and normal queries]
But I was concerned that if PostgreSql introduce a new function with the name "cypher" for some functionality, let's say that cypher function can be used in from-clause like we use generate_series in from-clause in the following example.
SELECT * FROM generate_series(1, 10) AS number;
Then there will be conflict in between. How can we resolve that in development?
If PostgreSQL introduces a new system function, that function will be in the system schema pg_catalog
. You can disambiguate between such a function and your function by qualifying the function name with the schema, for example
SELECT myschema.cypher(...);