jihot2000 opened a new issue, #223:
URL: https://github.com/apache/incubator-age/issues/223
When I was just getting into AGE, I wrote a mixed SQL statement. It caused
the server crash. But I don't know why.
Here, I write the SQL statement into a sql file. You can execute the file
using ```psql``` command line.
```sql
CREATE SCHEMA test01;
SET search_path = test01, ag_catalog, "$user";
SELECT create_graph('mygraph');
SELECT create_vlabel('mygraph', 'node');
SELECT * FROM cypher('mygraph', $$
CREATE (:node {name: 'a'})
$$) AS (a agtype) WHERE NOT EXISTS (
SELECT * FROM cypher('mygraph', $$
MATCH (v:node {name: 'a'})
RETURN v
$$) AS (b agtype)
);
SELECT drop_graph('mygraph', true);
DROP SCHEMA test01 CASCADE;
```
The output is
```
...
psql:xx.sql:17: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
psql:xx.sql:17: fatal: connection to server was lost
...
```
Does my SQL file has an illegal SQL or OpenCypher grammar?
PS:
Now, I know MERGE clause can create an entity when it does not exist. But,
it is still difficult to write when the condition is complicated.
I've tested the sql file in PostgreSQL 11 and AGE commit id 12edd3e .
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]