age-website icon indicating copy to clipboard operation
age-website copied to clipboard

Issues on the user defined functions query

Open rrrokhtar opened this issue 1 year ago • 0 comments

The following example is not working properly which is at https://age.apache.org/age-manual/master/functions/user_functions.html It has multiple issues:

  1. Missing ')' closing parentheses
  2. Missing typecasting
  3. Result is incorrect (sqrt(25) is 5 while the result is mentioned as 25)

Test environment:

PG: 11 AGE: 1.2.0 OS: Ubuntu 18

The output after having getting the closing parentheses fixed:

rrr=# SELECT *
rrr-# FROM cypher('test', $$
rrr$# RETURN pg_catalog.sqrt(25)
rrr$# $$) as (result agtype);
ERROR:  function pg_catalog.sqrt(agtype) does not exist
LINE 3: RETURN pg_catalog.sqrt(25)
                              ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

rrrokhtar avatar Apr 23 '23 11:04 rrrokhtar