bitnine-oss / agensgraph

AgensGraph, a transactional graph database based on PostgreSQL
http://www.agensgraph.org
Other
1.34k stars 149 forks source link

set graph path using psycopg2 #408

Closed VinACE closed 6 years ago

VinACE commented 6 years ago

cur = conn.cursor() cur.execute("MATCH (n:b) RETURN n Limit 10") Traceback (most recent call last): File "", line 1, in psycopg2.ProgrammingError: graph_path is NULL HINT: Use SET graph_path

cur.execute("SET graph_path=batch") Traceback (most recent call last): File "", line 1, in psycopg2.InternalError: current transaction is aborted, commands ignored until end of transaction block

Hi to set this in the python code to access agensgraph db

Appreciate your help

VinACE commented 6 years ago

cur.execute("SET graph_path = batch")

There has to be a space..

gtyun commented 6 years ago

This seems to be a psycopg's bug.