You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
there seems no way to convert a ::vertex or ::edge to a jsonb or ::text.
There is a function agetype_to_text which works only on scalar-values but not on that data types.
SELECT agtype_to_text(p) FROM cypher('graph1', $$
match (p) return p
$$) as (p agtype)
-- does not work
SELECT p::jsonb FROM cypher('graph1', $$
match (p) return p
$$) as (p agtype)
-- does neither work
Any ideas to extract at least the properties for ::vertex or ::edge from SQL?
The text was updated successfully, but these errors were encountered:
psql-16.2-5432-psql=# SELECT * FROM cypher('test', $$ match (p) return ag_catalog.agtype_out(p) $$) as (p text);
p
------------------------------------------------------------------------------
{"id": 281474976710657, "label": "", "properties": {"name": "John"}}::vertex
(1 row)
psql-16.2-5432-psql=# SELECT pg_typeof(p) FROM cypher('test', $$ match (p) return ag_catalog.agtype_out(p) $$) as (p text);
pg_typeof
-----------
text
(1 row)
psql-16.2-5432-psql=#
psql-16.2-5432-psql=# SELECT * FROM cypher('test', $$ match (p) return ag_catalog.agtype_out(properties(p)) $$) as (p text); p
------------------
{"name": "John"}
(1 row)
psql-16.2-5432-psql=# SELECT pg_typeof(p) FROM cypher('test', $$ match (p) return ag_catalog.agtype_out(properties(p)) $$) as (p text);
pg_typeof
-----------
text
(1 row)
psql-16.2-5432-psql=#
Hello,
there seems no way to convert a ::vertex or ::edge to a jsonb or ::text.
There is a function agetype_to_text which works only on scalar-values but not on that data types.
-- does not work
-- does neither work
Any ideas to extract at least the properties for ::vertex or ::edge from SQL?
The text was updated successfully, but these errors were encountered: