emotionbug edited a comment on issue #202:
URL: https://github.com/apache/incubator-age/issues/202#issuecomment-1074831960


   there is a casting for the basic type. so, it can be used as follows.
   
   ```
   postgres=# SELECT create_graph('test');
   SELECT * FROM cypher('test', $$
   MATCH (n) RETURN n.name
   $$) as (i text);
   postgres=# SELECT * FROM cypher('test', $$
   CREATE (a {name: 'Alex'} )
   $$) as (i agtype);
    i
   ---
   (0 rows)
   postgres=# SELECT * FROM cypher('test', $$
   MATCH (n) RETURN n.name
   $$) as (i text);
     i
   ------
    Alex
   (1 row)
   postgres=# SELECT cypher.i, pg_typeof(cypher.i) FROM (SELECT * FROM 
cypher('test', $$
   postgres$# MATCH (n) RETURN n.name
   postgres$# $$) as (i text)) cypher;
     i   | pg_typeof
   ------+-----------
    Alex | text
   (1 row)
   postgres=# SELECT i::text, pg_typeof(i::text) FROM cypher('test', $$
   postgres$# MATCH (n) RETURN n.name
   postgres$# $$) as (i agtype);
     i   | pg_typeof
   ------+-----------
    Alex | text
   (1 row)
   ```


-- 
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]


Reply via email to