All functions#
This page lists every function documented in this reference, 126 entries in all, in one alphabetical table. A function can be found by name without knowing which category it belongs to. The Function column links to the full entry, which carries the considerations and a worked example. The Signature column shows every overload the catalog holds.
Where two entries share a name, they are two functions with two OIDs and two meanings.
length over a string is not length over a path, and the signature column tells them
apart.
Function |
Signature |
Description |
Availability |
|---|---|---|---|
|
Returns the absolute value of a number. |
2.17 and earlier |
|
|
Returns the arc cosine of |
2.17 and earlier |
|
|
Reconstructs the |
2.17 and earlier |
|
|
Reconstructs the |
2.17 and earlier |
|
|
Returns a property’s value as |
Added in 2.18 |
|
|
The AgensGraph version of the running server. |
2.17 and earlier |
|
|
Returns true when the predicate holds for every element of the list. |
2.17 and earlier |
|
|
Every shortest path between two vertices. |
2.17 and earlier |
|
|
Returns true when the predicate holds for at least one element of the list. |
2.17 and earlier |
|
|
Returns the number of elements in an array. |
2.17 and earlier |
|
|
Returns the arc sine of |
2.17 and earlier |
|
|
Returns the arc tangent of |
2.17 and earlier |
|
|
Arc tangent of |
2.17 and earlier |
|
|
Returns the arithmetic mean of the non-null values in the group. |
2.17 and earlier |
|
|
Returns the number of elements in a list, entries in a map, or vertices and edges in a path. |
Added in 2.18 |
|
|
Returns the smallest integer that is not less than |
2.17 and earlier |
|
|
Returns the first argument that is not null. |
2.17 and earlier |
|
|
Gathers the group’s values into a list; a graph element gives a native array. |
2.17 and earlier |
|
|
Returns the cosine of an angle given in radians. |
2.17 and earlier |
|
|
Returns the cosine of an angle given in degrees. |
2.17 and earlier |
|
|
Returns the cotangent of an angle given in radians — the reciprocal of the tangent. |
2.17 and earlier |
|
|
Counts rows in the group. |
2.17 and earlier |
|
|
Boxes a value to |
2.17 and earlier |
|
|
The current transaction timestamp, the time in a named zone, or a timestamp built from parts. |
2.17 and earlier |
|
|
Converts radians to degrees. |
2.17 and earlier |
|
|
Finds the cheapest path between two vertices, where each edge costs what |
2.17 and earlier |
|
|
Returns Euler’s number as a |
2.17 and earlier |
|
|
Returns an edge’s property bag. |
2.17 and earlier |
|
|
Returns the edges of a path, in order. |
2.17 and earlier |
|
|
Returns the |
2.17 and earlier |
|
|
Returns the vertex an edge points at. |
2.17 and earlier |
|
|
Returns the vertex an edge points at. |
2.17 and earlier |
|
|
True when a pattern matches at least once, or when a property is present and not null. |
2.17 and earlier |
|
|
Returns e raised to the power |
2.17 and earlier |
|
|
Returns the largest integer that is not greater than |
2.17 and earlier |
|
|
What the most recent graph write in this session changed, as five counters. |
2.17 and earlier |
|
|
Returns the current time of day, either locally or in a named zone. |
2.17 and earlier |
|
|
Returns the label id of a label named as |
2.17 and earlier |
|
|
Builds a |
2.17 and earlier |
|
|
Returns true when a |
2.17 and earlier |
|
|
Returns the label part of a |
2.17 and earlier |
|
|
Returns the local part of a |
2.17 and earlier |
|
|
Returns the first element of a list. |
2.17 and earlier |
|
|
Returns a graph element’s identity. |
2.17 and earlier |
|
|
Returns true when a list has no elements or a map has no keys. |
2.17 and earlier |
|
|
Implements the backtick |
2.17 and earlier |
|
|
Returns the number of elements in a |
2.17 and earlier |
|
|
Implements the backtick |
2.17 and earlier |
|
|
Implements the backtick |
2.17 and earlier |
|
|
Implements the backtick |
2.17 and earlier |
|
|
Implements the backtick |
2.17 and earlier |
|
|
Implements the backtick binary |
2.17 and earlier |
|
|
Implements the backtick prefix |
2.17 and earlier |
|
|
Implements the backtick prefix |
2.17 and earlier |
|
|
Returns a list of the key names of a map, or of a graph element’s properties. |
2.17 and earlier |
|
|
Returns the name of the label a graph element was created with, as a |
2.17 and earlier |
|
|
Returns a list holding the vertex’s own label and every label it inherits from, nearest first. |
2.17 and earlier |
|
|
Returns the final element of a list. |
2.17 and earlier |
|
|
Returns the first |
2.17 and earlier |
|
|
Edges in a path, or elements of an array of graph elements. |
2.17 and earlier |
|
|
Characters in a string, elements in a list, or keys in a map. |
2.17 and earlier |
|
|
Natural logarithm of |
2.17 and earlier |
|
|
Returns the current transaction timestamp, or the current wall-clock reading in a named zone. |
2.17 and earlier |
|
|
Natural logarithm of |
2.17 and earlier |
|
|
Returns the base-10 logarithm of |
2.17 and earlier |
|
|
Returns the string in lower case. |
2.17 and earlier |
|
|
Removes whitespace from the start of a string. |
2.17 and earlier |
|
|
Returns the largest value in the group. |
2.17 and earlier |
|
|
Returns the smallest value in the group. |
2.17 and earlier |
|
|
The vertices of a path, in order. |
2.17 and earlier |
|
|
Returns true when the predicate holds for no element of the list — the negation of |
2.17 and earlier |
|
|
Percentile of a list of numbers, interpolated between neighbouring values. |
2.17 and earlier |
|
|
Percentile of a list of numbers, rounded down to a value in the list. |
2.17 and earlier |
|
|
Returns π. |
2.17 and earlier |
|
|
Returns a graph element’s whole property bag as a map. |
2.17 and earlier |
|
|
Converts degrees to radians. |
2.17 and earlier |
|
|
Returns a number in the half-open range 0 to 1. |
2.17 and earlier |
|
|
Returns a list of integers from |
2.17 and earlier |
|
|
Empties |
2.17 and earlier |
|
|
Returns the edges of a path, in order. |
2.17 and earlier |
|
|
Replaces every occurrence of one substring with another. |
2.17 and earlier |
|
|
Reverses a list, or a string given as a literal or cast to |
2.17 and earlier |
|
|
Returns the last |
2.17 and earlier |
|
|
Rounds |
2.17 and earlier |
|
|
Removes whitespace from the end of a string. |
2.17 and earlier |
|
|
Finds one shortest path between two vertices, by number of edges. |
2.17 and earlier |
|
|
Returns −1, 0 or 1 according to the sign of |
2.17 and earlier |
|
|
Returns the sine of an angle given in radians. |
2.17 and earlier |
|
|
Returns the sine of an angle given in degrees. |
2.17 and earlier |
|
|
Returns true when the predicate holds for exactly one element of the list. |
2.17 and earlier |
|
|
The length of a value, or the number of times a pattern matches. |
2.17 and earlier |
|
|
Cuts a string into a list at every occurrence of a delimiter. |
2.17 and earlier |
|
|
Returns the square root of |
2.17 and earlier |
|
|
Returns the |
2.17 and earlier |
|
|
Returns the vertex an edge leaves. |
2.17 and earlier |
|
|
Returns the vertex an edge leaves. |
2.17 and earlier |
|
|
Sample standard deviation of the values in the group. |
2.17 and earlier |
|
|
Population standard deviation of the values in the group. |
2.17 and earlier |
|
|
Returns the number of characters in a string, as an |
2.17 and earlier |
|
|
Implements |
2.17 and earlier |
|
|
Implements |
2.17 and earlier |
|
|
Implements |
2.17 and earlier |
|
|
Implements |
2.17 and earlier |
|
|
Returns part of a string, starting at |
2.17 and earlier |
|
|
Returns the total of the non-null values in the group. |
2.17 and earlier |
|
|
Returns every element of a list except the first. |
2.17 and earlier |
|
|
Returns the tangent of an angle given in radians. |
2.17 and earlier |
|
|
Returns the tangent of an angle given in degrees. |
2.17 and earlier |
|
|
Converts any SQL value to |
2.17 and earlier |
|
|
Returns the boolean a value names, or null when it names none. |
2.17 and earlier |
|
|
Returns the boolean a value names, or null. |
2.17 and earlier |
|
|
Returns the floating-point number a value names, or null. |
Added in 2.18 |
|
|
Converts every element of a list to a floating-point number. |
2.17 and earlier |
|
|
Returns the integer a value names, or null. |
Added in 2.18 |
|
|
Converts every element of a list to an integer. |
2.17 and earlier |
|
|
Returns the string in lower case. |
2.17 and earlier |
|
|
Returns the string form of a value. |
2.17 and earlier |
|
|
Converts every element of a list to a string. |
2.17 and earlier |
|
|
Returns the string form of a value, or null when the value has no string form. |
2.17 and earlier |
|
|
Returns the string in upper case. |
2.17 and earlier |
|
|
Removes whitespace from both ends of a string. |
2.17 and earlier |
|
|
Returns the name of an edge’s label, as a |
2.17 and earlier |
|
|
Expands a list into one row per element. |
Added in 2.18 |
|
|
Returns the string in upper case. |
2.17 and earlier |
|
|
Returns a vertex’s property bag. |
2.17 and earlier |
|
|
Returns the vertices of a path, in order. |
2.17 and earlier |
collect is older than 2.18, but its native-array results arrived with this release:
vertex[], edge[] and graphpath[] in place of jsonb. So did the three-valued
implementations behind all, any, none and single. The
2.18 release notes carry the full list of changes.
Functions documented elsewhere#
The meta schema adds functions for inspecting graphs, labels and their sizes from SQL:
meta.labels(), meta.count(), meta.label_size() and the rest. It is an extension rather
than part of the core catalog, so a database has it only once it is installed. Those
functions are documented on their own page,
Graph metadata, and are not repeated here.
Every function PostgreSQL itself provides is also reachable from a Cypher query, subject to the type rules described on each page here. The PostgreSQL documentation is the reference for those.
What this reference leaves out#
The functions AgensGraph adds occupy the object-identifier range 7000 to 8100. Not all of
them are meant to be called. The range also holds type input and output functions,
comparison and hash support for the B-tree and GIN operator classes, and aggregate
transition and final functions. It holds a planner support function, two pg_upgrade
helpers, and four placeholder entries the path-finding executor resolves. This reference
documents the ones a query can use, and omits those.
List what your own build exposes#
The catalog is the authority on what a given server has. This lists every AgensGraph function in that range, aggregates included:
SELECT p.proname AS function,
pg_catalog.pg_get_function_identity_arguments(p.oid) AS arguments,
pg_catalog.format_type(p.prorettype, NULL) AS returns,
CASE p.prokind WHEN 'a' THEN 'aggregate' ELSE 'function' END AS kind,
obj_description(p.oid, 'pg_proc') AS description
FROM pg_catalog.pg_proc p
WHERE p.oid BETWEEN 7000 AND 8100
ORDER BY p.proname, p.oid;
On this 2.18 server that returns 195 rows. That is more than this reference documents, because of the support entries listed above. To count them instead:
SELECT count(*) FROM pg_catalog.pg_proc WHERE oid BETWEEN 7000 AND 8100;
count
-------
195
A function whose name AgensGraph does not add will not appear, because it belongs to
PostgreSQL. avg, min, left and log10 are among those. Drop the WHERE clause and
filter by name to find one of them.
See also#
Aggregate functions —
avg,collect,count,min,max,sumPredicate functions —
all,any,none,single,exists,isEmptyScalar functions —
id,label,properties,size,lengthList functions —
head,keys,range,tail,unnestString functions —
substring,split,toLower,trimNumeric functions —
abs,round,log, the trigonometric familyPath functions —
nodes,relationships,shortestpath,dijkstraType conversion functions — the
to…familyjsonb operators and functions — the operators underneath every property
Graph metadata — the
meta.*schema