This is an automated email from the ASF dual-hosted git repository.

jgemignani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-age.git


The following commit(s) were added to refs/heads/master by this push:
     new 46a0ac1  Refactor transform logic for functions - part 1
46a0ac1 is described below

commit 46a0ac1fbe307d90c57675c5515e819805a37c2e
Author: John Gemignani <[email protected]>
AuthorDate: Fri Oct 9 18:15:33 2020 -0700

    Refactor transform logic for functions - part 1
    
    Refactored the transform logic for functions to be more robust. The
    next part will refactor the function lookups to allow the use of
    qualified function names.
    
    All AGE openCypher functions will be represented in code as 'age_'
    plus the openCypher function name. So, for example, a function like
    toUpper() will map to age_toupper() in code. Note that the target will
    always be in lower case.  Also note that the function names for the
    transform will be case insensitive. So, toUpper(), toupper(), etc. will
    all resolve to age_toupper().
    
    Additionally, in the age--version.sql, all functions will be prefixed
    with ag_catalog to make sure they are only in the ag_catalog. So, for
    example -
    
        CREATE FUNCTION age_toupper(variadic "any")
    
    is now -
    
        CREATE FUNCTION ag_catalog.age_toupper(variadic "any")
    
    All references to these functions in age--version.sql will be qualified
    with ag_catalog. This has an added benefit of making error messages more
    precise for functions that don't exist.
    
    All current functions and the transform logic have been adjusted to
    represent these changes.
    
    All regression tests have been adjusted and verified.
    
    Also, the function names will now be passed from the parser as a
    List. This will allow passing in schemas with function names, enabling
    user defined functions in the near future.
    
    Fixed a few typos.
---
 age--0.2.0.sql                        | 291 +++++++--------
 regress/expected/agtype.out           |  64 ++--
 regress/expected/expr.out             | 648 +++++++++++++++++-----------------
 regress/sql/agtype.sql                |  24 +-
 regress/sql/expr.sql                  | 232 ++++++------
 src/backend/nodes/outfuncs.c          |   2 +-
 src/backend/parser/cypher_clause.c    |   2 +-
 src/backend/parser/cypher_expr.c      | 136 ++++---
 src/backend/parser/cypher_gram.y      |  58 ++-
 src/backend/utils/adt/agtype.c        | 299 ++++++++--------
 src/include/commands/label_commands.h |  14 +-
 src/include/nodes/cypher_nodes.h      |   2 +-
 12 files changed, 908 insertions(+), 864 deletions(-)

diff --git a/age--0.2.0.sql b/age--0.2.0.sql
index 92c9ae3..0d3f6e5 100644
--- a/age--0.2.0.sql
+++ b/age--0.2.0.sql
@@ -63,7 +63,7 @@ CREATE UNIQUE INDEX ag_label_relation_index ON ag_label USING 
btree (relation);
 -- catalog lookup functions
 --
 
-CREATE FUNCTION _label_id(graph_name name, label_name name)
+CREATE FUNCTION ag_catalog._label_id(graph_name name, label_name name)
 RETURNS label_id
 LANGUAGE c
 STABLE
@@ -74,22 +74,22 @@ AS 'MODULE_PATHNAME';
 -- utility functions
 --
 
-CREATE FUNCTION create_graph(graph_name name)
+CREATE FUNCTION ag_catalog.create_graph(graph_name name)
 RETURNS void
 LANGUAGE c
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION drop_graph(graph_name name, cascade boolean = false)
+CREATE FUNCTION ag_catalog.drop_graph(graph_name name, cascade boolean = false)
 RETURNS void
 LANGUAGE c
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION alter_graph(graph_name name, operation cstring, new_value name)
+CREATE FUNCTION ag_catalog.alter_graph(graph_name name, operation cstring, 
new_value name)
 RETURNS void
 LANGUAGE c
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION drop_label(graph_name name, label_name name,
+CREATE FUNCTION ag_catalog.drop_label(graph_name name, label_name name,
                            force boolean = false)
 RETURNS void
 LANGUAGE c
@@ -102,7 +102,7 @@ AS 'MODULE_PATHNAME';
 -- define graphid as a shell type first
 CREATE TYPE graphid;
 
-CREATE FUNCTION graphid_in(cstring)
+CREATE FUNCTION ag_catalog.graphid_in(cstring)
 RETURNS graphid
 LANGUAGE c
 STABLE
@@ -110,7 +110,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION graphid_out(graphid)
+CREATE FUNCTION ag_catalog.graphid_out(graphid)
 RETURNS cstring
 LANGUAGE c
 STABLE
@@ -119,8 +119,8 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE TYPE graphid (
-  INPUT = graphid_in,
-  OUTPUT = graphid_out,
+  INPUT = ag_catalog.graphid_in,
+  OUTPUT = ag_catalog.graphid_out,
   INTERNALLENGTH = 8,
   PASSEDBYVALUE,
   ALIGNMENT = float8,
@@ -131,7 +131,7 @@ CREATE TYPE graphid (
 -- graphid - comparison operators (=, <>, <, >, <=, >=)
 --
 
-CREATE FUNCTION graphid_eq(graphid, graphid)
+CREATE FUNCTION ag_catalog.graphid_eq(graphid, graphid)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -140,7 +140,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR = (
-  FUNCTION = graphid_eq,
+  FUNCTION = ag_catalog.graphid_eq,
   LEFTARG = graphid,
   RIGHTARG = graphid,
   COMMUTATOR = =,
@@ -149,7 +149,7 @@ CREATE OPERATOR = (
   JOIN = eqjoinsel
 );
 
-CREATE FUNCTION graphid_ne(graphid, graphid)
+CREATE FUNCTION ag_catalog.graphid_ne(graphid, graphid)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -158,7 +158,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR <> (
-  FUNCTION = graphid_ne,
+  FUNCTION = ag_catalog.graphid_ne,
   LEFTARG = graphid,
   RIGHTARG = graphid,
   COMMUTATOR = <>,
@@ -167,7 +167,7 @@ CREATE OPERATOR <> (
   JOIN = neqjoinsel
 );
 
-CREATE FUNCTION graphid_lt(graphid, graphid)
+CREATE FUNCTION ag_catalog.graphid_lt(graphid, graphid)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -176,7 +176,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR < (
-  FUNCTION = graphid_lt,
+  FUNCTION = ag_catalog.graphid_lt,
   LEFTARG = graphid,
   RIGHTARG = graphid,
   COMMUTATOR = >,
@@ -185,7 +185,7 @@ CREATE OPERATOR < (
   JOIN = scalarltjoinsel
 );
 
-CREATE FUNCTION graphid_gt(graphid, graphid)
+CREATE FUNCTION ag_catalog.graphid_gt(graphid, graphid)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -194,7 +194,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR > (
-  FUNCTION = graphid_gt,
+  FUNCTION = ag_catalog.graphid_gt,
   LEFTARG = graphid,
   RIGHTARG = graphid,
   COMMUTATOR = <,
@@ -203,7 +203,7 @@ CREATE OPERATOR > (
   JOIN = scalargtjoinsel
 );
 
-CREATE FUNCTION graphid_le(graphid, graphid)
+CREATE FUNCTION ag_catalog.graphid_le(graphid, graphid)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -212,7 +212,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR <= (
-  FUNCTION = graphid_le,
+  FUNCTION = ag_catalog.graphid_le,
   LEFTARG = graphid,
   RIGHTARG = graphid,
   COMMUTATOR = >=,
@@ -221,7 +221,7 @@ CREATE OPERATOR <= (
   JOIN = scalarlejoinsel
 );
 
-CREATE FUNCTION graphid_ge(graphid, graphid)
+CREATE FUNCTION ag_catalog.graphid_ge(graphid, graphid)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -230,7 +230,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR >= (
-  FUNCTION = graphid_ge,
+  FUNCTION = ag_catalog.graphid_ge,
   LEFTARG = graphid,
   RIGHTARG = graphid,
   COMMUTATOR = <=,
@@ -244,7 +244,7 @@ CREATE OPERATOR >= (
 --
 
 -- comparison support
-CREATE FUNCTION graphid_btree_cmp(graphid, graphid)
+CREATE FUNCTION ag_catalog.graphid_btree_cmp(graphid, graphid)
 RETURNS int
 LANGUAGE c
 STABLE
@@ -253,7 +253,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 -- sort support
-CREATE FUNCTION graphid_btree_sort(internal)
+CREATE FUNCTION ag_catalog.graphid_btree_sort(internal)
 RETURNS void
 LANGUAGE c
 STABLE
@@ -285,28 +285,28 @@ CREATE OPERATOR CLASS graphid_ops DEFAULT FOR TYPE 
graphid USING btree AS
   OPERATOR 3 =,
   OPERATOR 4 >=,
   OPERATOR 5 >,
-  FUNCTION 1 graphid_btree_cmp (graphid, graphid),
-  FUNCTION 2 graphid_btree_sort (internal);
+  FUNCTION 1 ag_catalog.graphid_btree_cmp (graphid, graphid),
+  FUNCTION 2 ag_catalog.graphid_btree_sort (internal);
 
 --
 -- graphid functions
 --
 
-CREATE FUNCTION _graphid(label_id int, entry_id bigint)
+CREATE FUNCTION ag_catalog._graphid(label_id int, entry_id bigint)
 RETURNS graphid
 LANGUAGE c
 IMMUTABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION _label_name(graph_oid oid, graphid)
+CREATE FUNCTION ag_catalog._label_name(graph_oid oid, graphid)
 RETURNS cstring
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION _extract_label_id(graphid)
+CREATE FUNCTION ag_catalog._extract_label_id(graphid)
 RETURNS label_id
 LANGUAGE c
 STABLE
@@ -320,7 +320,7 @@ AS 'MODULE_PATHNAME';
 -- define agtype as a shell type first
 CREATE TYPE agtype;
 
-CREATE FUNCTION agtype_in(cstring)
+CREATE FUNCTION ag_catalog.agtype_in(cstring)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -328,7 +328,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_out(agtype)
+CREATE FUNCTION ag_catalog.agtype_out(agtype)
 RETURNS cstring
 LANGUAGE c
 STABLE
@@ -337,8 +337,8 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE TYPE agtype (
-  INPUT = agtype_in,
-  OUTPUT = agtype_out,
+  INPUT = ag_catalog.agtype_in,
+  OUTPUT = ag_catalog.agtype_out,
   LIKE = jsonb
 );
 
@@ -346,7 +346,7 @@ CREATE TYPE agtype (
 -- agtype - mathematical operators (+, -, *, /, %, ^)
 --
 
-CREATE FUNCTION agtype_add(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_add(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -355,13 +355,13 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR + (
-  FUNCTION = agtype_add,
+  FUNCTION = ag_catalog.agtype_add,
   LEFTARG = agtype,
   RIGHTARG = agtype,
   COMMUTATOR = +
 );
 
-CREATE FUNCTION agtype_sub(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_sub(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -370,12 +370,12 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR - (
-  FUNCTION = agtype_sub,
+  FUNCTION = ag_catalog.agtype_sub,
   LEFTARG = agtype,
   RIGHTARG = agtype
 );
 
-CREATE FUNCTION agtype_neg(agtype)
+CREATE FUNCTION ag_catalog.agtype_neg(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -384,11 +384,11 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR - (
-  FUNCTION = agtype_neg,
+  FUNCTION = ag_catalog.agtype_neg,
   RIGHTARG = agtype
 );
 
-CREATE FUNCTION agtype_mul(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_mul(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -397,13 +397,13 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR * (
-  FUNCTION = agtype_mul,
+  FUNCTION = ag_catalog.agtype_mul,
   LEFTARG = agtype,
   RIGHTARG = agtype,
   COMMUTATOR = *
 );
 
-CREATE FUNCTION agtype_div(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_div(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -412,12 +412,12 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR / (
-  FUNCTION = agtype_div,
+  FUNCTION = ag_catalog.agtype_div,
   LEFTARG = agtype,
   RIGHTARG = agtype
 );
 
-CREATE FUNCTION agtype_mod(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_mod(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -426,12 +426,12 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR % (
-  FUNCTION = agtype_mod,
+  FUNCTION = ag_catalog.agtype_mod,
   LEFTARG = agtype,
   RIGHTARG = agtype
 );
 
-CREATE FUNCTION agtype_pow(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_pow(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -440,7 +440,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR ^ (
-  FUNCTION = agtype_pow,
+  FUNCTION = ag_catalog.agtype_pow,
   LEFTARG = agtype,
   RIGHTARG = agtype
 );
@@ -449,7 +449,7 @@ CREATE OPERATOR ^ (
 -- agtype - comparison operators (=, <>, <, >, <=, >=)
 --
 
-CREATE FUNCTION agtype_eq(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_eq(agtype, agtype)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -458,7 +458,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR = (
-  FUNCTION = agtype_eq,
+  FUNCTION = ag_catalog.agtype_eq,
   LEFTARG = agtype,
   RIGHTARG = agtype,
   COMMUTATOR = =,
@@ -467,7 +467,7 @@ CREATE OPERATOR = (
   JOIN = eqjoinsel
 );
 
-CREATE FUNCTION agtype_ne(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_ne(agtype, agtype)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -476,7 +476,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR <> (
-  FUNCTION = agtype_ne,
+  FUNCTION = ag_catalog.agtype_ne,
   LEFTARG = agtype,
   RIGHTARG = agtype,
   COMMUTATOR = <>,
@@ -485,7 +485,7 @@ CREATE OPERATOR <> (
   JOIN = neqjoinsel
 );
 
-CREATE FUNCTION agtype_lt(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_lt(agtype, agtype)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -494,7 +494,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR < (
-  FUNCTION = agtype_lt,
+  FUNCTION = ag_catalog.agtype_lt,
   LEFTARG = agtype,
   RIGHTARG = agtype,
   COMMUTATOR = >,
@@ -503,7 +503,7 @@ CREATE OPERATOR < (
   JOIN = scalarltjoinsel
 );
 
-CREATE FUNCTION agtype_gt(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_gt(agtype, agtype)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -512,7 +512,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR > (
-  FUNCTION = agtype_gt,
+  FUNCTION = ag_catalog.agtype_gt,
   LEFTARG = agtype,
   RIGHTARG = agtype,
   COMMUTATOR = <,
@@ -521,7 +521,7 @@ CREATE OPERATOR > (
   JOIN = scalargtjoinsel
 );
 
-CREATE FUNCTION agtype_le(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_le(agtype, agtype)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -530,7 +530,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR <= (
-  FUNCTION = agtype_le,
+  FUNCTION = ag_catalog.agtype_le,
   LEFTARG = agtype,
   RIGHTARG = agtype,
   COMMUTATOR = >=,
@@ -539,7 +539,7 @@ CREATE OPERATOR <= (
   JOIN = scalarlejoinsel
 );
 
-CREATE FUNCTION agtype_ge(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_ge(agtype, agtype)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -548,7 +548,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE OPERATOR >= (
-  FUNCTION = agtype_ge,
+  FUNCTION = ag_catalog.agtype_ge,
   LEFTARG = agtype,
   RIGHTARG = agtype,
   COMMUTATOR = <=,
@@ -557,7 +557,7 @@ CREATE OPERATOR >= (
   JOIN = scalargejoinsel
 );
 
-CREATE FUNCTION agtype_btree_cmp(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_btree_cmp(agtype, agtype)
 RETURNS INTEGER
 LANGUAGE c
 STABLE
@@ -573,9 +573,9 @@ CREATE OPERATOR CLASS agtype_ops_btree
   OPERATOR 3 =,
   OPERATOR 4 >,
   OPERATOR 5 >=,
-  FUNCTION 1 agtype_btree_cmp(agtype, agtype);
+  FUNCTION 1 ag_catalog.agtype_btree_cmp(agtype, agtype);
 
-CREATE FUNCTION agtype_hash_cmp(agtype)
+CREATE FUNCTION ag_catalog.agtype_hash_cmp(agtype)
 RETURNS INTEGER
 LANGUAGE c
 STABLE
@@ -587,12 +587,12 @@ CREATE OPERATOR CLASS agtype_ops_hash
   FOR TYPE agtype
   USING hash AS
   OPERATOR 1 =,
-  FUNCTION 1 agtype_hash_cmp(agtype);
+  FUNCTION 1 ag_catalog.agtype_hash_cmp(agtype);
 
 --
 -- graph id conversion function
 --
-CREATE FUNCTION graphid_to_agtype(graphid)
+CREATE FUNCTION ag_catalog.graphid_to_agtype(graphid)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -603,7 +603,7 @@ AS 'MODULE_PATHNAME';
 --
 -- agtype - path
 --
-CREATE FUNCTION _agtype_build_path(VARIADIC "any")
+CREATE FUNCTION ag_catalog._agtype_build_path(VARIADIC "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -614,7 +614,7 @@ AS 'MODULE_PATHNAME';
 --
 -- agtype - vertex
 --
-CREATE FUNCTION _agtype_build_vertex(graphid, cstring, agtype)
+CREATE FUNCTION ag_catalog._agtype_build_vertex(graphid, cstring, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -625,7 +625,7 @@ AS 'MODULE_PATHNAME';
 --
 -- agtype - edge
 --
-CREATE FUNCTION _agtype_build_edge(graphid, graphid, graphid, cstring, agtype)
+CREATE FUNCTION ag_catalog._agtype_build_edge(graphid, graphid, graphid, 
cstring, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -633,7 +633,7 @@ CALLED ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION _ag_enforce_edge_uniqueness(VARIADIC "any")
+CREATE FUNCTION ag_catalog._ag_enforce_edge_uniqueness(VARIADIC "any")
 RETURNS bool
 LANGUAGE c
 STABLE
@@ -644,7 +644,7 @@ as 'MODULE_PATHNAME';
 -- agtype - map literal (`{key: expr, ...}`)
 --
 
-CREATE FUNCTION agtype_build_map(VARIADIC "any")
+CREATE FUNCTION ag_catalog.agtype_build_map(VARIADIC "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -652,7 +652,7 @@ CALLED ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_build_map()
+CREATE FUNCTION ag_catalog.agtype_build_map()
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -665,7 +665,7 @@ AS 'MODULE_PATHNAME', 'agtype_build_map_noargs';
 -- functions we need. Wrap the function with this to
 -- prevent that from happening
 --
-CREATE FUNCTION agtype_volatile_wrapper(agt agtype)
+CREATE FUNCTION ag_catalog.agtype_volatile_wrapper(agt agtype)
 RETURNS agtype AS $return_value$
 BEGIN
        RETURN agt;
@@ -679,7 +679,7 @@ PARALLEL SAFE;
 -- agtype - list literal (`[expr, ...]`)
 --
 
-CREATE FUNCTION agtype_build_list(VARIADIC "any")
+CREATE FUNCTION ag_catalog.agtype_build_list(VARIADIC "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -687,7 +687,7 @@ CALLED ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_build_list()
+CREATE FUNCTION ag_catalog.agtype_build_list()
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -701,7 +701,7 @@ AS 'MODULE_PATHNAME', 'agtype_build_list_noargs';
 
 -- agtype -> boolean (implicit)
 
-CREATE FUNCTION agtype_to_bool(agtype)
+CREATE FUNCTION ag_catalog.agtype_to_bool(agtype)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -710,12 +710,12 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE CAST (agtype AS boolean)
-WITH FUNCTION agtype_to_bool(agtype)
+WITH FUNCTION ag_catalog.agtype_to_bool(agtype)
 AS IMPLICIT;
 
 -- boolean -> agtype (explicit)
 
-CREATE FUNCTION bool_to_agtype(boolean)
+CREATE FUNCTION ag_catalog.bool_to_agtype(boolean)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -724,11 +724,11 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE CAST (boolean AS agtype)
-WITH FUNCTION bool_to_agtype(boolean);
+WITH FUNCTION ag_catalog.bool_to_agtype(boolean);
 
 -- float8 -> agtype (explicit)
 
-CREATE FUNCTION float8_to_agtype(float8)
+CREATE FUNCTION ag_catalog.float8_to_agtype(float8)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -737,11 +737,11 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE CAST (float8 AS agtype)
-WITH FUNCTION float8_to_agtype(float8);
+WITH FUNCTION ag_catalog.float8_to_agtype(float8);
 
 -- agtype -> float8 (implicit)
 
-CREATE FUNCTION agtype_to_float8(agtype)
+CREATE FUNCTION ag_catalog.agtype_to_float8(agtype)
 RETURNS float8
 LANGUAGE c
 STABLE
@@ -750,7 +750,7 @@ PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
 CREATE CAST (agtype AS float8)
-WITH FUNCTION agtype_to_float8(agtype)
+WITH FUNCTION ag_catalog.agtype_to_float8(agtype)
 AS IMPLICIT;
 
 --
@@ -758,7 +758,7 @@ AS IMPLICIT;
 --
 
 -- for series of `map.key` and `container[expr]`
-CREATE FUNCTION agtype_access_operator(VARIADIC agtype[])
+CREATE FUNCTION ag_catalog.agtype_access_operator(VARIADIC agtype[])
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -766,14 +766,14 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_access_slice(agtype, agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_access_slice(agtype, agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_in_operator(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_in_operator(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -784,7 +784,7 @@ AS 'MODULE_PATHNAME';
 -- agtype - string matching (`STARTS WITH`, `ENDS WITH`, `CONTAINS`)
 --
 
-CREATE FUNCTION agtype_string_match_starts_with(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_string_match_starts_with(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -792,7 +792,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_string_match_ends_with(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_string_match_ends_with(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -800,7 +800,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_string_match_contains(agtype, agtype)
+CREATE FUNCTION ag_catalog.agtype_string_match_contains(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -814,7 +814,7 @@ AS 'MODULE_PATHNAME';
 
 -- This function is defined as a VOLATILE function to prevent the optimizer
 -- from pulling up Query's for CREATE clauses.
-CREATE FUNCTION _cypher_create_clause(internal)
+CREATE FUNCTION ag_catalog._cypher_create_clause(internal)
 RETURNS void
 LANGUAGE c
 AS 'MODULE_PATHNAME';
@@ -822,13 +822,13 @@ AS 'MODULE_PATHNAME';
 --
 -- query functions
 --
-CREATE FUNCTION cypher(graph_name name, query_string cstring,
+CREATE FUNCTION ag_catalog.cypher(graph_name name, query_string cstring,
                        params agtype = NULL)
 RETURNS SETOF record
 LANGUAGE c
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION get_cypher_keywords(OUT word text, OUT catcode "char",
+CREATE FUNCTION ag_catalog.get_cypher_keywords(OUT word text, OUT catcode 
"char",
                                     OUT catdesc text)
 RETURNS SETOF record
 LANGUAGE c
@@ -842,7 +842,7 @@ AS 'MODULE_PATHNAME';
 --
 -- Scalar Functions
 --
-CREATE FUNCTION id(agtype)
+CREATE FUNCTION ag_catalog.age_id(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -850,7 +850,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION start_id(agtype)
+CREATE FUNCTION ag_catalog.age_start_id(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -858,7 +858,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION end_id(agtype)
+CREATE FUNCTION ag_catalog.age_end_id(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -866,7 +866,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION head(agtype)
+CREATE FUNCTION ag_catalog.age_head(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -874,7 +874,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION last(agtype)
+CREATE FUNCTION ag_catalog.age_last(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -882,7 +882,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION properties(agtype)
+CREATE FUNCTION ag_catalog.age_properties(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -890,7 +890,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION startnode(agtype, agtype)
+CREATE FUNCTION ag_catalog.age_startnode(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -898,7 +898,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION endnode(agtype, agtype)
+CREATE FUNCTION ag_catalog.age_endnode(agtype, agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -906,7 +906,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION length(agtype)
+CREATE FUNCTION ag_catalog.age_length(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -914,7 +914,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION toboolean(variadic "any")
+CREATE FUNCTION ag_catalog.age_toboolean(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -922,7 +922,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION tofloat(variadic "any")
+CREATE FUNCTION ag_catalog.age_tofloat(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -930,7 +930,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION tointeger(variadic "any")
+CREATE FUNCTION ag_catalog.age_tointeger(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -938,7 +938,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION tostring(variadic "any")
+CREATE FUNCTION ag_catalog.age_tostring(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -946,7 +946,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION size(variadic "any")
+CREATE FUNCTION ag_catalog.age_size(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -954,7 +954,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION type(agtype)
+CREATE FUNCTION ag_catalog.age_type(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -962,14 +962,14 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION exists_property(agtype)
+CREATE FUNCTION ag_catalog.age_exists(agtype)
 RETURNS boolean
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION _property_constraint_check(agtype, agtype)
+CREATE FUNCTION ag_catalog._property_constraint_check(agtype, agtype)
 RETURNS boolean
 LANGUAGE c
 STABLE
@@ -979,7 +979,7 @@ AS 'MODULE_PATHNAME';
 --
 -- String functions
 --
-CREATE FUNCTION reverse(variadic "any")
+CREATE FUNCTION ag_catalog.age_reverse(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -987,7 +987,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION touppercase(variadic "any")
+CREATE FUNCTION ag_catalog.age_toupper(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -995,7 +995,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION tolowercase(variadic "any")
+CREATE FUNCTION ag_catalog.age_tolower(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -1003,7 +1003,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION l_trim(variadic "any")
+CREATE FUNCTION ag_catalog.age_ltrim(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -1011,7 +1011,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION r_trim(variadic "any")
+CREATE FUNCTION ag_catalog.age_rtrim(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -1019,7 +1019,7 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION b_trim(variadic "any")
+CREATE FUNCTION ag_catalog.age_trim(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -1027,35 +1027,35 @@ RETURNS NULL ON NULL INPUT
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION r_substr(variadic "any")
+CREATE FUNCTION ag_catalog.age_right(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION l_substr(variadic "any")
+CREATE FUNCTION ag_catalog.age_left(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION b_substr(variadic "any")
+CREATE FUNCTION ag_catalog.age_substring(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION split(variadic "any")
+CREATE FUNCTION ag_catalog.age_split(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION replace(variadic "any")
+CREATE FUNCTION ag_catalog.age_replace(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -1065,140 +1065,147 @@ AS 'MODULE_PATHNAME';
 --
 -- Trig functions - radian input
 --
-CREATE FUNCTION r_sin(variadic "any")
+CREATE FUNCTION ag_catalog.age_sin(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION r_cos(variadic "any")
+CREATE FUNCTION ag_catalog.age_cos(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION r_tan(variadic "any")
+CREATE FUNCTION ag_catalog.age_tan(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION r_cot(variadic "any")
+CREATE FUNCTION ag_catalog.age_cot(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION r_asin(variadic "any")
+CREATE FUNCTION ag_catalog.age_asin(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION r_acos(variadic "any")
+CREATE FUNCTION ag_catalog.age_acos(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION r_atan(variadic "any")
+CREATE FUNCTION ag_catalog.age_atan(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION r_atan2(variadic "any")
+CREATE FUNCTION ag_catalog.age_atan2(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION degrees_from_radians(variadic "any")
+CREATE FUNCTION ag_catalog.age_degrees(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION radians_from_degrees(variadic "any")
+CREATE FUNCTION ag_catalog.age_radians(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION ag_round(variadic "any")
+CREATE FUNCTION ag_catalog.age_round(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION ag_ceil(variadic "any")
+CREATE FUNCTION ag_catalog.age_ceil(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION ag_floor(variadic "any")
+CREATE FUNCTION ag_catalog.age_floor(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION ag_abs(variadic "any")
+CREATE FUNCTION ag_catalog.age_abs(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION ag_sign(variadic "any")
+CREATE FUNCTION ag_catalog.age_sign(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION ag_log(variadic "any")
+CREATE FUNCTION ag_catalog.age_log(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION ag_log10(variadic "any")
+CREATE FUNCTION ag_catalog.age_log10(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION ag_e()
+CREATE FUNCTION ag_catalog.age_e()
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION ag_exp(variadic "any")
+CREATE FUNCTION ag_catalog.age_exp(variadic "any")
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION ag_sqrt(variadic "any")
+CREATE FUNCTION ag_catalog.age_sqrt(variadic "any")
+RETURNS agtype
+LANGUAGE c
+STABLE
+PARALLEL SAFE
+AS 'MODULE_PATHNAME';
+
+CREATE FUNCTION ag_catalog.age_timestamp()
 RETURNS agtype
 LANGUAGE c
 STABLE
@@ -1208,35 +1215,35 @@ AS 'MODULE_PATHNAME';
 --
 -- function for typecasting an agtype value to another agtype value
 --
-CREATE FUNCTION agtype_typecast_numeric(agtype)
+CREATE FUNCTION ag_catalog.agtype_typecast_numeric(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_typecast_float(agtype)
+CREATE FUNCTION ag_catalog.agtype_typecast_float(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_typecast_vertex(agtype)
+CREATE FUNCTION ag_catalog.agtype_typecast_vertex(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_typecast_edge(agtype)
+CREATE FUNCTION ag_catalog.agtype_typecast_edge(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
 PARALLEL SAFE
 AS 'MODULE_PATHNAME';
 
-CREATE FUNCTION agtype_typecast_path(agtype)
+CREATE FUNCTION ag_catalog.agtype_typecast_path(agtype)
 RETURNS agtype
 LANGUAGE c
 STABLE
diff --git a/regress/expected/agtype.out b/regress/expected/agtype.out
index ddb3bc9..56a840e 100644
--- a/regress/expected/agtype.out
+++ b/regress/expected/agtype.out
@@ -1308,75 +1308,75 @@ HINT:  argument 3 must be an vertex
 --
 -- id, startid, endid
 --
-SELECT id(_agtype_build_vertex('1'::graphid, $$label_name$$, 
agtype_build_map()));
- id 
-----
+SELECT age_id(_agtype_build_vertex('1'::graphid, $$label_name$$, 
agtype_build_map()));
+ age_id 
+--------
  1
 (1 row)
 
-SELECT id(_agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
+SELECT age_id(_agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
                          $$label_name$$, agtype_build_map('id', 2)));
- id 
-----
+ age_id 
+--------
  1
 (1 row)
 
-SELECT start_id(_agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
+SELECT age_start_id(_agtype_build_edge('1'::graphid, '2'::graphid, 
'3'::graphid,
                          $$label_name$$, agtype_build_map('id', 2)));
- start_id 
-----------
+ age_start_id 
+--------------
  2
 (1 row)
 
-SELECT end_id(_agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
+SELECT age_end_id(_agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
                          $$label_name$$, agtype_build_map('id', 2)));
- end_id 
---------
+ age_end_id 
+------------
  3
 (1 row)
 
-SELECT id(_agtype_build_path(
+SELECT age_id(_agtype_build_path(
        _agtype_build_vertex('2'::graphid, $$label_name$$, agtype_build_map()),
        _agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
                          $$label$$, agtype_build_map('id', 2)),
        _agtype_build_vertex('3'::graphid, $$label$$, agtype_build_map('id', 2))
 ));
 ERROR:  id() argument must be a vertex, an edge or null
-SELECT id(agtype_in('1'));
+SELECT age_id(agtype_in('1'));
 ERROR:  id() argument must be a vertex, an edge or null
-SELECT id(NULL);
- id 
-----
+SELECT age_id(NULL);
+ age_id 
+--------
  
 (1 row)
 
-SELECT start_id(NULL);
- start_id 
-----------
+SELECT age_start_id(NULL);
+ age_start_id 
+--------------
  
 (1 row)
 
-SELECT end_id(NULL);
- end_id 
---------
+SELECT age_end_id(NULL);
+ age_end_id 
+------------
  
 (1 row)
 
-SELECT id(agtype_in('null'));
- id 
-----
+SELECT age_id(agtype_in('null'));
+ age_id 
+--------
  
 (1 row)
 
-SELECT start_id(agtype_in('null'));
- start_id 
-----------
+SELECT age_start_id(agtype_in('null'));
+ age_start_id 
+--------------
  
 (1 row)
 
-SELECT end_id(agtype_in('null'));
- end_id 
---------
+SELECT age_end_id(agtype_in('null'));
+ age_end_id 
+------------
  
 (1 row)
 
diff --git a/regress/expected/expr.out b/regress/expected/expr.out
index d1e0239..fdd7293 100644
--- a/regress/expected/expr.out
+++ b/regress/expected/expr.out
@@ -1771,7 +1771,7 @@ $$) AS (toBoolean agtype);
 SELECT * FROM cypher('expr', $$
     RETURN toBoolean(1)
 $$) AS (toBoolean agtype);
-ERROR:  toBoolean() unsuppoted argument agtype 3
+ERROR:  toBoolean() unsupported argument agtype 3
 SELECT * FROM cypher('expr', $$
     RETURN toBoolean()
 $$) AS (toBoolean agtype);
@@ -1840,7 +1840,7 @@ $$) AS (toFloat agtype);
 SELECT * FROM cypher('expr', $$
     RETURN toFloat(true)
 $$) AS (toFloat agtype);
-ERROR:  toFloat() unsuppoted argument agtype 5
+ERROR:  toFloat() unsupported argument agtype 5
 SELECT * FROM cypher('expr', $$
     RETURN toFloat()
 $$) AS (toFloat agtype);
@@ -1909,7 +1909,7 @@ $$) AS (toInteger agtype);
 SELECT * FROM cypher('expr', $$
     RETURN toInteger(true)
 $$) AS (toInteger agtype);
-ERROR:  toInteger() unsuppoted argument agtype 5
+ERROR:  toInteger() unsupported argument agtype 5
 SELECT * FROM cypher('expr', $$
     RETURN toInteger()
 $$) AS (toInteger agtype);
@@ -1957,100 +1957,100 @@ LINE 1: SELECT * FROM cypher('expr', $$
 -- toString()
 --
 -- PG types
-SELECT * FROM toString(3);
- tostring 
-----------
+SELECT * FROM age_toString(3);
+ age_tostring 
+--------------
  "3"
 (1 row)
 
-SELECT * FROM toString(3.14);
- tostring 
-----------
+SELECT * FROM age_toString(3.14);
+ age_tostring 
+--------------
  "3.14"
 (1 row)
 
-SELECT * FROM toString(3.14::float);
- tostring 
-----------
+SELECT * FROM age_toString(3.14::float);
+ age_tostring 
+--------------
  "3.14"
 (1 row)
 
-SELECT * FROM toString(3.14::numeric);
- tostring 
-----------
+SELECT * FROM age_toString(3.14::numeric);
+ age_tostring 
+--------------
  "3.14"
 (1 row)
 
-SELECT * FROM toString(true);
- tostring 
-----------
+SELECT * FROM age_toString(true);
+ age_tostring 
+--------------
  "true"
 (1 row)
 
-SELECT * FROM toString(false);
- tostring 
-----------
+SELECT * FROM age_toString(false);
+ age_tostring 
+--------------
  "false"
 (1 row)
 
-SELECT * FROM toString('a string');
-  tostring  
-------------
+SELECT * FROM age_toString('a string');
+ age_tostring 
+--------------
  "a string"
 (1 row)
 
-SELECT * FROM toString('a cstring'::cstring);
-  tostring   
--------------
+SELECT * FROM age_toString('a cstring'::cstring);
+ age_tostring 
+--------------
  "a cstring"
 (1 row)
 
-SELECT * FROM toString('a text string'::text);
-    tostring     
+SELECT * FROM age_toString('a text string'::text);
+  age_tostring   
 -----------------
  "a text string"
 (1 row)
 
 -- agtypes
-SELECT * FROM toString(agtype_in('3'));
- tostring 
-----------
+SELECT * FROM age_toString(agtype_in('3'));
+ age_tostring 
+--------------
  "3"
 (1 row)
 
-SELECT * FROM toString(agtype_in('3.14'));
- tostring 
-----------
+SELECT * FROM age_toString(agtype_in('3.14'));
+ age_tostring 
+--------------
  "3.14"
 (1 row)
 
-SELECT * FROM toString(agtype_in('3.14::float'));
- tostring 
-----------
+SELECT * FROM age_toString(agtype_in('3.14::float'));
+ age_tostring 
+--------------
  "3.14"
 (1 row)
 
-SELECT * FROM toString(agtype_in('3.14::numeric'));
- tostring 
-----------
+SELECT * FROM age_toString(agtype_in('3.14::numeric'));
+ age_tostring 
+--------------
  "3.14"
 (1 row)
 
-SELECT * FROM toString(agtype_in('true'));
- tostring 
-----------
+SELECT * FROM age_toString(agtype_in('true'));
+ age_tostring 
+--------------
  "true"
 (1 row)
 
-SELECT * FROM toString(agtype_in('false'));
- tostring 
-----------
+SELECT * FROM age_toString(agtype_in('false'));
+ age_tostring 
+--------------
  "false"
 (1 row)
 
-SELECT * FROM toString(agtype_in('"a string"'));
-  tostring  
-------------
+SELECT * FROM age_toString(agtype_in('"a string"'));
+ age_tostring 
+--------------
  "a string"
 (1 row)
 
@@ -2061,22 +2061,22 @@ SELECT * FROM cypher('expr', $$ RETURN 
toString(3.14::numeric) $$) AS (results a
 (1 row)
 
 -- should return null
-SELECT * FROM toString(NULL);
- tostring 
-----------
+SELECT * FROM age_toString(NULL);
+ age_tostring 
+--------------
  
 (1 row)
 
-SELECT * FROM toString(agtype_in(null));
- tostring 
-----------
+SELECT * FROM age_toString(agtype_in(null));
+ age_tostring 
+--------------
  
 (1 row)
 
 -- should fail
-SELECT * FROM toString();
-ERROR:  function tostring() does not exist
-LINE 1: SELECT * FROM toString();
+SELECT * FROM age_toString();
+ERROR:  function age_tostring() does not exist
+LINE 1: SELECT * FROM age_toString();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
 SELECT * FROM cypher('expr', $$ RETURN toString() $$) AS (results agtype);
@@ -2094,20 +2094,20 @@ $$) AS (results agtype);
  "this is a string"
 (1 row)
 
-SELECT * FROM reverse('gnirts a si siht');
-     reverse      
-------------------
- this is a string
+SELECT * FROM age_reverse('gnirts a si siht');
+    age_reverse     
+--------------------
+ "this is a string"
 (1 row)
 
-SELECT * FROM reverse('gnirts a si siht'::text);
-     reverse      
-------------------
- this is a string
+SELECT * FROM age_reverse('gnirts a si siht'::text);
+    age_reverse     
+--------------------
+ "this is a string"
 (1 row)
 
-SELECT * FROM reverse('gnirts a si siht'::cstring);
-      reverse       
+SELECT * FROM age_reverse('gnirts a si siht'::cstring);
+    age_reverse     
 --------------------
  "this is a string"
 (1 row)
@@ -2121,9 +2121,9 @@ $$) AS (results agtype);
  
 (1 row)
 
-SELECT * FROM reverse(null);
- reverse 
----------
+SELECT * FROM age_reverse(null);
+ age_reverse 
+-------------
  
 (1 row)
 
@@ -2131,24 +2131,24 @@ SELECT * FROM reverse(null);
 SELECT * FROM cypher('expr', $$
     RETURN reverse(true)
 $$) AS (results agtype);
-ERROR:  reverse() unsuppoted argument agtype 5
-SELECT * FROM reverse(true);
-ERROR:  reverse() unsuppoted argument type 16
+ERROR:  reverse() unsupported argument agtype 5
+SELECT * FROM age_reverse(true);
+ERROR:  reverse() unsupported argument type 16
 SELECT * FROM cypher('expr', $$
     RETURN reverse(3.14)
 $$) AS (results agtype);
-ERROR:  reverse() unsuppoted argument agtype 4
-SELECT * FROM reverse(3.14);
-ERROR:  reverse() unsuppoted argument type 1700
+ERROR:  reverse() unsupported argument agtype 4
+SELECT * FROM age_reverse(3.14);
+ERROR:  reverse() unsupported argument type 1700
 SELECT * FROM cypher('expr', $$
     RETURN reverse()
 $$) AS (results agtype);
 ERROR:  invalid number of input parameters for reverse()
 LINE 1: SELECT * FROM cypher('expr', $$
                                       ^
-SELECT * FROM reverse();
-ERROR:  function reverse() does not exist
-LINE 1: SELECT * FROM reverse();
+SELECT * FROM age_reverse();
+ERROR:  function age_reverse() does not exist
+LINE 1: SELECT * FROM age_reverse();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
 --
@@ -2170,26 +2170,26 @@ $$) AS (toLower agtype);
  "to lowercase"
 (1 row)
 
-SELECT * FROM touppercase('text'::text);
- touppercase 
+SELECT * FROM age_toupper('text'::text);
+ age_toupper 
 -------------
  "TEXT"
 (1 row)
 
-SELECT * FROM touppercase('cstring'::cstring);
- touppercase 
+SELECT * FROM age_toupper('cstring'::cstring);
+ age_toupper 
 -------------
  "CSTRING"
 (1 row)
 
-SELECT * FROM tolowercase('TEXT'::text);
- tolowercase 
+SELECT * FROM age_tolower('TEXT'::text);
+ age_tolower 
 -------------
  "text"
 (1 row)
 
-SELECT * FROM tolowercase('CSTRING'::cstring);
- tolowercase 
+SELECT * FROM age_tolower('CSTRING'::cstring);
+ age_tolower 
 -------------
  "cstring"
 (1 row)
@@ -2211,14 +2211,14 @@ $$) AS (toLower agtype);
  
 (1 row)
 
-SELECT * FROM touppercase(null);
- touppercase 
+SELECT * FROM age_toupper(null);
+ age_toupper 
 -------------
  
 (1 row)
 
-SELECT * FROM tolowercase(null);
- tolowercase 
+SELECT * FROM age_tolower(null);
+ age_tolower 
 -------------
  
 (1 row)
@@ -2227,7 +2227,7 @@ SELECT * FROM tolowercase(null);
 SELECT * FROM cypher('expr', $$
     RETURN toUpper(true)
 $$) AS (toUpper agtype);
-ERROR:  touppercase() unsuppoted argument agtype 5
+ERROR:  toUpper() unsupported argument agtype 5
 SELECT * FROM cypher('expr', $$
     RETURN toUpper()
 $$) AS (toUpper agtype);
@@ -2237,21 +2237,21 @@ LINE 1: SELECT * FROM cypher('expr', $$
 SELECT * FROM cypher('expr', $$
     RETURN toLower(true)
 $$) AS (toLower agtype);
-ERROR:  tolowercase() unsuppoted argument agtype 5
+ERROR:  toLower() unsupported argument agtype 5
 SELECT * FROM cypher('expr', $$
     RETURN toLower()
 $$) AS (toLower agtype);
 ERROR:  invalid number of input parameters for toLower()
 LINE 1: SELECT * FROM cypher('expr', $$
                                       ^
-SELECT * FROM touppercase();
-ERROR:  function touppercase() does not exist
-LINE 1: SELECT * FROM touppercase();
+SELECT * FROM age_toupper();
+ERROR:  function age_toupper() does not exist
+LINE 1: SELECT * FROM age_toupper();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM tolowercase();
-ERROR:  function tolowercase() does not exist
-LINE 1: SELECT * FROM tolowercase();
+SELECT * FROM age_tolower();
+ERROR:  function age_tolower() does not exist
+LINE 1: SELECT * FROM age_tolower();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
 --
@@ -2281,20 +2281,20 @@ $$) AS (results agtype);
  "string"
 (1 row)
 
-SELECT * FROM l_trim('  string   ');
-   l_trim    
+SELECT * FROM age_ltrim('  string   ');
+  age_ltrim  
 -------------
  "string   "
 (1 row)
 
-SELECT * FROM r_trim('  string   ');
-   r_trim   
+SELECT * FROM age_rtrim('  string   ');
+ age_rtrim  
 ------------
  "  string"
 (1 row)
 
-SELECT * FROM b_trim('  string   ');
-  b_trim  
+SELECT * FROM age_trim('  string   ');
+ age_trim 
 ----------
  "string"
 (1 row)
@@ -2324,21 +2324,21 @@ $$) AS (results agtype);
  
 (1 row)
 
-SELECT * FROM l_trim(null);
- l_trim 
---------
+SELECT * FROM age_ltrim(null);
+ age_ltrim 
+-----------
  
 (1 row)
 
-SELECT * FROM r_trim(null);
- r_trim 
---------
+SELECT * FROM age_rtrim(null);
+ age_rtrim 
+-----------
  
 (1 row)
 
-SELECT * FROM b_trim(null);
- b_trim 
---------
+SELECT * FROM age_trim(null);
+ age_trim 
+----------
  
 (1 row)
 
@@ -2346,15 +2346,15 @@ SELECT * FROM b_trim(null);
 SELECT * FROM cypher('expr', $$
     RETURN lTrim(true)
 $$) AS (results agtype);
-ERROR:  lTrim() unsuppoted argument agtype 5
+ERROR:  lTrim() unsupported argument agtype 5
 SELECT * FROM cypher('expr', $$
     RETURN rTrim(true)
 $$) AS (results agtype);
-ERROR:  rTrim() unsuppoted argument agtype 5
+ERROR:  rTrim() unsupported argument agtype 5
 SELECT * FROM cypher('expr', $$
     RETURN trim(true)
 $$) AS (results agtype);
-ERROR:  trim() unsuppoted argument agtype 5
+ERROR:  trim() unsupported argument agtype 5
 SELECT * FROM cypher('expr', $$
     RETURN lTrim()
 $$) AS (results agtype);
@@ -2373,19 +2373,19 @@ $$) AS (results agtype);
 ERROR:  invalid number of input parameters for trim()
 LINE 1: SELECT * FROM cypher('expr', $$
                                       ^
-SELECT * FROM l_trim();
-ERROR:  function l_trim() does not exist
-LINE 1: SELECT * FROM l_trim();
+SELECT * FROM age_ltrim();
+ERROR:  function age_ltrim() does not exist
+LINE 1: SELECT * FROM age_ltrim();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM r_trim();
-ERROR:  function r_trim() does not exist
-LINE 1: SELECT * FROM r_trim();
+SELECT * FROM age_rtrim();
+ERROR:  function age_rtrim() does not exist
+LINE 1: SELECT * FROM age_rtrim();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM b_trim();
-ERROR:  function b_trim() does not exist
-LINE 1: SELECT * FROM b_trim();
+SELECT * FROM age_trim();
+ERROR:  function age_trim() does not exist
+LINE 1: SELECT * FROM age_trim();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
 --
@@ -2432,14 +2432,14 @@ $$) AS (results agtype);
  
 (1 row)
 
-SELECT * FROM l_substr(null, 1);
- l_substr 
+SELECT * FROM age_left(null, 1);
+ age_left 
 ----------
  
 (1 row)
 
-SELECT * FROM l_substr(null, null);
- l_substr 
+SELECT * FROM age_left(null, null);
+ age_left 
 ----------
  
 (1 row)
@@ -2459,13 +2459,13 @@ $$) AS (results agtype);
 ERROR:  invalid number of input parameters for left()
 LINE 1: SELECT * FROM cypher('expr', $$
                                       ^
-SELECT * FROM l_substr('123456789', null);
+SELECT * FROM age_left('123456789', null);
 ERROR:  left() length parameter cannot be null
-SELECT * FROM l_substr('123456789', -1);
+SELECT * FROM age_left('123456789', -1);
 ERROR:  left() negative values are not supported for length
-SELECT * FROM l_substr();
-ERROR:  function l_substr() does not exist
-LINE 1: SELECT * FROM l_substr();
+SELECT * FROM age_left();
+ERROR:  function age_left() does not exist
+LINE 1: SELECT * FROM age_left();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
 --right()
@@ -2510,15 +2510,15 @@ $$) AS (results agtype);
  
 (1 row)
 
-SELECT * FROM r_substr(null, 1);
- r_substr 
-----------
+SELECT * FROM age_right(null, 1);
+ age_right 
+-----------
  
 (1 row)
 
-SELECT * FROM r_substr(null, null);
- r_substr 
-----------
+SELECT * FROM age_right(null, null);
+ age_right 
+-----------
  
 (1 row)
 
@@ -2537,13 +2537,13 @@ $$) AS (results agtype);
 ERROR:  invalid number of input parameters for right()
 LINE 1: SELECT * FROM cypher('expr', $$
                                       ^
-SELECT * FROM r_substr('123456789', null);
+SELECT * FROM age_right('123456789', null);
 ERROR:  right() length parameter cannot be null
-SELECT * FROM r_substr('123456789', -1);
+SELECT * FROM age_right('123456789', -1);
 ERROR:  right() negative values are not supported for length
-SELECT * FROM r_substr();
-ERROR:  function r_substr() does not exist
-LINE 1: SELECT * FROM r_substr();
+SELECT * FROM age_right();
+ERROR:  function age_right() does not exist
+LINE 1: SELECT * FROM age_right();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
 -- substring()
@@ -2579,15 +2579,15 @@ $$) AS (results agtype);
  "0123456789"
 (1 row)
 
-SELECT * FROM b_substr('0123456789', 3, 2);
- b_substr 
-----------
+SELECT * FROM age_substring('0123456789', 3, 2);
+ age_substring 
+---------------
  "34"
 (1 row)
 
-SELECT * FROM b_substr('0123456789', 1);
-  b_substr   
--------------
+SELECT * FROM age_substring('0123456789', 1);
+ age_substring 
+---------------
  "123456789"
 (1 row)
 
@@ -2616,21 +2616,21 @@ $$) AS (results agtype);
  
 (1 row)
 
-SELECT * FROM b_substr(null, null, null);
- b_substr 
-----------
+SELECT * FROM age_substring(null, null, null);
+ age_substring 
+---------------
  
 (1 row)
 
-SELECT * FROM b_substr(null, null);
- b_substr 
-----------
+SELECT * FROM age_substring(null, null);
+ age_substring 
+---------------
  
 (1 row)
 
-SELECT * FROM b_substr(null, 1);
- b_substr 
-----------
+SELECT * FROM age_substring(null, 1);
+ age_substring 
+---------------
  
 (1 row)
 
@@ -2651,15 +2651,15 @@ SELECT * FROM cypher('expr', $$
     RETURN substring("123456789")
 $$) AS (results agtype);
 ERROR:  substring() invalid number of arguments
-SELECT * FROM b_substr('123456789', null);
+SELECT * FROM age_substring('123456789', null);
 ERROR:  substring() offset or length cannot be null
-SELECT * FROM b_substr('123456789', 0, -1);
+SELECT * FROM age_substring('123456789', 0, -1);
 ERROR:  substring() negative values are not supported for offset or length
-SELECT * FROM b_substr('123456789', -1);
+SELECT * FROM age_substring('123456789', -1);
 ERROR:  substring() negative values are not supported for offset or length
-SELECT * FROM b_substr();
-ERROR:  function b_substr() does not exist
-LINE 1: SELECT * FROM b_substr();
+SELECT * FROM age_substring();
+ERROR:  function age_substring() does not exist
+LINE 1: SELECT * FROM age_substring();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
 --
@@ -2738,21 +2738,21 @@ $$) AS (results agtype);
  
 (1 row)
 
-SELECT * FROM split(null, null);
- split 
--------
+SELECT * FROM age_split(null, null);
+ age_split 
+-----------
  
 (1 row)
 
-SELECT * FROM split('a,b,c,d,e,f', null);
- split 
--------
+SELECT * FROM age_split('a,b,c,d,e,f', null);
+ age_split 
+-----------
  
 (1 row)
 
-SELECT * FROM split(null, ',');
- split 
--------
+SELECT * FROM age_split(null, ',');
+ age_split 
+-----------
  
 (1 row)
 
@@ -2760,11 +2760,11 @@ SELECT * FROM split(null, ',');
 SELECT * FROM cypher('expr', $$
     RETURN split(123456789, ",")
 $$) AS (results agtype);
-ERROR:  split() unsuppoted argument agtype 3
+ERROR:  split() unsupported argument agtype 3
 SELECT * FROM cypher('expr', $$
     RETURN split("a,b,c,d,e,f", -1)
 $$) AS (results agtype);
-ERROR:  split() unsuppoted argument agtype 3
+ERROR:  split() unsupported argument agtype 3
 SELECT * FROM cypher('expr', $$
     RETURN split("a,b,c,d,e,f")
 $$) AS (results agtype);
@@ -2777,15 +2777,15 @@ $$) AS (results agtype);
 ERROR:  invalid number of input parameters for split()
 LINE 1: SELECT * FROM cypher('expr', $$
                                       ^
-SELECT * FROM split(123456789, ',');
-ERROR:  split() unsuppoted argument type 23
-SELECT * FROM split('a,b,c,d,e,f', -1);
-ERROR:  split() unsuppoted argument type 23
-SELECT * FROM split('a,b,c,d,e,f');
+SELECT * FROM age_split(123456789, ',');
+ERROR:  split() unsupported argument type 23
+SELECT * FROM age_split('a,b,c,d,e,f', -1);
+ERROR:  split() unsupported argument type 23
+SELECT * FROM age_split('a,b,c,d,e,f');
 ERROR:  split() invalid number of arguments
-SELECT * FROM split();
-ERROR:  function split() does not exist
-LINE 1: SELECT * FROM split();
+SELECT * FROM age_split();
+ERROR:  function age_split() does not exist
+LINE 1: SELECT * FROM age_split();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
 --
@@ -2880,39 +2880,39 @@ $$) AS (results agtype);
  
 (1 row)
 
-SELECT * FROM replace(null, null, null);
- replace 
----------
+SELECT * FROM age_replace(null, null, null);
+ age_replace 
+-------------
  
 (1 row)
 
-SELECT * FROM replace('Hello', null, null);
- replace 
----------
+SELECT * FROM age_replace('Hello', null, null);
+ age_replace 
+-------------
  
 (1 row)
 
-SELECT * FROM replace('Hello', '', null);
- replace 
----------
+SELECT * FROM age_replace('Hello', '', null);
+ age_replace 
+-------------
  
 (1 row)
 
-SELECT * FROM replace('', '', '');
- replace 
----------
+SELECT * FROM age_replace('', '', '');
+ age_replace 
+-------------
  
 (1 row)
 
-SELECT * FROM replace('Hello', 'Hello', '');
- replace 
----------
+SELECT * FROM age_replace('Hello', 'Hello', '');
+ age_replace 
+-------------
  
 (1 row)
 
-SELECT * FROM replace('', 'Hello', 'Mellow');
- replace 
----------
+SELECT * FROM age_replace('', 'Hello', 'Mellow');
+ age_replace 
+-------------
  
 (1 row)
 
@@ -2938,24 +2938,24 @@ LINE 1: SELECT * FROM cypher('expr', $$
 SELECT * FROM cypher('expr', $$
     RETURN replace("Hello", "e", 1)
 $$) AS (results agtype);
-ERROR:  replace() unsuppoted argument agtype 3
+ERROR:  replace() unsupported argument agtype 3
 SELECT * FROM cypher('expr', $$
     RETURN replace("Hello", 1, "e")
 $$) AS (results agtype);
-ERROR:  replace() unsuppoted argument agtype 3
-SELECT * FROM replace();
-ERROR:  function replace() does not exist
-LINE 1: SELECT * FROM replace();
+ERROR:  replace() unsupported argument agtype 3
+SELECT * FROM age_replace();
+ERROR:  function age_replace() does not exist
+LINE 1: SELECT * FROM age_replace();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM replace(null);
+SELECT * FROM age_replace(null);
 ERROR:  replace() invalid number of arguments
-SELECT * FROM replace(null, null);
+SELECT * FROM age_replace(null, null);
 ERROR:  replace() invalid number of arguments
-SELECT * FROM replace('Hello', 'e', 1);
-ERROR:  replace() unsuppoted argument type 23
-SELECT * FROM replace('Hello', 1, 'E');
-ERROR:  replace() unsuppoted argument type 23
+SELECT * FROM age_replace('Hello', 'e', 1);
+ERROR:  replace() unsupported argument type 23
+SELECT * FROM age_replace('Hello', 1, 'E');
+ERROR:  replace() unsupported argument type 23
 --
 -- sin, cos, tan, cot
 --
@@ -2991,26 +2991,26 @@ $$) AS (results agtype), cot(3.1415);
  -10792.8899395258 | -10792.8899395258
 (1 row)
 
-SELECT * FROM sin(3.1415), r_sin(3.1415);
-         sin          |        r_sin         
+SELECT * FROM sin(3.1415), age_sin(3.1415);
+         sin          |       age_sin        
 ----------------------+----------------------
  9.26535896604903e-05 | 9.26535896604903e-05
 (1 row)
 
-SELECT * FROM cos(3.1415), r_cos(3.1415);
-        cos         |       r_cos        
+SELECT * FROM cos(3.1415), age_cos(3.1415);
+        cos         |      age_cos       
 --------------------+--------------------
  -0.999999995707656 | -0.999999995707656
 (1 row)
 
-SELECT * FROM tan(3.1415), r_tan(3.1415);
-          tan          |         r_tan         
+SELECT * FROM tan(3.1415), age_tan(3.1415);
+          tan          |        age_tan        
 -----------------------+-----------------------
  -9.26535900581913e-05 | -9.26535900581913e-05
 (1 row)
 
-SELECT * FROM cot(3.1415), r_cot(3.1415);
-        cot        |       r_cot       
+SELECT * FROM cot(3.1415), age_cot(3.1415);
+        cot        |      age_cot      
 -------------------+-------------------
  -10792.8899395258 | -10792.8899395258
 (1 row)
@@ -3048,27 +3048,27 @@ $$) AS (results agtype);
  
 (1 row)
 
-SELECT * FROM r_sin(null);
- r_sin 
--------
+SELECT * FROM age_sin(null);
+ age_sin 
+---------
  
 (1 row)
 
-SELECT * FROM r_cos(null);
- r_cos 
--------
+SELECT * FROM age_cos(null);
+ age_cos 
+---------
  
 (1 row)
 
-SELECT * FROM r_tan(null);
- r_tan 
--------
+SELECT * FROM age_tan(null);
+ age_tan 
+---------
  
 (1 row)
 
-SELECT * FROM r_cot(null);
- r_cot 
--------
+SELECT * FROM age_cot(null);
+ age_cot 
+---------
  
 (1 row)
 
@@ -3076,19 +3076,19 @@ SELECT * FROM r_cot(null);
 SELECT * FROM cypher('expr', $$
     RETURN sin("0")
 $$) AS (results agtype);
-ERROR:  sin() unsuppoted argument agtype 1
+ERROR:  sin() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN cos("0")
 $$) AS (results agtype);
-ERROR:  cos() unsuppoted argument agtype 1
+ERROR:  cos() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN tan("0")
 $$) AS (results agtype);
-ERROR:  tan() unsuppoted argument agtype 1
+ERROR:  tan() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN cot("0")
 $$) AS (results agtype);
-ERROR:  cot() unsuppoted argument agtype 1
+ERROR:  cot() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN sin()
 $$) AS (results agtype);
@@ -3113,32 +3113,32 @@ $$) AS (results agtype);
 ERROR:  invalid number of input parameters for cot()
 LINE 1: SELECT * FROM cypher('expr', $$
                                       ^
-SELECT * FROM r_sin('0');
-ERROR:  sin() unsuppoted argument type 25
-SELECT * FROM r_cos('0');
-ERROR:  cos() unsuppoted argument type 25
-SELECT * FROM r_tan('0');
-ERROR:  tan() unsuppoted argument type 25
-SELECT * FROM r_cot('0');
-ERROR:  cot() unsuppoted argument type 25
-SELECT * FROM r_sin();
-ERROR:  function r_sin() does not exist
-LINE 1: SELECT * FROM r_sin();
+SELECT * FROM age_sin('0');
+ERROR:  sin() unsupported argument type 25
+SELECT * FROM age_cos('0');
+ERROR:  cos() unsupported argument type 25
+SELECT * FROM age_tan('0');
+ERROR:  tan() unsupported argument type 25
+SELECT * FROM age_cot('0');
+ERROR:  cot() unsupported argument type 25
+SELECT * FROM age_sin();
+ERROR:  function age_sin() does not exist
+LINE 1: SELECT * FROM age_sin();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM r_cos();
-ERROR:  function r_cos() does not exist
-LINE 1: SELECT * FROM r_cos();
+SELECT * FROM age_cos();
+ERROR:  function age_cos() does not exist
+LINE 1: SELECT * FROM age_cos();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM r_tan();
-ERROR:  function r_tan() does not exist
-LINE 1: SELECT * FROM r_tan();
+SELECT * FROM age_tan();
+ERROR:  function age_tan() does not exist
+LINE 1: SELECT * FROM age_tan();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM r_cot();
-ERROR:  function r_cot() does not exist
-LINE 1: SELECT * FROM r_cot();
+SELECT * FROM age_cot();
+ERROR:  function age_cot() does not exist
+LINE 1: SELECT * FROM age_cot();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
 --
@@ -3176,26 +3176,26 @@ $$) AS (results agtype);
  3.14159265358979
 (1 row)
 
-SELECT * FROM asin(1), r_asin(1);
-      asin       |     r_asin      
+SELECT * FROM asin(1), age_asin(1);
+      asin       |    age_asin     
 -----------------+-----------------
  1.5707963267949 | 1.5707963267949
 (1 row)
 
-SELECT * FROM acos(0), r_acos(0);
-      acos       |     r_acos      
+SELECT * FROM acos(0), age_acos(0);
+      acos       |    age_acos     
 -----------------+-----------------
  1.5707963267949 | 1.5707963267949
 (1 row)
 
-SELECT * FROM atan(1), r_atan(1);
-       atan        |      r_atan       
+SELECT * FROM atan(1), age_atan(1);
+       atan        |     age_atan      
 -------------------+-------------------
  0.785398163397448 | 0.785398163397448
 (1 row)
 
-SELECT * FROM atan2(1, 1), r_atan2(1, 1);
-       atan2       |      r_atan2      
+SELECT * FROM atan2(1, 1), age_atan2(1, 1);
+       atan2       |     age_atan2     
 -------------------+-------------------
  0.785398163397448 | 0.785398163397448
 (1 row)
@@ -3281,39 +3281,39 @@ $$) AS (results agtype);
  
 (1 row)
 
-SELECT * FROM r_asin(null);
- r_asin 
---------
+SELECT * FROM age_asin(null);
+ age_asin 
+----------
  
 (1 row)
 
-SELECT * FROM r_acos(null);
- r_acos 
---------
+SELECT * FROM age_acos(null);
+ age_acos 
+----------
  
 (1 row)
 
-SELECT * FROM r_atan(null);
- r_atan 
---------
+SELECT * FROM age_atan(null);
+ age_atan 
+----------
  
 (1 row)
 
-SELECT * FROM r_atan2(null, null);
- r_atan2 
----------
+SELECT * FROM age_atan2(null, null);
+ age_atan2 
+-----------
  
 (1 row)
 
-SELECT * FROM r_atan2(1, null);
- r_atan2 
----------
+SELECT * FROM age_atan2(1, null);
+ age_atan2 
+-----------
  
 (1 row)
 
-SELECT * FROM r_atan2(null, 1);
- r_atan2 
----------
+SELECT * FROM age_atan2(null, 1);
+ age_atan2 
+-----------
  
 (1 row)
 
@@ -3321,23 +3321,23 @@ SELECT * FROM r_atan2(null, 1);
 SELECT * FROM cypher('expr', $$
     RETURN asin("0")
 $$) AS (results agtype);
-ERROR:  asin() unsuppoted argument agtype 1
+ERROR:  asin() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN acos("0")
 $$) AS (results agtype);
-ERROR:  acos() unsuppoted argument agtype 1
+ERROR:  acos() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN atan("0")
 $$) AS (results agtype);
-ERROR:  atan() unsuppoted argument agtype 1
+ERROR:  atan() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN atan2("0", 1)
 $$) AS (results agtype);
-ERROR:  atan2() unsuppoted argument agtype 1
+ERROR:  atan2() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN atan2(0, "1")
 $$) AS (results agtype);
-ERROR:  atan2() unsuppoted argument agtype 1
+ERROR:  atan2() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN asin()
 $$) AS (results agtype);
@@ -3368,37 +3368,37 @@ $$) AS (results agtype);
 ERROR:  invalid number of input parameters for atan2()
 LINE 1: SELECT * FROM cypher('expr', $$
                                       ^
-SELECT * FROM r_asin('0');
-ERROR:  asin() unsuppoted argument type 25
-SELECT * FROM r_acos('0');
-ERROR:  acos() unsuppoted argument type 25
-SELECT * FROM r_atan('0');
-ERROR:  atan() unsuppoted argument type 25
-SELECT * FROM r_atan2('0', 1);
-ERROR:  atan2() unsuppoted argument type 25
-SELECT * FROM r_atan2(1, '0');
-ERROR:  atan2() unsuppoted argument type 25
-SELECT * FROM r_asin();
-ERROR:  function r_asin() does not exist
-LINE 1: SELECT * FROM r_asin();
+SELECT * FROM age_asin('0');
+ERROR:  asin() unsupported argument type 25
+SELECT * FROM age_acos('0');
+ERROR:  acos() unsupported argument type 25
+SELECT * FROM age_atan('0');
+ERROR:  atan() unsupported argument type 25
+SELECT * FROM age_atan2('0', 1);
+ERROR:  atan2() unsupported argument type 25
+SELECT * FROM age_atan2(1, '0');
+ERROR:  atan2() unsupported argument type 25
+SELECT * FROM age_asin();
+ERROR:  function age_asin() does not exist
+LINE 1: SELECT * FROM age_asin();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM r_acos();
-ERROR:  function r_acos() does not exist
-LINE 1: SELECT * FROM r_acos();
+SELECT * FROM age_acos();
+ERROR:  function age_acos() does not exist
+LINE 1: SELECT * FROM age_acos();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM r_atan();
-ERROR:  function r_atan() does not exist
-LINE 1: SELECT * FROM r_atan();
+SELECT * FROM age_atan();
+ERROR:  function age_atan() does not exist
+LINE 1: SELECT * FROM age_atan();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM r_atan2();
-ERROR:  function r_atan2() does not exist
-LINE 1: SELECT * FROM r_atan2();
+SELECT * FROM age_atan2();
+ERROR:  function age_atan2() does not exist
+LINE 1: SELECT * FROM age_atan2();
                       ^
 HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
-SELECT * FROM r_atan2(1);
+SELECT * FROM age_atan2(1);
 ERROR:  atan2() invalid number of arguments
 --
 -- pi
@@ -3564,11 +3564,11 @@ LINE 1: SELECT * FROM cypher('expr', $$
 SELECT * FROM cypher('expr', $$
     RETURN radians("1")
 $$) AS (results agtype);
-ERROR:  radians() unsuppoted argument agtype 1
+ERROR:  radians() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN degrees("1")
 $$) AS (results agtype);
-ERROR:  degrees() unsuppoted argument agtype 1
+ERROR:  degrees() unsupported argument agtype 1
 --
 -- abs(), ceil(), floor(), & round()
 --
@@ -3815,23 +3815,23 @@ LINE 1: SELECT * FROM cypher('expr', $$
 SELECT * FROM cypher('expr', $$
     RETURN abs("1")
 $$) AS (results agtype);
-ERROR:  abs() unsuppoted argument agtype 1
+ERROR:  abs() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN ceil("1")
 $$) AS (results agtype);
-ERROR:  ceil() unsuppoted argument agtype 1
+ERROR:  ceil() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN floor("1")
 $$) AS (results agtype);
-ERROR:  floor() unsuppoted argument agtype 1
+ERROR:  floor() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN round("1")
 $$) AS (results agtype);
-ERROR:  round() unsuppoted argument agtype 1
+ERROR:  round() unsupported argument agtype 1
 SELECT * FROM cypher('expr', $$
     RETURN sign("1")
 $$) AS (results agtype);
-ERROR:  sign() unsuppoted argument agtype 1
+ERROR:  sign() unsupported argument agtype 1
 --
 -- rand()
 --
@@ -3994,7 +3994,7 @@ LINE 1: SELECT * from cypher('expr', $$
 SELECT * from cypher('expr', $$
     RETURN exp("1")
 $$) as (result agtype);
-ERROR:  exp() unsuppoted argument agtype 1
+ERROR:  exp() unsupported argument agtype 1
 --
 -- sqrt()
 --
@@ -4049,7 +4049,7 @@ LINE 1: SELECT * from cypher('expr', $$
 SELECT * from cypher('expr', $$
     RETURN sqrt("1")
 $$) as (result agtype);
-ERROR:  sqrt() unsuppoted argument agtype 1
+ERROR:  sqrt() unsupported argument agtype 1
 --
 -- Cleanup
 --
diff --git a/regress/sql/agtype.sql b/regress/sql/agtype.sql
index 821a68d..2e30e09 100644
--- a/regress/sql/agtype.sql
+++ b/regress/sql/agtype.sql
@@ -474,33 +474,33 @@ SELECT _agtype_build_path(
 --
 -- id, startid, endid
 --
-SELECT id(_agtype_build_vertex('1'::graphid, $$label_name$$, 
agtype_build_map()));
-SELECT id(_agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
+SELECT age_id(_agtype_build_vertex('1'::graphid, $$label_name$$, 
agtype_build_map()));
+SELECT age_id(_agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
                          $$label_name$$, agtype_build_map('id', 2)));
 
-SELECT start_id(_agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
+SELECT age_start_id(_agtype_build_edge('1'::graphid, '2'::graphid, 
'3'::graphid,
                          $$label_name$$, agtype_build_map('id', 2)));
 
-SELECT end_id(_agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
+SELECT age_end_id(_agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
                          $$label_name$$, agtype_build_map('id', 2)));
 
 
-SELECT id(_agtype_build_path(
+SELECT age_id(_agtype_build_path(
        _agtype_build_vertex('2'::graphid, $$label_name$$, agtype_build_map()),
        _agtype_build_edge('1'::graphid, '2'::graphid, '3'::graphid,
                          $$label$$, agtype_build_map('id', 2)),
        _agtype_build_vertex('3'::graphid, $$label$$, agtype_build_map('id', 2))
 ));
 
-SELECT id(agtype_in('1'));
+SELECT age_id(agtype_in('1'));
 
-SELECT id(NULL);
-SELECT start_id(NULL);
-SELECT end_id(NULL);
+SELECT age_id(NULL);
+SELECT age_start_id(NULL);
+SELECT age_end_id(NULL);
 
-SELECT id(agtype_in('null'));
-SELECT start_id(agtype_in('null'));
-SELECT end_id(agtype_in('null'));
+SELECT age_id(agtype_in('null'));
+SELECT age_start_id(agtype_in('null'));
+SELECT age_end_id(agtype_in('null'));
 
 --
 -- Test STARTS WITH, ENDS WITH, and CONTAINS
diff --git a/regress/sql/expr.sql b/regress/sql/expr.sql
index 25b3eb3..5c041b6 100644
--- a/regress/sql/expr.sql
+++ b/regress/sql/expr.sql
@@ -896,29 +896,29 @@ $$) AS (length agtype);
 --
 
 -- PG types
-SELECT * FROM toString(3);
-SELECT * FROM toString(3.14);
-SELECT * FROM toString(3.14::float);
-SELECT * FROM toString(3.14::numeric);
-SELECT * FROM toString(true);
-SELECT * FROM toString(false);
-SELECT * FROM toString('a string');
-SELECT * FROM toString('a cstring'::cstring);
-SELECT * FROM toString('a text string'::text);
+SELECT * FROM age_toString(3);
+SELECT * FROM age_toString(3.14);
+SELECT * FROM age_toString(3.14::float);
+SELECT * FROM age_toString(3.14::numeric);
+SELECT * FROM age_toString(true);
+SELECT * FROM age_toString(false);
+SELECT * FROM age_toString('a string');
+SELECT * FROM age_toString('a cstring'::cstring);
+SELECT * FROM age_toString('a text string'::text);
 -- agtypes
-SELECT * FROM toString(agtype_in('3'));
-SELECT * FROM toString(agtype_in('3.14'));
-SELECT * FROM toString(agtype_in('3.14::float'));
-SELECT * FROM toString(agtype_in('3.14::numeric'));
-SELECT * FROM toString(agtype_in('true'));
-SELECT * FROM toString(agtype_in('false'));
-SELECT * FROM toString(agtype_in('"a string"'));
+SELECT * FROM age_toString(agtype_in('3'));
+SELECT * FROM age_toString(agtype_in('3.14'));
+SELECT * FROM age_toString(agtype_in('3.14::float'));
+SELECT * FROM age_toString(agtype_in('3.14::numeric'));
+SELECT * FROM age_toString(agtype_in('true'));
+SELECT * FROM age_toString(agtype_in('false'));
+SELECT * FROM age_toString(agtype_in('"a string"'));
 SELECT * FROM cypher('expr', $$ RETURN toString(3.14::numeric) $$) AS (results 
agtype);
 -- should return null
-SELECT * FROM toString(NULL);
-SELECT * FROM toString(agtype_in(null));
+SELECT * FROM age_toString(NULL);
+SELECT * FROM age_toString(agtype_in(null));
 -- should fail
-SELECT * FROM toString();
+SELECT * FROM age_toString();
 SELECT * FROM cypher('expr', $$ RETURN toString() $$) AS (results agtype);
 
 --
@@ -927,27 +927,27 @@ SELECT * FROM cypher('expr', $$ RETURN toString() $$) AS 
(results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN reverse("gnirts a si siht")
 $$) AS (results agtype);
-SELECT * FROM reverse('gnirts a si siht');
-SELECT * FROM reverse('gnirts a si siht'::text);
-SELECT * FROM reverse('gnirts a si siht'::cstring);
+SELECT * FROM age_reverse('gnirts a si siht');
+SELECT * FROM age_reverse('gnirts a si siht'::text);
+SELECT * FROM age_reverse('gnirts a si siht'::cstring);
 -- should return null
 SELECT * FROM cypher('expr', $$
     RETURN reverse(null)
 $$) AS (results agtype);
-SELECT * FROM reverse(null);
+SELECT * FROM age_reverse(null);
 -- should fail
 SELECT * FROM cypher('expr', $$
     RETURN reverse(true)
 $$) AS (results agtype);
-SELECT * FROM reverse(true);
+SELECT * FROM age_reverse(true);
 SELECT * FROM cypher('expr', $$
     RETURN reverse(3.14)
 $$) AS (results agtype);
-SELECT * FROM reverse(3.14);
+SELECT * FROM age_reverse(3.14);
 SELECT * FROM cypher('expr', $$
     RETURN reverse()
 $$) AS (results agtype);
-SELECT * FROM reverse();
+SELECT * FROM age_reverse();
 
 --
 -- toUpper() and toLower()
@@ -958,10 +958,10 @@ $$) AS (toUpper agtype);
 SELECT * FROM cypher('expr', $$
     RETURN toLower('TO LOWERCASE')
 $$) AS (toLower agtype);
-SELECT * FROM touppercase('text'::text);
-SELECT * FROM touppercase('cstring'::cstring);
-SELECT * FROM tolowercase('TEXT'::text);
-SELECT * FROM tolowercase('CSTRING'::cstring);
+SELECT * FROM age_toupper('text'::text);
+SELECT * FROM age_toupper('cstring'::cstring);
+SELECT * FROM age_tolower('TEXT'::text);
+SELECT * FROM age_tolower('CSTRING'::cstring);
 -- should return null
 SELECT * FROM cypher('expr', $$
     RETURN toUpper(null)
@@ -969,8 +969,8 @@ $$) AS (toUpper agtype);
 SELECT * FROM cypher('expr', $$
     RETURN toLower(null)
 $$) AS (toLower agtype);
-SELECT * FROM touppercase(null);
-SELECT * FROM tolowercase(null);
+SELECT * FROM age_toupper(null);
+SELECT * FROM age_tolower(null);
 -- should fail
 SELECT * FROM cypher('expr', $$
     RETURN toUpper(true)
@@ -984,8 +984,8 @@ $$) AS (toLower agtype);
 SELECT * FROM cypher('expr', $$
     RETURN toLower()
 $$) AS (toLower agtype);
-SELECT * FROM touppercase();
-SELECT * FROM tolowercase();
+SELECT * FROM age_toupper();
+SELECT * FROM age_tolower();
 
 --
 -- lTrim(), rTrim(), trim()
@@ -1000,9 +1000,9 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN trim("  string   ")
 $$) AS (results agtype);
-SELECT * FROM l_trim('  string   ');
-SELECT * FROM r_trim('  string   ');
-SELECT * FROM b_trim('  string   ');
+SELECT * FROM age_ltrim('  string   ');
+SELECT * FROM age_rtrim('  string   ');
+SELECT * FROM age_trim('  string   ');
 -- should return null
 SELECT * FROM cypher('expr', $$
     RETURN lTrim(null)
@@ -1013,9 +1013,9 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN trim(null)
 $$) AS (results agtype);
-SELECT * FROM l_trim(null);
-SELECT * FROM r_trim(null);
-SELECT * FROM b_trim(null);
+SELECT * FROM age_ltrim(null);
+SELECT * FROM age_rtrim(null);
+SELECT * FROM age_trim(null);
 -- should fail
 SELECT * FROM cypher('expr', $$
     RETURN lTrim(true)
@@ -1036,9 +1036,9 @@ SELECT * FROM cypher('expr', $$
     RETURN trim()
 $$) AS (results agtype);
 
-SELECT * FROM l_trim();
-SELECT * FROM r_trim();
-SELECT * FROM b_trim();
+SELECT * FROM age_ltrim();
+SELECT * FROM age_rtrim();
+SELECT * FROM age_trim();
 
 --
 -- left(), right(), & substring()
@@ -1059,8 +1059,8 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN left(null, null)
 $$) AS (results agtype);
-SELECT * FROM l_substr(null, 1);
-SELECT * FROM l_substr(null, null);
+SELECT * FROM age_left(null, 1);
+SELECT * FROM age_left(null, null);
 -- should fail
 SELECT * FROM cypher('expr', $$
     RETURN left("123456789", null)
@@ -1071,9 +1071,9 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN left()
 $$) AS (results agtype);
-SELECT * FROM l_substr('123456789', null);
-SELECT * FROM l_substr('123456789', -1);
-SELECT * FROM l_substr();
+SELECT * FROM age_left('123456789', null);
+SELECT * FROM age_left('123456789', -1);
+SELECT * FROM age_left();
 --right()
 SELECT * FROM cypher('expr', $$
     RETURN right("123456789", 1)
@@ -1091,8 +1091,8 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN right(null, null)
 $$) AS (results agtype);
-SELECT * FROM r_substr(null, 1);
-SELECT * FROM r_substr(null, null);
+SELECT * FROM age_right(null, 1);
+SELECT * FROM age_right(null, null);
 -- should fail
 SELECT * FROM cypher('expr', $$
     RETURN right("123456789", null)
@@ -1103,9 +1103,9 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN right()
 $$) AS (results agtype);
-SELECT * FROM r_substr('123456789', null);
-SELECT * FROM r_substr('123456789', -1);
-SELECT * FROM r_substr();
+SELECT * FROM age_right('123456789', null);
+SELECT * FROM age_right('123456789', -1);
+SELECT * FROM age_right();
 -- substring()
 SELECT * FROM cypher('expr', $$
     RETURN substring("0123456789", 0, 1)
@@ -1119,8 +1119,8 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN substring("0123456789", 0)
 $$) AS (results agtype);
-SELECT * FROM b_substr('0123456789', 3, 2);
-SELECT * FROM b_substr('0123456789', 1);
+SELECT * FROM age_substring('0123456789', 3, 2);
+SELECT * FROM age_substring('0123456789', 1);
 -- should return null
 SELECT * FROM cypher('expr', $$
     RETURN substring(null, null, null)
@@ -1131,9 +1131,9 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN substring(null, 1)
 $$) AS (results agtype);
-SELECT * FROM b_substr(null, null, null);
-SELECT * FROM b_substr(null, null);
-SELECT * FROM b_substr(null, 1);
+SELECT * FROM age_substring(null, null, null);
+SELECT * FROM age_substring(null, null);
+SELECT * FROM age_substring(null, 1);
 -- should fail
 SELECT * FROM cypher('expr', $$
     RETURN substring("123456789", null)
@@ -1147,10 +1147,10 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN substring("123456789")
 $$) AS (results agtype);
-SELECT * FROM b_substr('123456789', null);
-SELECT * FROM b_substr('123456789', 0, -1);
-SELECT * FROM b_substr('123456789', -1);
-SELECT * FROM b_substr();
+SELECT * FROM age_substring('123456789', null);
+SELECT * FROM age_substring('123456789', 0, -1);
+SELECT * FROM age_substring('123456789', -1);
+SELECT * FROM age_substring();
 
 --
 -- split()
@@ -1183,9 +1183,9 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN split(null, ",")
 $$) AS (results agtype);
-SELECT * FROM split(null, null);
-SELECT * FROM split('a,b,c,d,e,f', null);
-SELECT * FROM split(null, ',');
+SELECT * FROM age_split(null, null);
+SELECT * FROM age_split('a,b,c,d,e,f', null);
+SELECT * FROM age_split(null, ',');
 -- should fail
 SELECT * FROM cypher('expr', $$
     RETURN split(123456789, ",")
@@ -1199,10 +1199,10 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN split()
 $$) AS (results agtype);
-SELECT * FROM split(123456789, ',');
-SELECT * FROM split('a,b,c,d,e,f', -1);
-SELECT * FROM split('a,b,c,d,e,f');
-SELECT * FROM split();
+SELECT * FROM age_split(123456789, ',');
+SELECT * FROM age_split('a,b,c,d,e,f', -1);
+SELECT * FROM age_split('a,b,c,d,e,f');
+SELECT * FROM age_split();
 
 --
 -- replace()
@@ -1241,12 +1241,12 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN replace("", "Hello", "Mellow")
 $$) AS (results agtype);
-SELECT * FROM replace(null, null, null);
-SELECT * FROM replace('Hello', null, null);
-SELECT * FROM replace('Hello', '', null);
-SELECT * FROM replace('', '', '');
-SELECT * FROM replace('Hello', 'Hello', '');
-SELECT * FROM replace('', 'Hello', 'Mellow');
+SELECT * FROM age_replace(null, null, null);
+SELECT * FROM age_replace('Hello', null, null);
+SELECT * FROM age_replace('Hello', '', null);
+SELECT * FROM age_replace('', '', '');
+SELECT * FROM age_replace('Hello', 'Hello', '');
+SELECT * FROM age_replace('', 'Hello', 'Mellow');
 -- should fail
 SELECT * FROM cypher('expr', $$
     RETURN replace()
@@ -1263,11 +1263,11 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN replace("Hello", 1, "e")
 $$) AS (results agtype);
-SELECT * FROM replace();
-SELECT * FROM replace(null);
-SELECT * FROM replace(null, null);
-SELECT * FROM replace('Hello', 'e', 1);
-SELECT * FROM replace('Hello', 1, 'E');
+SELECT * FROM age_replace();
+SELECT * FROM age_replace(null);
+SELECT * FROM age_replace(null, null);
+SELECT * FROM age_replace('Hello', 'e', 1);
+SELECT * FROM age_replace('Hello', 1, 'E');
 
 --
 -- sin, cos, tan, cot
@@ -1284,10 +1284,10 @@ $$) AS (results agtype), tan(3.1415);
 SELECT * FROM cypher('expr', $$
     RETURN cot(3.1415)
 $$) AS (results agtype), cot(3.1415);
-SELECT * FROM sin(3.1415), r_sin(3.1415);
-SELECT * FROM cos(3.1415), r_cos(3.1415);
-SELECT * FROM tan(3.1415), r_tan(3.1415);
-SELECT * FROM cot(3.1415), r_cot(3.1415);
+SELECT * FROM sin(3.1415), age_sin(3.1415);
+SELECT * FROM cos(3.1415), age_cos(3.1415);
+SELECT * FROM tan(3.1415), age_tan(3.1415);
+SELECT * FROM cot(3.1415), age_cot(3.1415);
 -- should return null
 SELECT * FROM cypher('expr', $$
     RETURN sin(null)
@@ -1301,10 +1301,10 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN cot(null)
 $$) AS (results agtype);
-SELECT * FROM r_sin(null);
-SELECT * FROM r_cos(null);
-SELECT * FROM r_tan(null);
-SELECT * FROM r_cot(null);
+SELECT * FROM age_sin(null);
+SELECT * FROM age_cos(null);
+SELECT * FROM age_tan(null);
+SELECT * FROM age_cot(null);
 -- should fail
 SELECT * FROM cypher('expr', $$
     RETURN sin("0")
@@ -1330,14 +1330,14 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN cot()
 $$) AS (results agtype);
-SELECT * FROM r_sin('0');
-SELECT * FROM r_cos('0');
-SELECT * FROM r_tan('0');
-SELECT * FROM r_cot('0');
-SELECT * FROM r_sin();
-SELECT * FROM r_cos();
-SELECT * FROM r_tan();
-SELECT * FROM r_cot();
+SELECT * FROM age_sin('0');
+SELECT * FROM age_cos('0');
+SELECT * FROM age_tan('0');
+SELECT * FROM age_cot('0');
+SELECT * FROM age_sin();
+SELECT * FROM age_cos();
+SELECT * FROM age_tan();
+SELECT * FROM age_cot();
 
 --
 -- Arc functions: asin, acos, atan, & atan2
@@ -1354,10 +1354,10 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN atan2(1, 1)*4
 $$) AS (results agtype);
-SELECT * FROM asin(1), r_asin(1);
-SELECT * FROM acos(0), r_acos(0);
-SELECT * FROM atan(1), r_atan(1);
-SELECT * FROM atan2(1, 1), r_atan2(1, 1);
+SELECT * FROM asin(1), age_asin(1);
+SELECT * FROM acos(0), age_acos(0);
+SELECT * FROM atan(1), age_atan(1);
+SELECT * FROM atan2(1, 1), age_atan2(1, 1);
 -- should return null
 SELECT * FROM cypher('expr', $$
     RETURN asin(1.1)
@@ -1389,12 +1389,12 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN atan2(1, null)
 $$) AS (results agtype);
-SELECT * FROM r_asin(null);
-SELECT * FROM r_acos(null);
-SELECT * FROM r_atan(null);
-SELECT * FROM r_atan2(null, null);
-SELECT * FROM r_atan2(1, null);
-SELECT * FROM r_atan2(null, 1);
+SELECT * FROM age_asin(null);
+SELECT * FROM age_acos(null);
+SELECT * FROM age_atan(null);
+SELECT * FROM age_atan2(null, null);
+SELECT * FROM age_atan2(1, null);
+SELECT * FROM age_atan2(null, 1);
 -- should fail
 SELECT * FROM cypher('expr', $$
     RETURN asin("0")
@@ -1426,16 +1426,16 @@ $$) AS (results agtype);
 SELECT * FROM cypher('expr', $$
     RETURN atan2(null)
 $$) AS (results agtype);
-SELECT * FROM r_asin('0');
-SELECT * FROM r_acos('0');
-SELECT * FROM r_atan('0');
-SELECT * FROM r_atan2('0', 1);
-SELECT * FROM r_atan2(1, '0');
-SELECT * FROM r_asin();
-SELECT * FROM r_acos();
-SELECT * FROM r_atan();
-SELECT * FROM r_atan2();
-SELECT * FROM r_atan2(1);
+SELECT * FROM age_asin('0');
+SELECT * FROM age_acos('0');
+SELECT * FROM age_atan('0');
+SELECT * FROM age_atan2('0', 1);
+SELECT * FROM age_atan2(1, '0');
+SELECT * FROM age_asin();
+SELECT * FROM age_acos();
+SELECT * FROM age_atan();
+SELECT * FROM age_atan2();
+SELECT * FROM age_atan2(1);
 
 --
 -- pi
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index b0c224d..5fe9541 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -233,7 +233,7 @@ void out_cypher_function(StringInfo str, const 
ExtensibleNode *node)
     DEFINE_AG_NODE(cypher_function);
 
     write_node_field(exprs);
-    write_string_field(funcname);
+    write_node_field(funcname);
     write_location_field(location);
 }
 
diff --git a/src/backend/parser/cypher_clause.c 
b/src/backend/parser/cypher_clause.c
index dc77bbc..67a6d03 100644
--- a/src/backend/parser/cypher_clause.c
+++ b/src/backend/parser/cypher_clause.c
@@ -2046,7 +2046,7 @@ static Expr 
*cypher_create_id_access_function(cypher_parsestate *cpstate,
     FuncExpr *func_expr;
     col = scanRTEForColumn(pstate, rte, name, -1, 0, NULL);
 
-    func_oid = get_ag_func_oid("id", 1, AGTYPEOID);
+    func_oid = get_ag_func_oid(AG_ACCESS_FUNCTION_ID, 1, AGTYPEOID);
 
     func_expr = makeFuncExpr(func_oid, AGTYPEOID, list_make1(col), InvalidOid,
                              InvalidOid, COERCE_EXPLICIT_CALL);
diff --git a/src/backend/parser/cypher_expr.c b/src/backend/parser/cypher_expr.c
index c7c0ad4..5abb4d0 100644
--- a/src/backend/parser/cypher_expr.c
+++ b/src/backend/parser/cypher_expr.c
@@ -43,55 +43,56 @@
 #include "utils/agtype.h"
 
 /* supported function definitions */
-#define FUNC_ENDNODE    {"endNode",    "endnode",    AGTYPEOID, AGTYPEOID, 0, 
AGTYPEOID, 1, 2, true, false}
-#define FUNC_HEAD       {"head",       "head",       AGTYPEOID, 0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_ID         {"id",         "id",         AGTYPEOID, 0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_STARTID    {"start_id",   "start_id",   AGTYPEOID, 0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_ENDID      {"end_id",     "end_id",     AGTYPEOID, 0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_LAST       {"last",       "last",       AGTYPEOID, 0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_LENGTH     {"length",     "length",     AGTYPEOID, 0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_PROPERTIES {"properties", "properties", AGTYPEOID, 0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_SIZE       {"size",       "size",       ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_STARTNODE  {"startNode",  "startnode",  AGTYPEOID, AGTYPEOID, 0, 
AGTYPEOID, 1, 2, true, false}
-#define FUNC_TOBOOLEAN  {"toBoolean",  "toboolean",  ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_TOFLOAT    {"toFloat",    "tofloat",    ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_TOINTEGER  {"toInteger",  "tointeger",  ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_TYPE       {"type",       "type",       AGTYPEOID, 0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_EXISTS     {"exists",     "exists_property", AGTYPEOID, 0, 0, 
BOOLOID, 1, 1, false, false}
-#define FUNC_TOSTRING   {"toString",   "tostring",   ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_REVERSE    {"reverse",    "reverse",    ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_TOUPPER    {"toUpper",    "touppercase", ANYOID,   0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_TOLOWER    {"toLower",    "tolowercase", ANYOID,   0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_LTRIM      {"lTrim",      "l_trim",     ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_RTRIM      {"rTrim",      "r_trim",     ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_BTRIM      {"trim",       "b_trim",     ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_RSUBSTR    {"right",      "r_substr",   ANYOID,    ANYOID, 0, 
AGTYPEOID, 2, 1, false, false}
-#define FUNC_LSUBSTR    {"left",       "l_substr",   ANYOID,    ANYOID, 0, 
AGTYPEOID, 2, 1, false, false}
-#define FUNC_BSUBSTR    {"substring",  "b_substr",   ANYOID,    ANYOID, 
ANYOID, AGTYPEOID, -1, 1, false, false}
-#define FUNC_SPLIT      {"split",      "split",      ANYOID,    ANYOID, 0, 
AGTYPEOID, 2, 1, false, false}
-#define FUNC_REPLACE    {"replace",    "replace",    ANYOID,    ANYOID, 0, 
AGTYPEOID, 3, 1, false, false}
-#define FUNC_RSIN       {"sin",        "r_sin",      ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_RCOS       {"cos",        "r_cos",      ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_RTAN       {"tan",        "r_tan",      ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_RCOT       {"cot",        "r_cot",      ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_RASIN      {"asin",       "r_asin",     ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_RACOS      {"acos",       "r_acos",     ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_RATAN      {"atan",       "r_atan",     ANYOID,    0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_RATAN2     {"atan2",      "r_atan2",    ANYOID,    0, 0, 
AGTYPEOID, 2, 1, false, false}
-#define FUNC_PI         {"pi",         "pi",         0,         0, 0, 
FLOAT8OID, 0, 0, false, true}
-#define FUNC_DEGREES    {"degrees",    "degrees_from_radians", ANYOID, 0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_RADIANS    {"radians",    "radians_from_degrees", ANYOID, 0, 0, 
AGTYPEOID, 1, 1, false, false}
-#define FUNC_ROUND      {"round",      "ag_round",   ANYOID, 0, 0, AGTYPEOID, 
1, 1, false, false}
-#define FUNC_CEIL       {"ceil",       "ag_ceil",    ANYOID, 0, 0, AGTYPEOID, 
1, 1, false, false}
-#define FUNC_FLOOR      {"floor",      "ag_floor",   ANYOID, 0, 0, AGTYPEOID, 
1, 1, false, false}
-#define FUNC_ABS        {"abs",        "ag_abs",     ANYOID, 0, 0, AGTYPEOID, 
1, 1, false, false}
-#define FUNC_SIGN       {"sign",       "ag_sign",    ANYOID, 0, 0, AGTYPEOID, 
1, 1, false, false}
-#define FUNC_RAND       {"rand",       "random",     0,      0, 0, FLOAT8OID, 
0, 0, false, true}
-#define FUNC_LOG        {"log",        "ag_log",     ANYOID, 0, 0, AGTYPEOID, 
1, 1, false, false}
-#define FUNC_LOG10      {"log10",      "ag_log10",   ANYOID, 0, 0, AGTYPEOID, 
1, 1, false, false}
-#define FUNC_E          {"e",          "ag_e",       0,      0, 0, AGTYPEOID, 
0, 0, false, false}
-#define FUNC_EXP        {"exp",        "ag_exp",     ANYOID, 0, 0, AGTYPEOID, 
1, 1, false, false}
-#define FUNC_SQRT       {"sqrt",       "ag_sqrt",    ANYOID, 0, 0, AGTYPEOID, 
1, 1, false, false}
+#define FUNC_ENDNODE    {"endNode",    AGTYPEOID, AGTYPEOID, 0, AGTYPEOID, 1, 
2, true, false}
+#define FUNC_HEAD       {"head",       AGTYPEOID, 0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_ID         {"id",         AGTYPEOID, 0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_STARTID    {"start_id",   AGTYPEOID, 0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_ENDID      {"end_id",     AGTYPEOID, 0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_LAST       {"last",       AGTYPEOID, 0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_LENGTH     {"length",     AGTYPEOID, 0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_PROPERTIES {"properties", AGTYPEOID, 0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_SIZE       {"size",       ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_STARTNODE  {"startNode",  AGTYPEOID, AGTYPEOID, 0, AGTYPEOID, 1, 
2, true, false}
+#define FUNC_TOBOOLEAN  {"toBoolean",  ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_TOFLOAT    {"toFloat",    ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_TOINTEGER  {"toInteger",  ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_TYPE       {"type",       AGTYPEOID, 0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_EXISTS     {"exists",     AGTYPEOID, 0, 0, BOOLOID,   1, 1, 
false, false}
+#define FUNC_TOSTRING   {"toString",   ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_REVERSE    {"reverse",    ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_TOUPPER    {"toUpper",    ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_TOLOWER    {"toLower",    ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_LTRIM      {"lTrim",      ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RTRIM      {"rTrim",      ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_BTRIM      {"trim",       ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RSUBSTR    {"right",      ANYOID,    ANYOID, 0, AGTYPEOID, 2, 1, 
false, false}
+#define FUNC_LSUBSTR    {"left",       ANYOID,    ANYOID, 0, AGTYPEOID, 2, 1, 
false, false}
+#define FUNC_BSUBSTR    {"substring",  ANYOID,    ANYOID, ANYOID, AGTYPEOID, 
-1, 1, false, false}
+#define FUNC_SPLIT      {"split",      ANYOID,    ANYOID, 0, AGTYPEOID, 2, 1, 
false, false}
+#define FUNC_REPLACE    {"replace",    ANYOID,    ANYOID, 0, AGTYPEOID, 3, 1, 
false, false}
+#define FUNC_RSIN       {"sin",        ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RCOS       {"cos",        ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RTAN       {"tan",        ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RCOT       {"cot",        ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RASIN      {"asin",       ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RACOS      {"acos",       ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RATAN      {"atan",       ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RATAN2     {"atan2",      ANYOID,    0, 0, AGTYPEOID, 2, 1, 
false, false}
+#define FUNC_PI         {"pi",         0,         0, 0, FLOAT8OID, 0, 0, 
false, true}
+#define FUNC_DEGREES    {"degrees",    ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RADIANS    {"radians",    ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_ROUND      {"round",      ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_CEIL       {"ceil",       ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_FLOOR      {"floor",      ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_ABS        {"abs",        ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_SIGN       {"sign",       ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_RAND       {"random",     0,         0, 0, FLOAT8OID, 0, 0, 
false, true}
+#define FUNC_LOG        {"log",        ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_LOG10      {"log10",      ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_E          {"e",          0,         0, 0, AGTYPEOID, 0, 0, 
false, false}
+#define FUNC_EXP        {"exp",        ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_SQRT       {"sqrt",       ANYOID,    0, 0, AGTYPEOID, 1, 1, 
false, false}
+#define FUNC_TIMESTAMP  {"timestamp",  0,         0, 0, AGTYPEOID, 0, 0, 
false, false}
 
 /* supported functions */
 #define SUPPORTED_FUNCTIONS {FUNC_TYPE, FUNC_ENDNODE, FUNC_HEAD, FUNC_ID, \
@@ -107,15 +108,13 @@
                              FUNC_RATAN2, FUNC_PI, FUNC_DEGREES, FUNC_RADIANS, 
\
                              FUNC_ROUND, FUNC_CEIL, FUNC_FLOOR, FUNC_ABS, \
                              FUNC_SIGN, FUNC_RAND, FUNC_LOG, FUNC_LOG10, \
-                             FUNC_E, FUNC_EXP, FUNC_SQRT}
+                             FUNC_E, FUNC_EXP, FUNC_SQRT, FUNC_TIMESTAMP}
 
 /* structure for supported function signatures */
 typedef struct function_signature
 {
     /* the name from the parser */
     char *parsed_name;
-    /* the actual function name in the code */
-    char *actual_name;
     /* input types, currently only up to 3 are supported */
     Oid input1_oid;
     Oid input2_oid;
@@ -813,7 +812,7 @@ static Node *transform_cypher_function(cypher_parsestate 
*cpstate,
     Assert (nfunctions >= 0);
 
     /* get the function name and expressions */
-    funcname = cfunction->funcname;
+    funcname = ((Value*)linitial(cfunction->funcname))->val.str;
     exprs = cfunction->exprs;
     nexprs = list_length(exprs);
 
@@ -821,19 +820,42 @@ static Node *transform_cypher_function(cypher_parsestate 
*cpstate,
     for (i = 0; i < nfunctions; i++)
     {
         fs = &supported_functions[i];
-        if (strcmp(funcname, fs->parsed_name) == 0)
+        /* we need to ignore case */
+        if (pg_strcasecmp(funcname, fs->parsed_name) == 0)
         {
             /* is the function listed in pg_catalog */
             if (fs->in_pg_catalog)
-                func_operator_oid = get_pg_func_oid(fs->actual_name, fs->nargs,
+                func_operator_oid = get_pg_func_oid(fs->parsed_name, fs->nargs,
                                                     fs->input1_oid,
                                                     fs->input2_oid,
                                                     fs->input3_oid);
+            /* this is an AGE function - all are prefixed with age_ */
             else
-                func_operator_oid = get_ag_func_oid(fs->actual_name, fs->nargs,
+            {
+                /* get the function name, length, and allocate a new string */
+                int pnlen = strlen(fs->parsed_name);
+                char *actual_name = palloc(pnlen + 5);
+                int i;
+
+                /* copy in the prefix */
+                strncpy(actual_name, "age_", 4);
+
+                /*
+                 * All PG function names are in lower case. So, copy in the 
name
+                 * in lower case for the search.
+                 */
+                for(i = 0; i < pnlen; i++)
+                    actual_name[i + 4] = tolower(fs->parsed_name[i]);
+
+                /* terminate it with 0 */
+                actual_name[i + 4] = 0;
+
+                /* look for a matching function */
+                func_operator_oid = get_ag_func_oid(actual_name, fs->nargs,
                                                     fs->input1_oid,
                                                     fs->input2_oid,
                                                     fs->input3_oid);
+            }
             break;
         }
     }
@@ -843,7 +865,7 @@ static Node *transform_cypher_function(cypher_parsestate 
*cpstate,
     /* if none was found, error out */
     if (func_operator_oid == InvalidOid)
         ereport(ERROR, (errmsg_internal("function \'%s\' not supported",
-                                        cfunction->funcname)));
+                                        funcname)));
     /*
      * verify the number of passed arguments -
      * if -1 its variable but at least 1
diff --git a/src/backend/parser/cypher_gram.y b/src/backend/parser/cypher_gram.y
index 4d503bb..33d1bee 100644
--- a/src/backend/parser/cypher_gram.y
+++ b/src/backend/parser/cypher_gram.y
@@ -135,6 +135,7 @@
 %type <string> property_key_name var_name var_name_opt label_name
 %type <string> symbolic_name schema_name
 %type <keyword> reserved_keyword
+%type <list> func_name
 
 /* precedence: lowest to highest */
 %left OR
@@ -175,8 +176,7 @@ static Node *make_null_const(int location);
 static Node *make_typecast_expr(Node *expr, char *typecast, int location);
 
 // functions
-static Node *make_function_expr(char *funcname, List *exprs, int location);
-static Node *make_immediate_no_arg_function_expr(char *funcname, int location);
+static Node *make_function_expr(List *func_name, List *exprs, int location);
 %}
 
 %%
@@ -1005,11 +1005,11 @@ expr_func:
     ;
 
 expr_func_norm:
-    symbolic_name '(' ')'
+    func_name '(' ')'
         {
-            $$ = make_immediate_no_arg_function_expr($1, @1);
+            $$ = make_function_expr($1, NIL, @1);
         }
-    | symbolic_name '(' expr_list ')'
+    | func_name '(' expr_list ')'
         {
             $$ = make_function_expr($1, $3, @2);
         }
@@ -1045,7 +1045,8 @@ expr_func_subexpr:
         }
     | EXISTS '(' property_value ')'
         {
-            $$ = make_function_expr("exists", list_make1($3), @2);
+            $$ = make_function_expr(list_make1(makeString("exists")),
+                                    list_make1($3), @2);
         }
     ;
 
@@ -1164,7 +1165,12 @@ expr_var:
 /*
  * names
  */
-
+func_name:
+    symbolic_name
+        {
+            $$ = list_make1(makeString($1));
+        }
+    ;
 property_key_name:
     schema_name
     ;
@@ -1422,37 +1428,25 @@ static Node *make_typecast_expr(Node *expr, char 
*typecast, int location)
 /*
  * functions
  */
-static Node *make_function_expr(char *funcname, List *exprs, int location)
+static Node *make_function_expr(List *func_name, List *exprs, int location)
 {
     cypher_function *node;
 
+    /* check for AGE functions that are mapped to another function */
+    if (list_length(func_name) == 1)
+    {
+        /* get the name of the function */
+        char *name = ((Value*)linitial(func_name))->val.str;
+
+        /* currently we only map rand (cypher) -> random (PG) */
+        if (pg_strcasecmp(name, "rand") == 0)
+            func_name = list_make1(makeString("random"));
+    }
+
     node = make_ag_node(cypher_function);
     node->exprs = exprs;
-    node->funcname = funcname;
+    node->funcname = func_name;
     node->location = location;
 
     return (Node *)node;
 }
-
-static Node *make_immediate_no_arg_function_expr(char *funcname, int location)
-{
-    if (pg_strcasecmp(funcname, "timestamp") == 0)
-    {
-        cypher_integer_const *node;
-        struct timespec ts;
-        long ms = 0;
-
-        /* get the system time and convert it to milliseconds */
-        clock_gettime(CLOCK_REALTIME, &ts);
-        ms += (ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);
-
-        /* build the node */
-        node = make_ag_node(cypher_integer_const);
-        node->integer = ms;
-        node->location = location;
-
-        return (Node *)node;
-    }
-
-    return make_function_expr(funcname, NIL, location);
-}
diff --git a/src/backend/utils/adt/agtype.c b/src/backend/utils/adt/agtype.c
index e04ae78..c3f39d7 100644
--- a/src/backend/utils/adt/agtype.c
+++ b/src/backend/utils/adt/agtype.c
@@ -3265,9 +3265,9 @@ Datum _property_constraint_check(PG_FUNCTION_ARGS)
 }
 
 
-PG_FUNCTION_INFO_V1(id);
+PG_FUNCTION_INFO_V1(age_id);
 
-Datum id(PG_FUNCTION_ARGS)
+Datum age_id(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_object = NULL;
@@ -3303,9 +3303,9 @@ Datum id(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(start_id);
+PG_FUNCTION_INFO_V1(age_start_id);
 
-Datum start_id(PG_FUNCTION_ARGS)
+Datum age_start_id(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_object = NULL;
@@ -3341,9 +3341,9 @@ Datum start_id(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(end_id);
+PG_FUNCTION_INFO_V1(age_end_id);
 
-Datum end_id(PG_FUNCTION_ARGS)
+Datum age_end_id(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_object = NULL;
@@ -3544,9 +3544,9 @@ static Datum get_vertex(const char *graph, const char 
*vertex_label,
     return result;
 }
 
-PG_FUNCTION_INFO_V1(startnode);
+PG_FUNCTION_INFO_V1(age_startnode);
 
-Datum startnode(PG_FUNCTION_ARGS)
+Datum age_startnode(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_object = NULL;
@@ -3609,9 +3609,9 @@ Datum startnode(PG_FUNCTION_ARGS)
     return result;
 }
 
-PG_FUNCTION_INFO_V1(endnode);
+PG_FUNCTION_INFO_V1(age_endnode);
 
-Datum endnode(PG_FUNCTION_ARGS)
+Datum age_endnode(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_object = NULL;
@@ -3674,9 +3674,9 @@ Datum endnode(PG_FUNCTION_ARGS)
     return result;
 }
 
-PG_FUNCTION_INFO_V1(head);
+PG_FUNCTION_INFO_V1(age_head);
 
-Datum head(PG_FUNCTION_ARGS)
+Datum age_head(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_result = NULL;
@@ -3708,9 +3708,9 @@ Datum head(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(last);
+PG_FUNCTION_INFO_V1(age_last);
 
-Datum last(PG_FUNCTION_ARGS)
+Datum age_last(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_result = NULL;
@@ -3742,9 +3742,9 @@ Datum last(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(properties);
+PG_FUNCTION_INFO_V1(age_properties);
 
-Datum properties(PG_FUNCTION_ARGS)
+Datum age_properties(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_object = NULL;
@@ -3780,9 +3780,9 @@ Datum properties(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(length);
+PG_FUNCTION_INFO_V1(age_length);
 
-Datum length(PG_FUNCTION_ARGS)
+Datum age_length(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_path = NULL;
@@ -3816,9 +3816,9 @@ Datum length(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(toboolean);
+PG_FUNCTION_INFO_V1(age_toboolean);
 
-Datum toboolean(PG_FUNCTION_ARGS)
+Datum age_toboolean(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -3869,7 +3869,7 @@ Datum toboolean(PG_FUNCTION_ARGS)
         }
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("toBoolean() unsuppoted argument type %d",
+                            errmsg("toBoolean() unsupported argument type %d",
                                    type)));
     }
     else
@@ -3903,7 +3903,7 @@ Datum toboolean(PG_FUNCTION_ARGS)
         }
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("toBoolean() unsuppoted argument agtype %d",
+                            errmsg("toBoolean() unsupported argument agtype 
%d",
                                    agtv_value->type)));
     }
 
@@ -3914,9 +3914,9 @@ Datum toboolean(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(tofloat);
+PG_FUNCTION_INFO_V1(age_tofloat);
 
-Datum tofloat(PG_FUNCTION_ARGS)
+Datum age_tofloat(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -3990,7 +3990,7 @@ Datum tofloat(PG_FUNCTION_ARGS)
         }
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("toFloat() unsuppoted argument type %d",
+                            errmsg("toFloat() unsupported argument type %d",
                                    type)));
     }
     else
@@ -4037,7 +4037,7 @@ Datum tofloat(PG_FUNCTION_ARGS)
         }
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("toFloat() unsuppoted argument agtype %d",
+                            errmsg("toFloat() unsupported argument agtype %d",
                                    agtv_value->type)));
     }
 
@@ -4048,9 +4048,9 @@ Datum tofloat(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(tointeger);
+PG_FUNCTION_INFO_V1(age_tointeger);
 
-Datum tointeger(PG_FUNCTION_ARGS)
+Datum age_tointeger(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -4155,7 +4155,7 @@ Datum tointeger(PG_FUNCTION_ARGS)
         }
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("toInteger() unsuppoted argument type %d",
+                            errmsg("toInteger() unsupported argument type %d",
                                    type)));
     }
     else
@@ -4231,7 +4231,7 @@ Datum tointeger(PG_FUNCTION_ARGS)
         }
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("toInteger() unsuppoted argument agtype %d",
+                            errmsg("toInteger() unsupported argument agtype 
%d",
                                    agtv_value->type)));
     }
 
@@ -4242,9 +4242,9 @@ Datum tointeger(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(size);
+PG_FUNCTION_INFO_V1(age_size);
 
-Datum size(PG_FUNCTION_ARGS)
+Datum age_size(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -4327,9 +4327,9 @@ Datum graphid_to_agtype(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(integer_to_agtype(AG_GETARG_GRAPHID(0)));
 }
 
-PG_FUNCTION_INFO_V1(type);
+PG_FUNCTION_INFO_V1(age_type);
 
-Datum type(PG_FUNCTION_ARGS)
+Datum age_type(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_object = NULL;
@@ -4365,14 +4365,14 @@ Datum type(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(exists_property);
+PG_FUNCTION_INFO_V1(age_exists);
 /*
  * Executor function for EXISTS(property).
  *
  * Note: For most executor functions we want to return SQL NULL for NULL input.
  *       However, in this case, NULL means false - it was not found.
  */
-Datum exists_property(PG_FUNCTION_ARGS)
+Datum age_exists(PG_FUNCTION_ARGS)
 {
     agtype *agt_arg = NULL;
     agtype_value *agtv_value = NULL;
@@ -4398,9 +4398,9 @@ Datum exists_property(PG_FUNCTION_ARGS)
     PG_RETURN_BOOL(true);
 }
 
-PG_FUNCTION_INFO_V1(tostring);
+PG_FUNCTION_INFO_V1(age_tostring);
 
-Datum tostring(PG_FUNCTION_ARGS)
+Datum age_tostring(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -4453,7 +4453,7 @@ Datum tostring(PG_FUNCTION_ARGS)
             string = DatumGetBool(arg) ? "true" : "false";
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("toString() unsuppoted argument type %d",
+                            errmsg("toString() unsupported argument type %d",
                                    type)));
     }
     else
@@ -4488,7 +4488,7 @@ Datum tostring(PG_FUNCTION_ARGS)
             string = (agtv_value->val.boolean) ? "true" : "false";
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("toString() unsuppoted argument agtype %d",
+                            errmsg("toString() unsupported argument agtype %d",
                                    agtv_value->type)));
     }
 
@@ -4500,9 +4500,9 @@ Datum tostring(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(reverse);
+PG_FUNCTION_INFO_V1(age_reverse);
 
-Datum reverse(PG_FUNCTION_ARGS)
+Datum age_reverse(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -4539,7 +4539,7 @@ Datum reverse(PG_FUNCTION_ARGS)
             text_string = DatumGetTextPP(arg);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("reverse() unsuppoted argument type %d",
+                            errmsg("reverse() unsupported argument type %d",
                                    type)));
     }
     else
@@ -4564,7 +4564,7 @@ Datum reverse(PG_FUNCTION_ARGS)
                                                    agtv_value->val.string.len);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("reverse() unsuppoted argument agtype %d",
+                            errmsg("reverse() unsupported argument agtype %d",
                                    agtv_value->type)));
     }
 
@@ -4591,9 +4591,9 @@ Datum reverse(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(touppercase);
+PG_FUNCTION_INFO_V1(age_toupper);
 
-Datum touppercase(PG_FUNCTION_ARGS)
+Datum age_toupper(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -4613,13 +4613,13 @@ Datum touppercase(PG_FUNCTION_ARGS)
     /* check number of args */
     if (nargs > 1)
         ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                        errmsg("touppercase() only supports one argument")));
+                        errmsg("toUpper() only supports one argument")));
 
     /* check for null */
     if (nargs < 0 || nulls[0])
         PG_RETURN_NULL();
 
-    /* touppercase() supports text, cstring, or the agtype string input */
+    /* toUpper() supports text, cstring, or the agtype string input */
     arg = args[0];
     type = types[0];
     if (type != AGTYPEOID)
@@ -4630,7 +4630,7 @@ Datum touppercase(PG_FUNCTION_ARGS)
             string = text_to_cstring(DatumGetTextPP(arg));
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("touppercase() unsuppoted argument type %d",
+                            errmsg("toUpper() unsupported argument type %d",
                                    type)));
         string_len = strlen(string);
     }
@@ -4644,7 +4644,7 @@ Datum touppercase(PG_FUNCTION_ARGS)
 
         if (!AGT_ROOT_IS_SCALAR(agt_arg))
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("touppercase() only supports scalar 
arguments")));
+                            errmsg("toUpper() only supports scalar 
arguments")));
 
         agtv_value = get_ith_agtype_value_from_container(&agt_arg->root, 0);
 
@@ -4658,7 +4658,7 @@ Datum touppercase(PG_FUNCTION_ARGS)
         }
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("touppercase() unsuppoted argument agtype 
%d",
+                            errmsg("toUpper() unsupported argument agtype %d",
                                    agtv_value->type)));
     }
 
@@ -4681,9 +4681,9 @@ Datum touppercase(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(tolowercase);
+PG_FUNCTION_INFO_V1(age_tolower);
 
-Datum tolowercase(PG_FUNCTION_ARGS)
+Datum age_tolower(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -4703,13 +4703,13 @@ Datum tolowercase(PG_FUNCTION_ARGS)
     /* check number of args */
     if (nargs > 1)
         ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                        errmsg("tolowercase() only supports one argument")));
+                        errmsg("toLower() only supports one argument")));
 
     /* check for null */
     if (nargs < 0 || nulls[0])
         PG_RETURN_NULL();
 
-    /* tolowercase() supports text, cstring, or the agtype string input */
+    /* toLower() supports text, cstring, or the agtype string input */
     arg = args[0];
     type = types[0];
     if (type != AGTYPEOID)
@@ -4720,7 +4720,7 @@ Datum tolowercase(PG_FUNCTION_ARGS)
             string = text_to_cstring(DatumGetTextPP(arg));
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("tolowercase() unsuppoted argument type %d",
+                            errmsg("toLower() unsupported argument type %d",
                                    type)));
         string_len = strlen(string);
     }
@@ -4734,7 +4734,7 @@ Datum tolowercase(PG_FUNCTION_ARGS)
 
         if (!AGT_ROOT_IS_SCALAR(agt_arg))
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("tolowercase() only supports scalar 
arguments")));
+                            errmsg("toLower() only supports scalar 
arguments")));
 
         agtv_value = get_ith_agtype_value_from_container(&agt_arg->root, 0);
 
@@ -4748,7 +4748,7 @@ Datum tolowercase(PG_FUNCTION_ARGS)
         }
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("tolowercase() unsuppoted argument agtype 
%d",
+                            errmsg("toLower() unsupported argument agtype %d",
                                    agtv_value->type)));
     }
 
@@ -4771,9 +4771,9 @@ Datum tolowercase(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(r_trim);
+PG_FUNCTION_INFO_V1(age_rtrim);
 
-Datum r_trim(PG_FUNCTION_ARGS)
+Datum age_rtrim(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -4810,7 +4810,7 @@ Datum r_trim(PG_FUNCTION_ARGS)
             text_string = DatumGetTextPP(arg);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("rTrim() unsuppoted argument type %d",
+                            errmsg("rTrim() unsupported argument type %d",
                                    type)));
     }
     else
@@ -4835,7 +4835,7 @@ Datum r_trim(PG_FUNCTION_ARGS)
                                                    agtv_value->val.string.len);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("rTrim() unsuppoted argument agtype %d",
+                            errmsg("rTrim() unsupported argument agtype %d",
                                    agtv_value->type)));
     }
 
@@ -4862,9 +4862,9 @@ Datum r_trim(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(l_trim);
+PG_FUNCTION_INFO_V1(age_ltrim);
 
-Datum l_trim(PG_FUNCTION_ARGS)
+Datum age_ltrim(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -4901,7 +4901,7 @@ Datum l_trim(PG_FUNCTION_ARGS)
             text_string = DatumGetTextPP(arg);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("lTrim() unsuppoted argument type %d",
+                            errmsg("lTrim() unsupported argument type %d",
                                    type)));
     }
     else
@@ -4926,7 +4926,7 @@ Datum l_trim(PG_FUNCTION_ARGS)
                                                    agtv_value->val.string.len);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("lTrim() unsuppoted argument agtype %d",
+                            errmsg("lTrim() unsupported argument agtype %d",
                                    agtv_value->type)));
     }
 
@@ -4953,9 +4953,9 @@ Datum l_trim(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(b_trim);
+PG_FUNCTION_INFO_V1(age_trim);
 
-Datum b_trim(PG_FUNCTION_ARGS)
+Datum age_trim(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -4992,7 +4992,7 @@ Datum b_trim(PG_FUNCTION_ARGS)
             text_string = DatumGetTextPP(arg);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("trim() unsuppoted argument type %d",
+                            errmsg("trim() unsupported argument type %d",
                                    type)));
     }
     else
@@ -5017,7 +5017,7 @@ Datum b_trim(PG_FUNCTION_ARGS)
                                                    agtv_value->val.string.len);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("trim() unsuppoted argument agtype %d",
+                            errmsg("trim() unsupported argument agtype %d",
                                    agtv_value->type)));
     }
 
@@ -5044,9 +5044,9 @@ Datum b_trim(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(r_substr);
+PG_FUNCTION_INFO_V1(age_right);
 
-Datum r_substr(PG_FUNCTION_ARGS)
+Datum age_right(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -5088,7 +5088,7 @@ Datum r_substr(PG_FUNCTION_ARGS)
             text_string = DatumGetTextPP(arg);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("right() unsuppoted argument type %d",
+                            errmsg("right() unsupported argument type %d",
                                    type)));
     }
     else
@@ -5113,7 +5113,7 @@ Datum r_substr(PG_FUNCTION_ARGS)
                                                    agtv_value->val.string.len);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("right() unsuppoted argument agtype %d",
+                            errmsg("right() unsupported argument agtype %d",
                                    agtv_value->type)));
     }
 
@@ -5131,7 +5131,7 @@ Datum r_substr(PG_FUNCTION_ARGS)
             string_len = (int64) DatumGetInt64(arg);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("right() unsuppoted argument type %d", 
type)));
+                            errmsg("right() unsupported argument type %d", 
type)));
     }
     else
     {
@@ -5150,7 +5150,7 @@ Datum r_substr(PG_FUNCTION_ARGS)
         /* no need to check for agtype null because it is an error if found */
         if (agtv_value->type != AGTV_INTEGER)
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("right() unsuppoted argument agtype %d",
+                            errmsg("right() unsupported argument agtype %d",
                                    agtv_value->type)));
 
         string_len = agtv_value->val.int_value;
@@ -5185,9 +5185,9 @@ Datum r_substr(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(l_substr);
+PG_FUNCTION_INFO_V1(age_left);
 
-Datum l_substr(PG_FUNCTION_ARGS)
+Datum age_left(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -5229,7 +5229,7 @@ Datum l_substr(PG_FUNCTION_ARGS)
             text_string = DatumGetTextPP(arg);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("left() unsuppoted argument type %d",
+                            errmsg("left() unsupported argument type %d",
                                    type)));
     }
     else
@@ -5254,7 +5254,7 @@ Datum l_substr(PG_FUNCTION_ARGS)
                                                    agtv_value->val.string.len);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("left() unsuppoted argument agtype %d",
+                            errmsg("left() unsupported argument agtype %d",
                                    agtv_value->type)));
     }
 
@@ -5272,7 +5272,7 @@ Datum l_substr(PG_FUNCTION_ARGS)
             string_len = (int64) DatumGetInt64(arg);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("left() unsuppoted argument type %d", 
type)));
+                            errmsg("left() unsupported argument type %d", 
type)));
     }
     else
     {
@@ -5291,7 +5291,7 @@ Datum l_substr(PG_FUNCTION_ARGS)
         /* no need to check for agtype null because it is an error if found */
         if (agtv_value->type != AGTV_INTEGER)
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("left() unsuppoted argument agtype %d",
+                            errmsg("left() unsupported argument agtype %d",
                                    agtv_value->type)));
 
         string_len = agtv_value->val.int_value;
@@ -5326,9 +5326,9 @@ Datum l_substr(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(b_substr);
+PG_FUNCTION_INFO_V1(age_substring);
 
-Datum b_substr(PG_FUNCTION_ARGS)
+Datum age_substring(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -5374,7 +5374,7 @@ Datum b_substr(PG_FUNCTION_ARGS)
             text_string = DatumGetTextPP(arg);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("substring() unsuppoted argument type %d",
+                            errmsg("substring() unsupported argument type %d",
                                    type)));
     }
     else
@@ -5399,7 +5399,7 @@ Datum b_substr(PG_FUNCTION_ARGS)
                                                    agtv_value->val.string.len);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("substring() unsuppoted argument agtype %d",
+                            errmsg("substring() unsupported argument agtype 
%d",
                                    agtv_value->type)));
     }
 
@@ -5422,7 +5422,7 @@ Datum b_substr(PG_FUNCTION_ARGS)
                 param = (int64) DatumGetInt64(arg);
             else
                 ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                errmsg("substring() unsuppoted argument type 
%d",
+                                errmsg("substring() unsupported argument type 
%d",
                                        type)));
         }
         else
@@ -5442,7 +5442,7 @@ Datum b_substr(PG_FUNCTION_ARGS)
             /* no need to check for agtype null because it is an error if 
found */
             if (agtv_value->type != AGTV_INTEGER)
                 ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                errmsg("substring() unsuppoted argument agtype 
%d",
+                                errmsg("substring() unsupported argument 
agtype %d",
                                        agtv_value->type)));
 
             param = agtv_value->val.int_value;
@@ -5495,9 +5495,9 @@ Datum b_substr(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(split);
+PG_FUNCTION_INFO_V1(age_split);
 
-Datum split(PG_FUNCTION_ARGS)
+Datum age_split(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -5542,7 +5542,7 @@ Datum split(PG_FUNCTION_ARGS)
                 param = DatumGetTextPP(arg);
             else
                 ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                errmsg("split() unsuppoted argument type %d",
+                                errmsg("split() unsupported argument type %d",
                                        type)));
         }
         else
@@ -5567,7 +5567,7 @@ Datum split(PG_FUNCTION_ARGS)
                                                  agtv_value->val.string.len);
             else
                 ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                errmsg("split() unsuppoted argument agtype %d",
+                                errmsg("split() unsupported argument agtype 
%d",
                                        agtv_value->type)));
         }
         if (i == 0)
@@ -5641,9 +5641,9 @@ Datum split(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(replace);
+PG_FUNCTION_INFO_V1(age_replace);
 
-Datum replace(PG_FUNCTION_ARGS)
+Datum age_replace(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -5691,7 +5691,7 @@ Datum replace(PG_FUNCTION_ARGS)
                 param = DatumGetTextPP(arg);
             else
                 ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                errmsg("replace() unsuppoted argument type %d",
+                                errmsg("replace() unsupported argument type 
%d",
                                        type)));
         }
         else
@@ -5716,7 +5716,7 @@ Datum replace(PG_FUNCTION_ARGS)
                                                  agtv_value->val.string.len);
             else
                 ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                errmsg("replace() unsuppoted argument agtype 
%d",
+                                errmsg("replace() unsupported argument agtype 
%d",
                                        agtv_value->type)));
         }
         if (i == 0)
@@ -5800,7 +5800,7 @@ static float8 get_float_compatible_arg(Datum arg, Oid 
type, char *funcname,
                 numeric_float8_no_overflow, arg));
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("%s() unsuppoted argument type %d", 
funcname,
+                            errmsg("%s() unsupported argument type %d", 
funcname,
                                    type)));
     }
     else
@@ -5848,7 +5848,7 @@ static float8 get_float_compatible_arg(Datum arg, Oid 
type, char *funcname,
                 NumericGetDatum(agtv_value->val.numeric)));
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("%s() unsuppoted argument agtype %d",
+                            errmsg("%s() unsupported argument agtype %d",
                                    funcname, agtv_value->type)));
     }
 
@@ -5894,7 +5894,7 @@ static Numeric get_numeric_compatible_arg(Datum arg, Oid 
type, char *funcname,
             result = DatumGetNumeric(arg);
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("%s() unsuppoted argument type %d", 
funcname,
+                            errmsg("%s() unsupported argument type %d", 
funcname,
                                    type)));
     }
     else
@@ -5938,7 +5938,7 @@ static Numeric get_numeric_compatible_arg(Datum arg, Oid 
type, char *funcname,
         }
         else
             ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                            errmsg("%s() unsuppoted argument agtype %d",
+                            errmsg("%s() unsupported argument agtype %d",
                                    funcname, agtv_value->type)));
     }
 
@@ -5948,9 +5948,9 @@ static Numeric get_numeric_compatible_arg(Datum arg, Oid 
type, char *funcname,
     return result;
 }
 
-PG_FUNCTION_INFO_V1(r_sin);
+PG_FUNCTION_INFO_V1(age_sin);
 
-Datum r_sin(PG_FUNCTION_ARGS)
+Datum age_sin(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -5995,9 +5995,9 @@ Datum r_sin(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(r_cos);
+PG_FUNCTION_INFO_V1(age_cos);
 
-Datum r_cos(PG_FUNCTION_ARGS)
+Datum age_cos(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6042,9 +6042,9 @@ Datum r_cos(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(r_tan);
+PG_FUNCTION_INFO_V1(age_tan);
 
-Datum r_tan(PG_FUNCTION_ARGS)
+Datum age_tan(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6089,9 +6089,9 @@ Datum r_tan(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(r_cot);
+PG_FUNCTION_INFO_V1(age_cot);
 
-Datum r_cot(PG_FUNCTION_ARGS)
+Datum age_cot(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6136,9 +6136,9 @@ Datum r_cot(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(r_asin);
+PG_FUNCTION_INFO_V1(age_asin);
 
-Datum r_asin(PG_FUNCTION_ARGS)
+Datum age_asin(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6187,9 +6187,9 @@ Datum r_asin(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(r_acos);
+PG_FUNCTION_INFO_V1(age_acos);
 
-Datum r_acos(PG_FUNCTION_ARGS)
+Datum age_acos(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6238,9 +6238,9 @@ Datum r_acos(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(r_atan);
+PG_FUNCTION_INFO_V1(age_atan);
 
-Datum r_atan(PG_FUNCTION_ARGS)
+Datum age_atan(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6285,9 +6285,9 @@ Datum r_atan(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(r_atan2);
+PG_FUNCTION_INFO_V1(age_atan2);
 
-Datum r_atan2(PG_FUNCTION_ARGS)
+Datum age_atan2(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6339,9 +6339,9 @@ Datum r_atan2(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(degrees_from_radians);
+PG_FUNCTION_INFO_V1(age_degrees);
 
-Datum degrees_from_radians(PG_FUNCTION_ARGS)
+Datum age_degrees(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6386,9 +6386,9 @@ Datum degrees_from_radians(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(radians_from_degrees);
+PG_FUNCTION_INFO_V1(age_radians);
 
-Datum radians_from_degrees(PG_FUNCTION_ARGS)
+Datum age_radians(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6434,9 +6434,9 @@ Datum radians_from_degrees(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(ag_round);
+PG_FUNCTION_INFO_V1(age_round);
 
-Datum ag_round(PG_FUNCTION_ARGS)
+Datum age_round(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6485,9 +6485,9 @@ Datum ag_round(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(ag_ceil);
+PG_FUNCTION_INFO_V1(age_ceil);
 
-Datum ag_ceil(PG_FUNCTION_ARGS)
+Datum age_ceil(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6534,9 +6534,9 @@ Datum ag_ceil(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(ag_floor);
+PG_FUNCTION_INFO_V1(age_floor);
 
-Datum ag_floor(PG_FUNCTION_ARGS)
+Datum age_floor(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6584,9 +6584,9 @@ Datum ag_floor(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(ag_abs);
+PG_FUNCTION_INFO_V1(age_abs);
 
-Datum ag_abs(PG_FUNCTION_ARGS)
+Datum age_abs(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6657,9 +6657,9 @@ Datum ag_abs(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(ag_sign);
+PG_FUNCTION_INFO_V1(age_sign);
 
-Datum ag_sign(PG_FUNCTION_ARGS)
+Datum age_sign(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6707,9 +6707,9 @@ Datum ag_sign(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(ag_log);
+PG_FUNCTION_INFO_V1(age_log);
 
-Datum ag_log(PG_FUNCTION_ARGS)
+Datum age_log(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6768,9 +6768,9 @@ Datum ag_log(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(ag_log10);
+PG_FUNCTION_INFO_V1(age_log10);
 
-Datum ag_log10(PG_FUNCTION_ARGS)
+Datum age_log10(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6834,9 +6834,9 @@ Datum ag_log10(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(ag_e);
+PG_FUNCTION_INFO_V1(age_e);
 
-Datum ag_e(PG_FUNCTION_ARGS)
+Datum age_e(PG_FUNCTION_ARGS)
 {
     agtype_value agtv_result;
     float8 float_result;
@@ -6851,9 +6851,9 @@ Datum ag_e(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(ag_exp);
+PG_FUNCTION_INFO_V1(age_exp);
 
-Datum ag_exp(PG_FUNCTION_ARGS)
+Datum age_exp(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6900,9 +6900,9 @@ Datum ag_exp(PG_FUNCTION_ARGS)
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
 
-PG_FUNCTION_INFO_V1(ag_sqrt);
+PG_FUNCTION_INFO_V1(age_sqrt);
 
-Datum ag_sqrt(PG_FUNCTION_ARGS)
+Datum age_sqrt(PG_FUNCTION_ARGS)
 {
     int nargs;
     Datum *args;
@@ -6960,3 +6960,22 @@ Datum ag_sqrt(PG_FUNCTION_ARGS)
 
     PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
 }
+
+PG_FUNCTION_INFO_V1(age_timestamp);
+
+Datum age_timestamp(PG_FUNCTION_ARGS)
+{
+    agtype_value agtv_result;
+    struct timespec ts;
+    long ms = 0;
+
+    /* get the system time and convert it to milliseconds */
+    clock_gettime(CLOCK_REALTIME, &ts);
+    ms += (ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);
+
+    /* build the result */
+    agtv_result.type = AGTV_INTEGER;
+    agtv_result.val.int_value = ms;
+
+    PG_RETURN_POINTER(agtype_value_to_agtype(&agtv_result));
+}
diff --git a/src/include/commands/label_commands.h 
b/src/include/commands/label_commands.h
index af8bc13..61fca03 100644
--- a/src/include/commands/label_commands.h
+++ b/src/include/commands/label_commands.h
@@ -28,18 +28,20 @@
 #define AG_VERTEX_COLNAME_ID "id"
 #define AG_VERTEX_COLNAME_PROPERTIES "properties"
 
-#define AG_VERTEX_ACCESS_FUNCTION_ID "id"
-#define AG_VERTEX_ACCESS_FUNCTION_PROPERTIES "properties"
+#define AG_ACCESS_FUNCTION_ID "age_id"
+
+#define AG_VERTEX_ACCESS_FUNCTION_ID "age_id"
+#define AG_VERTEX_ACCESS_FUNCTION_PROPERTIES "age_properties"
 
 #define AG_EDGE_COLNAME_ID "id"
 #define AG_EDGE_COLNAME_START_ID "start_id"
 #define AG_EDGE_COLNAME_END_ID "end_id"
 #define AG_EDGE_COLNAME_PROPERTIES "properties"
 
-#define AG_EDGE_ACCESS_FUNCTION_ID "id"
-#define AG_EDGE_ACCESS_FUNCTION_START_ID "start_id"
-#define AG_EDGE_ACCESS_FUNCTION_END_ID "end_id"
-#define AG_EDGE_ACCESS_FUNCTION_PROPERTIES "properties"
+#define AG_EDGE_ACCESS_FUNCTION_ID "age_id"
+#define AG_EDGE_ACCESS_FUNCTION_START_ID "age_start_id"
+#define AG_EDGE_ACCESS_FUNCTION_END_ID "age_end_id"
+#define AG_EDGE_ACCESS_FUNCTION_PROPERTIES "age_properties"
 
 #define IS_DEFAULT_LABEL_EDGE(str) \
     (str != NULL && strcmp(AG_DEFAULT_LABEL_EDGE, str) == 0)
diff --git a/src/include/nodes/cypher_nodes.h b/src/include/nodes/cypher_nodes.h
index 104bb6c..f5f56a4 100644
--- a/src/include/nodes/cypher_nodes.h
+++ b/src/include/nodes/cypher_nodes.h
@@ -280,7 +280,7 @@ typedef struct cypher_function
     ExtensibleNode extensible;
     /* we take an expr_list */
     List *exprs;
-    char *funcname;
+    List *funcname;
     int location;
 } cypher_function;
 

Reply via email to