You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2022/04/29 17:46:52 UTC

[GitHub] [incubator-age] jrgemignani commented on issue #152: How can i return the graph traversa as JSON using json_build_object?

jrgemignani commented on issue #152:
URL: https://github.com/apache/incubator-age/issues/152#issuecomment-1113568891

   I want to add that this function is in PostgreSQL -
   
   `psql-11.5-5432-pgsql=# select proname, prosrc from pg_proc where proname like '%json_build_object%';
         proname      |          prosrc
   -------------------+--------------------------
    json_build_object | json_build_object
    json_build_object | json_build_object_noargs
   (2 rows)
   
   psql-11.5-5432-pgsql=#
   `
   This means that it can be called as a "user defined" function. However, that means, it needs to be prefixed with the appropriate schema - pg_catalog and the inputs and outputs need to be cast appropriately. 
   
   An example of a "user defined"  - 
   
   `SELECT * from cypher('expr', $$ RETURN pg_catalog.sqrt(25::pg_float8) $$) as (result agtype);`
   


-- 
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: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org