I want to drop all graphs on agensgraph with drop database.
Is there query finding all graphs?
agens=# SELECT GRAPHNAME FROM ?????;
graphname
-----------
graph1
graph2
Use AG_GRAPH table for finding all graphs.
And drop graph one by one.
agens=# SELECT GRAPHNAME FROM AG_GRAPH;
graphname
-----------
graph1
graph2
graph
(3 rows)
agens=# DROP GRAPH GRAPH CASCADE;
NOTICE: drop cascades to 4 other objects
DETAIL: drop cascades to sequence graph.ag_label_seq
drop cascades to vlabel ag_vertex
drop cascades to elabel ag_edge
drop cascades to vlabel v
DROP GRAPH
agens=# DROP GRAPH GRAPH1 CASCADE;
NOTICE: drop cascades to 5 other objects
DETAIL: drop cascades to sequence graph1.ag_label_seq
drop cascades to vlabel ag_vertex
drop cascades to elabel ag_edge
drop cascades to vlabel v
drop cascades to elabel e
DROP GRAPH
agens=# DROP GRAPH GRAPH2 CASCADE;
NOTICE: drop cascades to 5 other objects
DETAIL: drop cascades to sequence graph2.ag_label_seq
drop cascades to vlabel ag_vertex
drop cascades to elabel ag_edge
drop cascades to vlabel v
drop cascades to elabel e
DROP GRAPH
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.