# 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 |
| --- | --- | --- | --- |
| [`abs`](numeric.md#abs) | abs ( x jsonb ) -> jsonb
abs ( x numeric ) -> numeric | Returns the absolute value of a number. | 2.17 and earlier |
| [`acos`](numeric.md#acos) | acos ( x jsonb ) -> jsonb
acos ( x double precision ) -> double precision | Returns the arc cosine of `x`, in radians. | 2.17 and earlier |
| [`ag_get_graphconstraintdef`](scalar.md#ag_get_graphconstraintdef) | ag_get_graphconstraintdef ( constraint oid ) -> text | Reconstructs the `CREATE CONSTRAINT` command for a graph constraint, given its OID. | 2.17 and earlier |
| [`ag_get_propindexdef`](scalar.md#ag_get_propindexdef) | ag_get_propindexdef ( index oid ) -> text | Reconstructs the `CREATE PROPERTY INDEX` command for a property index, given its OID. | 2.17 and earlier |
| [`ag_property_text`](jsonb.md#ag_property_text) | ag_property_text ( properties jsonb, key text, expected_kind "char" ) -> text | Returns a property's value as `text`, but only when the stored value is of the JSON kind asked for. | Added in 2.18 |
| [`agversion`](scalar.md#agversion) | agversion ( ) -> text | The AgensGraph version of the running server. | 2.17 and earlier |
| [`all`](predicate.md#all) | all ( variable IN list WHERE predicate ) -> boolean | Returns true when the predicate holds for every element of the list. | 2.17 and earlier |
| [`allshortestpaths`](path.md#allshortestpaths) | allshortestpaths ( pattern ) -> graphpath | Every shortest path between two vertices. | 2.17 and earlier |
| [`any`](predicate.md#any) | any ( variable IN list WHERE predicate ) -> boolean | Returns true when the predicate holds for at least one element of the list. | 2.17 and earlier |
| [`array_size`](list.md#array_size) | array_size ( list jsonb ) -> integer
array_size ( list json ) -> integer
array_size ( list anyarray ) -> integer | Returns the number of elements in an array. | 2.17 and earlier |
| [`asin`](numeric.md#asin) | asin ( x jsonb ) -> jsonb
asin ( x double precision ) -> double precision | Returns the arc sine of `x`, in radians. | 2.17 and earlier |
| [`atan`](numeric.md#atan) | atan ( x jsonb ) -> jsonb
atan ( x double precision ) -> double precision | Returns the arc tangent of `x`, in radians. | 2.17 and earlier |
| [`atan2`](numeric.md#atan2) | atan2 ( y jsonb, x jsonb ) -> jsonb
atan2 ( y double precision, x double precision ) -> double precision | Arc tangent of `y / x` in radians, using both signs to fix the quadrant. | 2.17 and earlier |
| [`avg`](aggregate.md#avg) | avg ( expression numeric ) -> numeric | Returns the arithmetic mean of the non-null values in the group. | 2.17 and earlier |
| [`cardinality`](list.md#cardinality) | cardinality ( value jsonb ) -> jsonb
cardinality ( p graphpath ) -> jsonb | Returns the number of elements in a list, entries in a map, or vertices and edges in a path. | Added in 2.18 |
| [`ceil`](numeric.md#ceil) | ceil ( x jsonb ) -> jsonb
ceil ( x numeric ) -> numeric | Returns the smallest integer that is not less than `x`. | 2.17 and earlier |
| [`coalesce`](scalar.md#coalesce) | coalesce ( value [, value ] ... ) -> jsonb | Returns the first argument that is not null. | 2.17 and earlier |
| [`collect`](aggregate.md#collect) | collect ( expression anyelement ) -> jsonb
collect ( v vertex ) -> vertex[]
collect ( e edge ) -> edge[]
collect ( p graphpath ) -> graphpath[] | Gathers the group's values into a list; a graph element gives a native array. | 2.17 and earlier |
| [`cos`](numeric.md#cos) | cos ( x jsonb ) -> jsonb
cos ( x double precision ) -> double precision | Returns the cosine of an angle given in radians. | 2.17 and earlier |
| [`cosd`](numeric.md#cosd) | cosd ( x double precision ) -> double precision | Returns the cosine of an angle given in degrees. | 2.17 and earlier |
| [`cot`](numeric.md#cot) | cot ( x jsonb ) -> jsonb
cot ( x double precision ) -> double precision | Returns the cotangent of an angle given in radians — the reciprocal of the tangent. | 2.17 and earlier |
| [`count`](aggregate.md#count) | count ( * ) -> bigint
count ( expression ) -> bigint | Counts rows in the group. | 2.17 and earlier |
| [`cypher_to_jsonb`](jsonb.md#cypher_to_jsonb) | cypher_to_jsonb ( value anyelement ) -> jsonb | Boxes a value to `jsonb` using Cypher's rules; refuses a graph type. | 2.17 and earlier |
| [`datetime`](scalar.md#datetime) | datetime ( ) -> timestamp with time zone
datetime ( timezone "any" ) -> timestamp without time zone
datetime ( year integer, month integer, mday integer, hour integer, min integer, sec integer, millisec integer, nanosec integer, timezone "any" ) -> timestamp without time zone | The current transaction timestamp, the time in a named zone, or a timestamp built from parts. | 2.17 and earlier |
| [`degrees`](numeric.md#degrees) | degrees ( x jsonb ) -> jsonb
degrees ( x double precision ) -> double precision | Converts radians to degrees. | 2.17 and earlier |
| [`dijkstra`](path.md#dijkstra) | dijkstra ( pattern, weight ) -> graphpath
dijkstra ( pattern, weight, condition ) -> graphpath
dijkstra ( pattern, weight, LIMIT count ) -> graphpath
dijkstra ( pattern, weight, condition, LIMIT count ) -> graphpath | Finds the cheapest path between two vertices, where each edge costs what `weight` evaluates to. | 2.17 and earlier |
| [`e`](numeric.md#e) | e ( ) -> numeric | Returns Euler's number as a `numeric`. | 2.17 and earlier |
| [`edge_to_jsonb`](jsonb.md#edge_to_jsonb) | edge_to_jsonb ( e edge ) -> jsonb | Returns an edge's property bag. | 2.17 and earlier |
| [`edges`](path.md#edges) | edges ( p graphpath ) -> edge[] | Returns the edges of a path, in order. | 2.17 and earlier |
| [`end_id`](scalar.md#end_id) | end_id ( e edge ) -> graphid | Returns the `graphid` of the vertex an edge points at, without reading that vertex. | 2.17 and earlier |
| [`end_vertex`](path.md#end_vertex) | end_vertex ( e edge ) -> vertex | Returns the vertex an edge points at. | 2.17 and earlier |
| [`endNode`](scalar.md#endnode) | endNode ( e edge ) -> vertex | Returns the vertex an edge points at. | 2.17 and earlier |
| [`exists`](predicate.md#exists) | exists ( pattern ) -> boolean
exists ( property_reference ) -> boolean | True when a pattern matches at least once, or when a property is present and not null. | 2.17 and earlier |
| [`exp`](numeric.md#exp) | exp ( x jsonb ) -> jsonb
exp ( x numeric ) -> numeric | Returns *e* raised to the power `x`. | 2.17 and earlier |
| [`floor`](numeric.md#floor) | floor ( x jsonb ) -> jsonb
floor ( x numeric ) -> numeric | Returns the largest integer that is not greater than `x`. | 2.17 and earlier |
| [`get_last_graph_write_stats`](scalar.md#get_last_graph_write_stats) | get_last_graph_write_stats ( ) -> record | What the most recent graph write in this session changed, as five counters. | 2.17 and earlier |
| [`get_time`](scalar.md#get_time) | get_time ( ) -> time without time zone
get_time ( timezone "any" ) -> time without time zone | Returns the current time of day, either locally or in a named zone. | 2.17 and earlier |
| [`graph_labid`](scalar.md#graph_labid) | graph_labid ( qualified_label cstring ) -> integer | Returns the label id of a label named as `graph.label`. | 2.17 and earlier |
| [`graphid`](scalar.md#graphid) | graphid ( labid integer, locid bigint ) -> graphid
graphid ( id numeric ) -> graphid | Builds a `graphid` from a label id and a local id, or from its printed form. | 2.17 and earlier |
| [`graphid_in_jsonb_array`](jsonb.md#graphid_in_jsonb_array) | graphid_in_jsonb_array ( id graphid, elements jsonb ) -> boolean | Returns true when a `graphid` is one of the graph elements in a `jsonb` array. | 2.17 and earlier |
| [`graphid_labid`](scalar.md#graphid_labid) | graphid_labid ( id graphid ) -> integer | Returns the label part of a `graphid` — the number before the dot. | 2.17 and earlier |
| [`graphid_locid`](scalar.md#graphid_locid) | graphid_locid ( id graphid ) -> bigint | Returns the local part of a `graphid` — the number after the dot, taken from the label's sequence. | 2.17 and earlier |
| [`head`](list.md#head) | head ( list jsonb ) -> jsonb
head ( list anyarray ) -> anyelement | Returns the first element of a list. | 2.17 and earlier |
| [`id`](scalar.md#id) | id ( v vertex ) -> graphid
id ( e edge ) -> graphid | Returns a graph element's identity. | 2.17 and earlier |
| [`isEmpty`](predicate.md#isempty) | isEmpty ( value jsonb ) -> boolean | Returns true when a list has no elements or a map has no keys. | 2.17 and earlier |
| [`jsonb_add`](jsonb.md#arithmetic-operators-on-jsonb) | jsonb_add ( a jsonb, b jsonb ) -> jsonb | Implements the backtick `+` operator: addition, or concatenation of two strings or two lists. | 2.17 and earlier |
| [`jsonb_array_length`](jsonb.md#jsonb_array_length) | jsonb_array_length ( list jsonb ) -> integer | Returns the number of elements in a `jsonb` array, as an `integer`. | 2.17 and earlier |
| [`jsonb_div`](jsonb.md#arithmetic-operators-on-jsonb) | jsonb_div ( a jsonb, b jsonb ) -> jsonb | Implements the backtick `/` operator. Integer division when both operands are integers. | 2.17 and earlier |
| [`jsonb_mod`](jsonb.md#arithmetic-operators-on-jsonb) | jsonb_mod ( a jsonb, b jsonb ) -> jsonb | Implements the backtick `%` operator. | 2.17 and earlier |
| [`jsonb_mul`](jsonb.md#arithmetic-operators-on-jsonb) | jsonb_mul ( a jsonb, b jsonb ) -> jsonb | Implements the backtick `*` operator. | 2.17 and earlier |
| [`jsonb_pow`](jsonb.md#arithmetic-operators-on-jsonb) | jsonb_pow ( a jsonb, b jsonb ) -> jsonb | Implements the backtick `^` operator. | 2.17 and earlier |
| [`jsonb_sub`](jsonb.md#arithmetic-operators-on-jsonb) | jsonb_sub ( a jsonb, b jsonb ) -> jsonb | Implements the backtick binary `-` operator. | 2.17 and earlier |
| [`jsonb_uminus`](jsonb.md#arithmetic-operators-on-jsonb) | jsonb_uminus ( a jsonb ) -> jsonb | Implements the backtick prefix `-` operator. | 2.17 and earlier |
| [`jsonb_uplus`](jsonb.md#arithmetic-operators-on-jsonb) | jsonb_uplus ( a jsonb ) -> jsonb | Implements the backtick prefix `+` operator. | 2.17 and earlier |
| [`keys`](list.md#keys) | keys ( map jsonb ) -> jsonb | Returns a list of the key names of a map, or of a graph element's properties. | 2.17 and earlier |
| [`label`](scalar.md#label) | label ( v vertex ) -> jsonb
label ( e edge ) -> jsonb | Returns the name of the label a graph element was created with, as a `jsonb` string. | 2.17 and earlier |
| [`labels`](scalar.md#labels) | labels ( v vertex ) -> jsonb | Returns a list holding the vertex's own label and every label it inherits from, nearest first. | 2.17 and earlier |
| [`last`](list.md#last) | last ( list jsonb ) -> jsonb
last ( list anyarray ) -> anyelement | Returns the final element of a list. | 2.17 and earlier |
| [`left`](string.md#left) | left ( string jsonb, n jsonb ) -> jsonb
left ( string text, n integer ) -> text | Returns the first `n` characters of a string. | 2.17 and earlier |
| [`length`](path.md#length) | length ( p graphpath ) -> jsonb
length ( vs vertex[] ) -> jsonb
length ( es edge[] ) -> jsonb
length ( ps graphpath[] ) -> jsonb | Edges in a path, or elements of an array of graph elements. | 2.17 and earlier |
| [`length`](scalar.md#length) | length ( value jsonb ) -> jsonb | Characters in a string, elements in a list, or keys in a map. | 2.17 and earlier |
| [`ln`](numeric.md#ln) | ln ( x double precision ) -> double precision
ln ( x numeric ) -> numeric | Natural logarithm of `x`. The function `log` resolves to in Cypher. | 2.17 and earlier |
| [`localdatetime`](scalar.md#localdatetime) | localdatetime ( ) -> timestamp with time zone
localdatetime ( timezone "any" ) -> timestamp without time zone | Returns the current transaction timestamp, or the current wall-clock reading in a named zone. | 2.17 and earlier |
| [`log`](numeric.md#log) | log ( x jsonb ) -> jsonb | Natural logarithm of `x` — not base 10, and with no base argument. | 2.17 and earlier |
| [`log10`](numeric.md#log10) | log10 ( x double precision ) -> double precision
log10 ( x numeric ) -> numeric | Returns the base-10 logarithm of `x`. | 2.17 and earlier |
| [`lower`](string.md#lower) | lower ( string text ) -> text | Returns the string in lower case. | 2.17 and earlier |
| [`lTrim`](string.md#ltrim) | lTrim ( string jsonb ) -> jsonb | Removes whitespace from the start of a string. | 2.17 and earlier |
| [`max`](aggregate.md#max) | max ( expression jsonb ) -> jsonb
max ( expression numeric ) -> numeric | Returns the largest value in the group. | 2.17 and earlier |
| [`min`](aggregate.md#min) | min ( expression jsonb ) -> jsonb
min ( expression numeric ) -> numeric | Returns the smallest value in the group. | 2.17 and earlier |
| [`nodes`](path.md#nodes) | nodes ( p graphpath ) -> vertex[] | The vertices of a path, in order. | 2.17 and earlier |
| [`none`](predicate.md#none) | none ( variable IN list WHERE predicate ) -> boolean | Returns true when the predicate holds for no element of the list — the negation of `any`. | 2.17 and earlier |
| [`percentileCont`](aggregate.md#percentilecont) | percentileCont ( list jsonb, percentile numeric ) -> double precision | Percentile of a list of numbers, interpolated between neighbouring values. | 2.17 and earlier |
| [`percentileDisc`](aggregate.md#percentiledisc) | percentileDisc ( list jsonb, percentile numeric ) -> double precision | Percentile of a list of numbers, rounded down to a value in the list. | 2.17 and earlier |
| [`pi`](numeric.md#pi) | pi ( ) -> double precision | Returns π. | 2.17 and earlier |
| [`properties`](scalar.md#properties) | properties ( v vertex ) -> jsonb
properties ( e edge ) -> jsonb | Returns a graph element's whole property bag as a map. | 2.17 and earlier |
| [`radians`](numeric.md#radians) | radians ( x jsonb ) -> jsonb
radians ( x double precision ) -> double precision | Converts degrees to radians. | 2.17 and earlier |
| [`rand`](numeric.md#rand) | rand ( ) -> jsonb | Returns a number in the half-open range 0 to 1. | 2.17 and earlier |
| [`range`](list.md#range) | range ( start integer, stop integer ) -> jsonb
range ( start integer, stop integer, step integer ) -> jsonb | Returns a list of integers from `start` to `stop`, inclusive at both ends. | 2.17 and earlier |
| [`regather_graphmeta`](scalar.md#regather_graphmeta) | regather_graphmeta ( ) -> boolean | Empties `ag_graphmeta` and rebuilds it by scanning every edge label in the current graph. | 2.17 and earlier |
| [`relationships`](path.md#relationships) | relationships ( p graphpath ) -> edge[] | Returns the edges of a path, in order. | 2.17 and earlier |
| [`replace`](string.md#replace) | replace ( string jsonb, old jsonb, new jsonb ) -> jsonb | Replaces every occurrence of one substring with another. | 2.17 and earlier |
| [`reverse`](string.md#reverse) | reverse ( string text ) -> text
reverse ( list jsonb ) -> jsonb
reverse ( list anyarray ) -> anyarray | Reverses a list, or a string given as a literal or cast to `text`. | 2.17 and earlier |
| [`right`](string.md#right) | right ( string jsonb, n jsonb ) -> jsonb
right ( string text, n integer ) -> text | Returns the last `n` characters of a string. | 2.17 and earlier |
| [`round`](numeric.md#round) | round ( x jsonb ) -> jsonb
round ( x numeric [, scale integer ] ) -> numeric | Rounds `x` to the nearest integer, halves away from zero. | 2.17 and earlier |
| [`rTrim`](string.md#rtrim) | rTrim ( string jsonb ) -> jsonb | Removes whitespace from the end of a string. | 2.17 and earlier |
| [`shortestpath`](path.md#shortestpath) | shortestpath ( pattern ) -> graphpath | Finds one shortest path between two vertices, by number of edges. | 2.17 and earlier |
| [`sign`](numeric.md#sign) | sign ( x jsonb ) -> jsonb
sign ( x numeric ) -> numeric | Returns −1, 0 or 1 according to the sign of `x`. | 2.17 and earlier |
| [`sin`](numeric.md#sin) | sin ( x double precision ) -> double precision | Returns the sine of an angle given in radians. | 2.17 and earlier |
| [`sind`](numeric.md#sind) | sind ( x double precision ) -> double precision | Returns the sine of an angle given in degrees. | 2.17 and earlier |
| [`single`](predicate.md#single) | single ( variable IN list WHERE predicate ) -> boolean | Returns true when the predicate holds for exactly one element of the list. | 2.17 and earlier |
| [`size`](scalar.md#size) | size ( value ) -> jsonb
size ( pattern ) -> bigint | The length of a value, or the number of times a pattern matches. | 2.17 and earlier |
| [`split`](string.md#split) | split ( string text, delimiter text ) -> anyarray | Cuts a string into a list at every occurrence of a delimiter. | 2.17 and earlier |
| [`sqrt`](numeric.md#sqrt) | sqrt ( x jsonb ) -> jsonb
sqrt ( x numeric ) -> numeric | Returns the square root of `x`. | 2.17 and earlier |
| [`start_id`](scalar.md#start_id) | start_id ( e edge ) -> graphid | Returns the `graphid` of the vertex an edge leaves, without reading that vertex. | 2.17 and earlier |
| [`start_vertex`](path.md#start_vertex) | start_vertex ( e edge ) -> vertex | Returns the vertex an edge leaves. | 2.17 and earlier |
| [`startNode`](scalar.md#startnode) | startNode ( e edge ) -> vertex | Returns the vertex an edge leaves. | 2.17 and earlier |
| [`stdev`](aggregate.md#stdev) | stdev ( expression numeric ) -> numeric | Sample standard deviation of the values in the group. | 2.17 and earlier |
| [`stdevp`](aggregate.md#stdevp) | stdevp ( expression numeric ) -> numeric | Population standard deviation of the values in the group. | 2.17 and earlier |
| [`str_size`](string.md#str_size) | str_size ( string text ) -> integer | Returns the number of characters in a string, as an `integer`. | 2.17 and earlier |
| [`string_contains`](string.md#matching-without-a-function) | string_contains ( a jsonb, b jsonb ) -> boolean | Implements `CONTAINS`. True when the right string occurs anywhere in the left. | 2.17 and earlier |
| [`string_ends_with`](string.md#matching-without-a-function) | string_ends_with ( a jsonb, b jsonb ) -> boolean | Implements `ENDS WITH`. True when the left string ends with the right. | 2.17 and earlier |
| [`string_regex`](string.md#matching-without-a-function) | string_regex ( a jsonb, b jsonb ) -> boolean | Implements `=~`. True when the left string matches the right as a regular expression. | 2.17 and earlier |
| [`string_starts_with`](string.md#matching-without-a-function) | string_starts_with ( a jsonb, b jsonb ) -> boolean | Implements `STARTS WITH`. True when the left string begins with the right. | 2.17 and earlier |
| [`substring`](string.md#substring) | substring ( string jsonb, start jsonb ) -> jsonb
substring ( string jsonb, start jsonb, count jsonb ) -> jsonb | Returns part of a string, starting at `start` and running to the end or for `count` characters. | 2.17 and earlier |
| [`sum`](aggregate.md#sum) | sum ( expression numeric ) -> numeric | Returns the total of the non-null values in the group. | 2.17 and earlier |
| [`tail`](list.md#tail) | tail ( list jsonb ) -> jsonb
tail ( list anyarray ) -> anyarray | Returns every element of a list except the first. | 2.17 and earlier |
| [`tan`](numeric.md#tan) | tan ( x jsonb ) -> jsonb
tan ( x double precision ) -> double precision | Returns the tangent of an angle given in radians. | 2.17 and earlier |
| [`tand`](numeric.md#tand) | tand ( x double precision ) -> double precision | Returns the tangent of an angle given in degrees. | 2.17 and earlier |
| [`to_jsonb`](jsonb.md#to_jsonb) | to_jsonb ( value anyelement ) -> jsonb | Converts any SQL value to `jsonb`, a composite becoming an object. | 2.17 and earlier |
| [`toBoolean`](type-conversion.md#toboolean) | toBoolean ( value text ) -> boolean
toBoolean ( value "any" ) -> boolean | Returns the boolean a value names, or null when it names none. | 2.17 and earlier |
| [`toBooleanOrNull`](type-conversion.md#tobooleanornull) | toBooleanOrNull ( value text ) -> boolean
toBooleanOrNull ( value "any" ) -> boolean | Returns the boolean a value names, or null. | 2.17 and earlier |
| [`toFloat`](type-conversion.md#tofloat) | toFloat ( value "any" ) -> double precision | Returns the floating-point number a value names, or null. | Added in 2.18 |
| [`toFloatList`](type-conversion.md#tofloatlist) | toFloatList ( list jsonb ) -> jsonb
toFloatList ( list anyarray ) -> double precision[] | Converts every element of a list to a floating-point number. | 2.17 and earlier |
| [`toInteger`](type-conversion.md#tointeger) | toInteger ( value "any" ) -> bigint | Returns the integer a value names, or null. | Added in 2.18 |
| [`toIntegerList`](type-conversion.md#tointegerlist) | toIntegerList ( list jsonb ) -> jsonb
toIntegerList ( list anyarray ) -> bigint[] | Converts every element of a list to an integer. | 2.17 and earlier |
| [`toLower`](string.md#tolower) | toLower ( string jsonb ) -> jsonb | Returns the string in lower case. | 2.17 and earlier |
| [`toString`](type-conversion.md#tostring) | toString ( value jsonb ) -> jsonb | Returns the string form of a value. | 2.17 and earlier |
| [`toStringList`](type-conversion.md#tostringlist) | toStringList ( list jsonb ) -> jsonb
toStringList ( list anyarray ) -> text[] | Converts every element of a list to a string. | 2.17 and earlier |
| [`toStringOrNull`](type-conversion.md#tostringornull) | toStringOrNull ( value "any" ) -> text | Returns the string form of a value, or null when the value has no string form. | 2.17 and earlier |
| [`toUpper`](string.md#toupper) | toUpper ( string jsonb ) -> jsonb | Returns the string in upper case. | 2.17 and earlier |
| [`trim`](string.md#trim) | trim ( string jsonb ) -> jsonb | Removes whitespace from both ends of a string. | 2.17 and earlier |
| [`type`](scalar.md#type) | type ( e edge ) -> jsonb | Returns the name of an edge's label, as a `jsonb` string — the same value as `label(e)`, under the name Cypher uses for relationship types. | 2.17 and earlier |
| [`unnest`](list.md#unnest) | unnest ( from_json jsonb ) -> setof jsonb | Expands a list into one row per element. | Added in 2.18 |
| [`upper`](string.md#upper) | upper ( string text ) -> text | Returns the string in upper case. | 2.17 and earlier |
| [`vertex_to_jsonb`](jsonb.md#vertex_to_jsonb) | vertex_to_jsonb ( v vertex ) -> jsonb | Returns a vertex's property bag. | 2.17 and earlier |
| [`vertices`](path.md#vertices) | vertices ( p graphpath ) -> vertex[] | 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](../../release_notes/2.18.md) 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](../../system_catalogs/graph-metadata.md), 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](https://www.postgresql.org/docs/18/functions.html) 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:
```sql
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:
```sql
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](aggregate.md) — `avg`, `collect`, `count`, `min`, `max`, `sum`
- [Predicate functions](predicate.md) — `all`, `any`, `none`, `single`, `exists`, `isEmpty`
- [Scalar functions](scalar.md) — `id`, `label`, `properties`, `size`, `length`
- [List functions](list.md) — `head`, `keys`, `range`, `tail`, `unnest`
- [String functions](string.md) — `substring`, `split`, `toLower`, `trim`
- [Numeric functions](numeric.md) — `abs`, `round`, `log`, the trigonometric family
- [Path functions](path.md) — `nodes`, `relationships`, `shortestpath`, `dijkstra`
- [Type conversion functions](type-conversion.md) — the `to…` family
- [jsonb operators and functions](jsonb.md) — the operators underneath every property
- [Graph metadata](../../system_catalogs/graph-metadata.md) — the `meta.*` schema