Labels in a graph represent the type of node or edge, and are an important element in expressing the schema of knowledge data stored as a graph. Adding a label is easier than adding a column to a table, but you should plan carefully and consider the impact on your application. By default, only the database user who created the graph can add new labels.
When adding nodes or edges with new labels to a graph, new tables corresponding to each label are created. To encrypt a graph, change the default tablespace to an encrypted tablespace before adding labels. The access rights for these newly created tables are inherited from the access rights for the tables for unlabeled nodes or unlabeled edges, so no additional steps are required if you want to reuse those access rights.
You can check the tablespaces in which tables corresponding to each label of the graph nodes and edges are located with the following SQL.
SELECT g2.graphname AS graphname, c.relname AS relname, c.reltablespace AS reltablespace FROM pg_class c, rag_databse-> (SELECT g.name AS graphname, l.relation AS relation FROM ag_catalog.ag_graph AS g, ag_catalog.ag_label AS l WHERE g.graphid = l.graph) AS g2 WHERE c.oid = g2.relation; graphname | relname | reltablespace ------------+------------------+--------------- new_graph | _ag_label_vertex | 0 new_graph | _ag_label_edge | 0 new_graph | x | 0 new_graph | y | 0 new_graph2 | _ag_label_vertex | 0 new_graph2 | _ag_label_edge | 0 sample | _ag_label_vertex | 80722 sample | _ag_label_edge | 80722 (8 rows)