Project: CockroachDB (App Definition and Development / Database)
File: functions.md

<table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="bool.html">bool</a>[], elem: <a href="bool.html">bool</a>) &rarr; <a href="bool.html">bool</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="bytes.html">bytes</a>[], elem: <a href="bytes.html">bytes</a>) &rarr; <a href="bytes.html">bytes</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="date.html">date</a>[], elem: <a href="date.html">date</a>) &rarr; <a href="date.html">date</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="decimal.html">decimal</a>[], elem: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="float.html">float</a>[], elem: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="inet.html">inet</a>[], elem: <a href="inet.html">inet</a>) &rarr; <a href="inet.html">inet</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="int.html">int</a>[], elem: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="interval.html">interval</a>[], elem: <a href="interval.html">interval</a>) &rarr; <a href="interval.html">interval</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="string.html">string</a>[], elem: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="time.html">time</a>[], elem: <a href="time.html">time</a>) &rarr; <a href="time.html">time</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="timestamp.html">timestamp</a>[], elem: <a href="timestamp.html">timestamp</a>) &rarr; <a href="timestamp.html">timestamp</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="timestamp.html">timestamptz</a>[], elem: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="timestamp.html">timestamptz</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: <a href="uuid.html">uuid</a>[], elem: <a href="uuid.html">uuid</a>) &rarr; <a href="uuid.html">uuid</a>[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: anyenum[], elem: anyenum) &rarr; anyenum[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: box2d[], elem: box2d) &rarr; box2d[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: geography[], elem: geography) &rarr; geography[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: geometry[], elem: geometry) &rarr; geometry[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: jsonb[], elem: jsonb) &rarr; jsonb[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: oid[], elem: oid) &rarr; oid[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: pglsn[], elem: pglsn) &rarr; pg_lsn[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: refcursor[], elem: refcursor) &rarr; refcursor[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: timetz[], elem: timetz) &rarr; timetz[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: tuple[], elem: tuple) &rarr; tuple[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayappend"></a><code>arrayappend(array: varbit[], elem: varbit) &rarr; varbit[]</code></td><td><span class="funcdesc"><p>Appends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="bool.html">bool</a>[], right: <a href="bool.html">bool</a>[]) &rarr; <a href="bool.html">bool</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="bytes.html">bytes</a>[], right: <a href="bytes.html">bytes</a>[]) &rarr; <a href="bytes.html">bytes</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="date.html">date</a>[], right: <a href="date.html">date</a>[]) &rarr; <a href="date.html">date</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="decimal.html">decimal</a>[], right: <a href="decimal.html">decimal</a>[]) &rarr; <a href="decimal.html">decimal</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="float.html">float</a>[], right: <a href="float.html">float</a>[]) &rarr; <a href="float.html">float</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="inet.html">inet</a>[], right: <a href="inet.html">inet</a>[]) &rarr; <a href="inet.html">inet</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="int.html">int</a>[], right: <a href="int.html">int</a>[]) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="interval.html">interval</a>[], right: <a href="interval.html">interval</a>[]) &rarr; <a href="interval.html">interval</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="string.html">string</a>[], right: <a href="string.html">string</a>[]) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="time.html">time</a>[], right: <a href="time.html">time</a>[]) &rarr; <a href="time.html">time</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="timestamp.html">timestamp</a>[], right: <a href="timestamp.html">timestamp</a>[]) &rarr; <a href="timestamp.html">timestamp</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="timestamp.html">timestamptz</a>[], right: <a href="timestamp.html">timestamptz</a>[]) &rarr; <a href="timestamp.html">timestamptz</a>[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: <a href="uuid.html">uuid</a>[], right: <a href="uuid.html">uuid</a>[]) &rarr; <a href="uuid.html">uuid</a>[]</code></td><td><span class="funcdesc"><p>Appends two

</span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: anyenum[], right: anyenum[]) &rarr; anyenum[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: box2d[], right: box2d[]) &rarr; box2d[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: geography[], right: geography[]) &rarr; geography[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: geometry[], right: geometry[]) &rarr; geometry[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: jsonb[], right: jsonb[]) &rarr; jsonb[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: oid[], right: oid[]) &rarr; oid[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: pglsn[], right: pglsn[]) &rarr; pg_lsn[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: refcursor[], right: refcursor[]) &rarr; refcursor[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: timetz[], right: timetz[]) &rarr; timetz[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: tuple[], right: tuple[]) &rarr; tuple[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraycat"></a><code>arraycat(left: varbit[], right: varbit[]) &rarr; varbit[]</code></td><td><span class="funcdesc"><p>Appends two arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraylength"></a><code>arraylength(input: anyelement[], arraydimension: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the length of <code>input</code> on the provided <code>arraydimension</code>. However, because CockroachDB doesnt yet support multi-dimensional arrays, the only supported <code>array_dimension</code> is <strong>1</strong>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraylower"></a><code>arraylower(input: anyelement[], arraydimension: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the minimum value of <code>input</code> on the provided <code>arraydimension</code>. However, because CockroachDB doesnt yet support multi-dimensional arrays, the only supported <code>array_dimension</code> is <strong>1</strong>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="bool.html">bool</a>[], elem: <a href="bool.html">bool</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="bool.html">bool</a>[], elem: <a href="bool.html">bool</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="bytes.html">bytes</a>[], elem: <a href="bytes.html">bytes</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="bytes.html">bytes</a>[], elem: <a href="bytes.html">bytes</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="date.html">date</a>[], elem: <a href="date.html">date</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="date.html">date</a>[], elem: <a href="date.html">date</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="decimal.html">decimal</a>[], elem: <a href="decimal.html">decimal</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="decimal.html">decimal</a>[], elem: <a href="decimal.html">decimal</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="float.html">float</a>[], elem: <a href="float.html">float</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="float.html">float</a>[], elem: <a href="float.html">float</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="inet.html">inet</a>[], elem: <a href="inet.html">inet</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="inet.html">inet</a>[], elem: <a href="inet.html">inet</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="int.html">int</a>[], elem: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="int.html">int</a>[], elem: <a href="int.html">int</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="interval.html">interval</a>[], elem: <a href="interval.html">interval</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="interval.html">interval</a>[], elem: <a href="interval.html">interval</a>, start: <a href="int.html">int</a>) &rarr; <a

class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="string.html">string</a>[], elem: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="string.html">string</a>[], elem: <a href="string.html">string</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="time.html">time</a>[], elem: <a href="time.html">time</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="time.html">time</a>[], elem: <a href="time.html">time</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="timestamp.html">timestamp</a>[], elem: <a href="timestamp.html">timestamp</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="timestamp.html">timestamp</a>[], elem: <a href="timestamp.html">timestamp</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="timestamp.html">timestamptz</a>[], elem: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="timestamp.html">timestamptz</a>[], elem: <a href="timestamp.html">timestamptz</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="uuid.html">uuid</a>[], elem: <a href="uuid.html">uuid</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: <a href="uuid.html">uuid</a>[], elem: <a href="uuid.html">uuid</a>, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: anyenum[], elem: anyenum) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: anyenum[], elem: anyenum, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: box2d[], elem: box2d) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: box2d[], elem: box2d, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: geography[], elem: geography) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: geography[], elem: geography, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: geometry[], elem: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: geometry[], elem: geometry, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: jsonb[], elem: jsonb) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: jsonb[], elem: jsonb, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: oid[], elem: oid) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: oid[], elem: oid, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code>

</span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: pglsn[], elem: pglsn) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: pglsn[], elem: pglsn, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: refcursor[], elem: refcursor) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: refcursor[], elem: refcursor, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: timetz[], elem: timetz) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: timetz[], elem: timetz, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: tuple[], elem: tuple) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: tuple[], elem: tuple, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: varbit[], elem: varbit) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayposition"></a><code>arrayposition(array: varbit[], elem: varbit, start: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return the index of the first occurrence of <code>elem</code> in <code>array</code>, with the search begins at <code>start</code> index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="bool.html">bool</a>[], elem: <a href="bool.html">bool</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="bytes.html">bytes</a>[], elem: <a href="bytes.html">bytes</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="date.html">date</a>[], elem: <a href="date.html">date</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="decimal.html">decimal</a>[], elem: <a href="decimal.html">decimal</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="float.html">float</a>[], elem: <a href="float.html">float</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="inet.html">inet</a>[], elem: <a href="inet.html">inet</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="int.html">int</a>[], elem: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="interval.html">interval</a>[], elem: <a href="interval.html">interval</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="string.html">string</a>[], elem: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="time.html">time</a>[], elem: <a href="time.html">time</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="timestamp.html">timestamp</a>[], elem: <a href="timestamp.html">timestamp</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="timestamp.html">timestamptz</a>[], elem: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: <a href="uuid.html">uuid</a>[], elem: <a href="uuid.html">uuid</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: anyenum[], elem: anyenum) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: box2d[], elem: box2d) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: geography[], elem: geography) &rarr; <a

class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: geometry[], elem: geometry) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: jsonb[], elem: jsonb) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: oid[], elem: oid) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: pglsn[], elem: pglsn) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: refcursor[], elem: refcursor) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: timetz[], elem: timetz) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: tuple[], elem: tuple) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraypositions"></a><code>arraypositions(array: varbit[], elem: varbit) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Returns and array of indexes of all occurrences of <code>elem</code> in <code>array</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="bool.html">bool</a>, array: <a href="bool.html">bool</a>[]) &rarr; <a href="bool.html">bool</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="bytes.html">bytes</a>, array: <a href="bytes.html">bytes</a>[]) &rarr; <a href="bytes.html">bytes</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="date.html">date</a>, array: <a href="date.html">date</a>[]) &rarr; <a href="date.html">date</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="decimal.html">decimal</a>, array: <a href="decimal.html">decimal</a>[]) &rarr; <a href="decimal.html">decimal</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="float.html">float</a>, array: <a href="float.html">float</a>[]) &rarr; <a href="float.html">float</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="inet.html">inet</a>, array: <a href="inet.html">inet</a>[]) &rarr; <a href="inet.html">inet</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="int.html">int</a>, array: <a href="int.html">int</a>[]) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="interval.html">interval</a>, array: <a href="interval.html">interval</a>[]) &rarr; <a href="interval.html">interval</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="string.html">string</a>, array: <a href="string.html">string</a>[]) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="time.html">time</a>, array: <a href="time.html">time</a>[]) &rarr; <a href="time.html">time</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="timestamp.html">timestamp</a>, array: <a href="timestamp.html">timestamp</a>[]) &rarr; <a href="timestamp.html">timestamp</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="timestamp.html">timestamptz</a>, array: <a href="timestamp.html">timestamptz</a>[]) &rarr; <a href="timestamp.html">timestamptz</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: <a href="uuid.html">uuid</a>, array: <a href="uuid.html">uuid</a>[]) &rarr; <a href="uuid.html">uuid</a>[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: anyenum, array: anyenum[]) &rarr; anyenum[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: box2d, array: box2d[]) &rarr; box2d[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: geography, array: geography[]) &rarr; geography[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: geometry, array: geometry[]) &rarr; geometry[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: jsonb, array: jsonb[]) &rarr; jsonb[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: oid, array: oid[]) &rarr; oid[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: pglsn, array: pglsn[]) &rarr; pg_lsn[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: refcursor, array: refcursor[]) &rarr; refcursor[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: timetz, array: timetz[]) &rarr; timetz[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: tuple, array: tuple[]) &rarr; tuple[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayprepend"></a><code>arrayprepend(elem: varbit, array: varbit[]) &rarr; varbit[]</code></td><td><span class="funcdesc"><p>Prepends <code>elem</code> to <code>array</code>, returning the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="bool.html">bool</a>[], elem: <a href="bool.html">bool</a>) &rarr; <a

class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="bytes.html">bytes</a>[], elem: <a href="bytes.html">bytes</a>) &rarr; <a href="bytes.html">bytes</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="date.html">date</a>[], elem: <a href="date.html">date</a>) &rarr; <a href="date.html">date</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="decimal.html">decimal</a>[], elem: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="float.html">float</a>[], elem: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="inet.html">inet</a>[], elem: <a href="inet.html">inet</a>) &rarr; <a href="inet.html">inet</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="int.html">int</a>[], elem: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="interval.html">interval</a>[], elem: <a href="interval.html">interval</a>) &rarr; <a href="interval.html">interval</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="string.html">string</a>[], elem: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="time.html">time</a>[], elem: <a href="time.html">time</a>) &rarr; <a href="time.html">time</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="timestamp.html">timestamp</a>[], elem: <a href="timestamp.html">timestamp</a>) &rarr; <a href="timestamp.html">timestamp</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="timestamp.html">timestamptz</a>[], elem: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="timestamp.html">timestamptz</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: <a href="uuid.html">uuid</a>[], elem: <a href="uuid.html">uuid</a>) &rarr; <a href="uuid.html">uuid</a>[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: anyenum[], elem: anyenum) &rarr; anyenum[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: box2d[], elem: box2d) &rarr; box2d[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: geography[], elem: geography) &rarr; geography[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: geometry[], elem: geometry) &rarr; geometry[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: jsonb[], elem: jsonb) &rarr; jsonb[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: oid[], elem: oid) &rarr; oid[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: pglsn[], elem: pglsn) &rarr; pg_lsn[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: refcursor[], elem: refcursor) &rarr; refcursor[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: timetz[], elem: timetz) &rarr; timetz[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: tuple[], elem: tuple) &rarr; tuple[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayremove"></a><code>arrayremove(array: varbit[], elem: varbit) &rarr; varbit[]</code></td><td><span class="funcdesc"><p>Remove from <code>array</code> all elements equal to <code>elem</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="bool.html">bool</a>[], toreplace: <a href="bool.html">bool</a>, replacewith: <a href="bool.html">bool</a>) &rarr; <a href="bool.html">bool</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="bytes.html">bytes</a>[], toreplace: <a href="bytes.html">bytes</a>, replacewith: <a href="bytes.html">bytes</a>) &rarr; <a href="bytes.html">bytes</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="date.html">date</a>[], toreplace: <a href="date.html">date</a>, replacewith: <a href="date.html">date</a>) &rarr; <a href="date.html">date</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="decimal.html">decimal</a>[], toreplace: <a href="decimal.html">decimal</a>, replacewith: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="float.html">float</a>[], toreplace: <a href="float.html">float</a>, replacewith: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="inet.html">inet</a>[], toreplace: <a href="inet.html">inet</a>, replacewith: <a href="inet.html">inet</a>) &rarr; <a href="inet.html">inet</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="int.html">int</a>[], toreplace: <a href="int.html">int</a>, replacewith: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="interval.html">interval</a>[], toreplace: <a href="interval.html">interval</a>, replacewith: <a href="interval.html">interval</a>) &rarr; <a href="interval.html">interval</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with

</span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="string.html">string</a>[], toreplace: <a href="string.html">string</a>, replacewith: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="time.html">time</a>[], toreplace: <a href="time.html">time</a>, replacewith: <a href="time.html">time</a>) &rarr; <a href="time.html">time</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="timestamp.html">timestamp</a>[], toreplace: <a href="timestamp.html">timestamp</a>, replacewith: <a href="timestamp.html">timestamp</a>) &rarr; <a href="timestamp.html">timestamp</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="timestamp.html">timestamptz</a>[], toreplace: <a href="timestamp.html">timestamptz</a>, replacewith: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="timestamp.html">timestamptz</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: <a href="uuid.html">uuid</a>[], toreplace: <a href="uuid.html">uuid</a>, replacewith: <a href="uuid.html">uuid</a>) &rarr; <a href="uuid.html">uuid</a>[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: anyenum[], toreplace: anyenum, replacewith: anyenum) &rarr; anyenum[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: box2d[], toreplace: box2d, replacewith: box2d) &rarr; box2d[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: geography[], toreplace: geography, replacewith: geography) &rarr; geography[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: geometry[], toreplace: geometry, replacewith: geometry) &rarr; geometry[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: jsonb[], toreplace: jsonb, replacewith: jsonb) &rarr; jsonb[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: oid[], toreplace: oid, replacewith: oid) &rarr; oid[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: pglsn[], toreplace: pglsn, replacewith: pglsn) &rarr; pglsn[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: refcursor[], toreplace: refcursor, replacewith: refcursor) &rarr; refcursor[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: timetz[], toreplace: timetz, replacewith: timetz) &rarr; timetz[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: tuple[], toreplace: tuple, replacewith: tuple) &rarr; tuple[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arrayreplace"></a><code>arrayreplace(array: varbit[], toreplace: varbit, replacewith: varbit) &rarr; varbit[]</code></td><td><span class="funcdesc"><p>Replace all occurrences of <code>toreplace</code> in <code>array</code> with <code>replacewith</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="arraytostring"></a><code>arraytostring(input: anyelement[], delim: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Join an array into a string with a delimiter.</p> </span></td><td>Stable</td></tr> <tr><td><a name="arraytostring"></a><code>arraytostring(input: anyelement[], delimiter: <a href="string.html">string</a>, null: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Join an array into a string with a delimiter, replacing NULLs with a null string.</p> </span></td><td>Stable</td></tr> <tr><td><a name="arrayupper"></a><code>arrayupper(input: anyelement[], arraydimension: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the maximum value of <code>input</code> on the provided <code>arraydimension</code>. However, because CockroachDB doesnt yet support multi-dimensional arrays, the only supported <code>array_dimension</code> is <strong>1</strong>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="cardinality"></a><code>cardinality(input: anyelement[]) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of elements contained in <code>input</code></p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbarraytostringarray"></a><code>jsonbarraytostringarray(input: jsonb) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Convert a JSONB array into a string array.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stringtoarray"></a><code>stringtoarray(str: <a href="string.html">string</a>, delimiter: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Split a string into components on a delimiter.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stringtoarray"></a><code>stringtoarray(str: <a href="string.html">string</a>, delimiter: <a href="string.html">string</a>, null: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Split a string into components on a delimiter with a specified string to consider NULL.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="ilikeescape"></a><code>ilikeescape(unescaped: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>, escape: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Matches case insensetively <code>unescaped</code> with <code>pattern</code> using <code>escape</code> as an escape token.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="inetcontainedbyorequals"></a><code>inetcontainedbyorequals(val: <a href="inet.html">inet</a>, container: <a href="inet.html">inet</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Test for subnet inclusion or equality, using only the network parts of the addresses. The host part of the addresses is ignored.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="inetcontainsorequals"></a><code>inetcontainsorequals(container: <a href="inet.html">inet</a>, val: <a href="inet.html">inet</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Test for subnet inclusion or equality, using only the network parts of the addresses. The host part of the addresses is ignored.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="inetsamefamily"></a><code>inetsamefamily(val: <a href="inet.html">inet</a>, val: <a href="inet.html">inet</a>) &rarr; <a

class="funcdesc"><p>Checks if two IP addresses are of the same IP family.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="likeescape"></a><code>likeescape(unescaped: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>, escape: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Matches <code>unescaped</code> with <code>pattern</code> using <code>escape</code> as an escape token.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="notilikeescape"></a><code>notilikeescape(unescaped: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>, escape: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Checks whether <code>unescaped</code> not matches case insensetively with <code>pattern</code> using <code>escape</code> as an escape token.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="notlikeescape"></a><code>notlikeescape(unescaped: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>, escape: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Checks whether <code>unescaped</code> not matches with <code>pattern</code> using <code>escape</code> as an escape token.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="notsimilartoescape"></a><code>notsimilartoescape(unescaped: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>, escape: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Checks whether <code>unescaped</code> not matches with <code>pattern</code> using <code>escape</code> as an escape token.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="greatest"></a><code>greatest(anyelement...) &rarr; anyelement</code></td><td><span class="funcdesc"><p>Returns the element with the greatest value.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="least"></a><code>least(anyelement...) &rarr; anyelement</code></td><td><span class="funcdesc"><p>Returns the element with the lowest value.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="numnonnulls"></a><code>numnonnulls(anyelement...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of nonnull arguments.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="numnulls"></a><code>numnulls(anyelement...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of null arguments.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="crypt"></a><code>crypt(password: <a href="string.html">string</a>, salt: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Generates a hash based on a password and salt. The hash algorithm and number of rounds if applicable are encoded in the salt.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="decrypt"></a><code>decrypt(data: <a href="bytes.html">bytes</a>, key: <a href="bytes.html">bytes</a>, type: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Decrypt <code>data</code> with <code>key</code> using the cipher method specified by <code>type</code>.</p> <p>The cipher type must have the format <code>&lt;algorithm&gt;</code> where:</p> <ul> <li><code>&lt;algorithm&gt;</code> is <code>aes</code></li> <li><code>&lt;mode&gt;</code> is <code>cbc</code> (default)</li> <li><code>&lt;padding&gt;</code> is <code>pkcs</code> (default) or <code>none</code></li> </ul> <p>This function requires an enterprise license on a CCL distribution.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="decryptiv"></a><code>decryptiv(data: <a href="bytes.html">bytes</a>, key: <a href="bytes.html">bytes</a>, iv: <a href="bytes.html">bytes</a>, type: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Decrypt <code>data</code> with <code>key</code> using the cipher method specified by <code>type</code>. If the mode is CBC, the provided <code>iv</code> will be used. Otherwise, it will be ignored.</p> <p>The cipher type must have the format <code>&lt;algorithm&gt;</code> where:</p> <ul> <li><code>&lt;algorithm&gt;</code> is <code>aes</code></li> <li><code>&lt;mode&gt;</code> is <code>cbc</code> (default)</li> <li><code>&lt;padding&gt;</code> is <code>pkcs</code> (default) or <code>none</code></li> </ul> <p>This function requires an enterprise license on a CCL distribution.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="digest"></a><code>digest(data: <a href="bytes.html">bytes</a>, type: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Computes a binary hash of the given <code>data</code>. <code>type</code> is the algorithm to use (md5, sha1, sha224, sha256, sha384, or sha512).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="digest"></a><code>digest(data: <a href="string.html">string</a>, type: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Computes a binary hash of the given <code>data</code>. <code>type</code> is the algorithm to use (md5, sha1, sha224, sha256, sha384, or sha512).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="encrypt"></a><code>encrypt(data: <a href="bytes.html">bytes</a>, key: <a href="bytes.html">bytes</a>, type: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Encrypt <code>data</code> with <code>key</code> using the cipher method specified by <code>type</code>.</p> <p>The cipher type must have the format <code>&lt;algorithm&gt;</code> where:</p> <ul> <li><code>&lt;algorithm&gt;</code> is <code>aes</code></li> <li><code>&lt;mode&gt;</code> is <code>cbc</code> (default)</li> <li><code>&lt;padding&gt;</code> is <code>pkcs</code> (default) or <code>none</code></li> </ul> <p>This function requires an enterprise license on a CCL distribution.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="encryptiv"></a><code>encryptiv(data: <a href="bytes.html">bytes</a>, key: <a href="bytes.html">bytes</a>, iv: <a href="bytes.html">bytes</a>, type: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Encrypt <code>data</code> with <code>key</code> using the cipher method specified by <code>type</code>. If the mode is CBC, the provided <code>iv</code> will be used. Otherwise, it will be ignored.</p> <p>The cipher type must have the format <code>&lt;algorithm&gt;</code> where:</p> <ul> <li><code>&lt;algorithm&gt;</code> is <code>aes</code></li> <li><code>&lt;mode&gt;</code> is <code>cbc</code> (default)</li> <li><code>&lt;padding&gt;</code> is <code>pkcs</code> (default) or <code>none</code></li> </ul> <p>This function requires an enterprise license on a CCL distribution.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="genrandombytes"></a><code>genrandombytes(count: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns <code>count</code> cryptographically strong random bytes. At most 1024 bytes can be extracted at a time.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="gensalt"></a><code>gensalt(type: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Generates a salt for input into the <code>crypt</code> function using the default number of

</span></td><td>Volatile</td></tr> <tr><td><a name="gensalt"></a><code>gensalt(type: <a href="string.html">string</a>, itercount: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Generates a salt for input into the <code>crypt</code> function using <code>itercount</code> number of rounds.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="hmac"></a><code>hmac(data: <a href="bytes.html">bytes</a>, key: <a href="bytes.html">bytes</a>, type: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Calculates hashed MAC for <code>data</code> with key <code>key</code>. <code>type</code> is the same as in <code>digest()</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="hmac"></a><code>hmac(data: <a href="string.html">string</a>, key: <a href="string.html">string</a>, type: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Calculates hashed MAC for <code>data</code> with key <code>key</code>. <code>type</code> is the same as in <code>digest()</code>.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="hlctotimestamp"></a><code>hlctotimestamp(hlc: <a href="decimal.html">decimal</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns a TimestampTZ representation of a CockroachDB HLC in decimal form.</p> <p>Note that a TimestampTZ has less precision than a CockroachDB HLC. It is intended as a convenience function to display HLCs in a print-friendly form. Use the decimal value if you rely on the HLC for accuracy.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="age"></a><code>age(end: <a href="timestamp.html">timestamptz</a>, begin: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="interval.html">interval</a></code></td><td><span class="funcdesc"><p>Calculates the interval between <code>begin</code> and <code>end</code>, normalized into years, months and days.</p> <p>Note this may not be an accurate time span since years and months are normalized from days, and years and months are out of context. To avoid normalizing days into months and years, use the timestamptz subtraction operator.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="age"></a><code>age(val: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="interval.html">interval</a></code></td><td><span class="funcdesc"><p>Calculates the interval between <code>val</code> and the current time, normalized into years, months and days.</p> <p>Note this may not be an accurate time span since years and months are normalized from days, and years and months are out of context. To avoid normalizing days into months and years, use <code>now() - timestamptz</code>.</p> </span></td><td>Stable</td></tr> <tr><td><a name="clocktimestamp"></a><code>clocktimestamp() &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Returns the current system time on one of the cluster nodes.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="clocktimestamp"></a><code>clocktimestamp() &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns the current system time on one of the cluster nodes.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="currentdate"></a><code>currentdate() &rarr; <a href="date.html">date</a></code></td><td><span class="funcdesc"><p>Returns the date of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currenttimestamp"></a><code>currenttimestamp() &rarr; <a href="date.html">date</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currenttimestamp"></a><code>currenttimestamp() &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currenttimestamp"></a><code>currenttimestamp() &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> <p>This function is the preferred overload and will be evaluated by default.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currenttimestamp"></a><code>currenttimestamp(precision: <a href="int.html">int</a>) &rarr; <a href="date.html">date</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currenttimestamp"></a><code>currenttimestamp(precision: <a href="int.html">int</a>) &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currenttimestamp"></a><code>currenttimestamp(precision: <a href="int.html">int</a>) &rarr; <a

class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> <p>This function is the preferred overload and will be evaluated by default.</p> </span></td><td>Stable</td></tr> <tr><td><a name="datepart"></a><code>datepart(element: <a href="string.html">string</a>, input: <a href="date.html">date</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: millennium, century, decade, year, isoyear, quarter, month, week, dayofweek, isodow, dayofyear, julian, hour, minute, second, millisecond, microsecond, epoch</p> </span></td><td>Immutable</td></tr> <tr><td><a name="datepart"></a><code>datepart(element: <a href="string.html">string</a>, input: <a href="interval.html">interval</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: millennium, century, decade, year, month, day, hour, minute, second, millisecond, microsecond, epoch</p> </span></td><td>Immutable</td></tr> <tr><td><a name="datepart"></a><code>datepart(element: <a href="string.html">string</a>, input: <a href="time.html">time</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: hour, minute, second, millisecond, microsecond, epoch</p> </span></td><td>Immutable</td></tr> <tr><td><a name="datepart"></a><code>datepart(element: <a href="string.html">string</a>, input: <a href="timestamp.html">timestamp</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: millennium, century, decade, year, isoyear, quarter, month, week, dayofweek, isodow, dayofyear, julian, hour, minute, second, millisecond, microsecond, epoch</p> </span></td><td>Immutable</td></tr> <tr><td><a name="datepart"></a><code>datepart(element: <a href="string.html">string</a>, input: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: millennium, century, decade, year, isoyear, quarter, month, week, dayofweek, isodow, dayofyear, julian, hour, minute, second, millisecond, microsecond, epoch, timezone, timezonehour, timezoneminute</p> </span></td><td>Stable</td></tr> <tr><td><a name="datepart"></a><code>datepart(element: <a href="string.html">string</a>, input: timetz) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: hour, minute, second, millisecond, microsecond, epoch, timezone, timezonehour, timezoneminute</p> </span></td><td>Immutable</td></tr> <tr><td><a name="datetrunc"></a><code>datetrunc(element: <a href="string.html">string</a>, input: <a href="date.html">date</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Truncates <code>input</code> to precision <code>element</code>. Sets all fields that are less significant than <code>element</code> to zero (or one, for day and month)</p> <p>Compatible elements: millennium, century, decade, year, quarter, month, week, day, hour, minute, second, millisecond, microsecond.</p> </span></td><td>Stable</td></tr> <tr><td><a name="datetrunc"></a><code>datetrunc(element: <a href="string.html">string</a>, input: <a href="interval.html">interval</a>) &rarr; <a href="interval.html">interval</a></code></td><td><span class="funcdesc"><p>Truncates <code>input</code> to precision <code>element</code>. Sets all fields that are less significant than <code>element</code> to zero (or one, for day and month)</p> <p>Compatible elements: millennium, century, decade, year, quarter, month, week, day, hour, minute, second, millisecond, microsecond.</p> </span></td><td>Stable</td></tr> <tr><td><a name="datetrunc"></a><code>datetrunc(element: <a href="string.html">string</a>, input: <a href="time.html">time</a>) &rarr; <a href="interval.html">interval</a></code></td><td><span class="funcdesc"><p>Truncates <code>input</code> to precision <code>element</code>. Sets all fields that are less significant than <code>element</code> to zero.</p> <p>Compatible elements: hour, minute, second, millisecond, microsecond.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="datetrunc"></a><code>datetrunc(element: <a href="string.html">string</a>, input: <a href="timestamp.html">timestamp</a>) &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Truncates <code>input</code> to precision <code>element</code>. Sets all fields that are less significant than <code>element</code> to zero (or one, for day and month)</p> <p>Compatible elements: millennium, century, decade, year, quarter, month, week, day, hour, minute, second, millisecond, microsecond.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="datetrunc"></a><code>datetrunc(element: <a href="string.html">string</a>, input: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Truncates <code>input</code> to precision <code>element</code>. Sets all fields that are less significant than <code>element</code> to zero (or one, for day and month)</p> <p>Compatible elements: millennium, century, decade, year, quarter, month, week, day, hour, minute, second, millisecond, microsecond.</p> </span></td><td>Stable</td></tr> <tr><td><a name="datetrunc"></a><code>datetrunc(element: <a href="string.html">string</a>, input: <a href="timestamp.html">timestamptz</a>, timezone: <a href="string.html">string</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Truncates <code>input</code> to precision <code>element</code> in the specified <code>timezone</code>. Sets all fields that are less significant than <code>element</code> to zero (or one, for day and month)</p> <p>Compatible elements: millennium, century, decade, year, quarter, month, week, day, hour, minute, second, millisecond, microsecond.</p> </span></td><td>Stable</td></tr> <tr><td><a name="experimentalfollowerreadtimestamp"></a><code>experimentalfollowerreadtimestamp() &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Same as followerreadtimestamp. This name is deprecated.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="experimentalstrftime"></a><code>experimentalstrftime(input: <a href="date.html">date</a>, extractformat: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>From <code>input</code>, extracts and formats the time as identified in <code>extractformat</code> using standard <code>strftime</code> notation (though not all formatting is supported).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="experimentalstrftime"></a><code>experimentalstrftime(input: <a href="timestamp.html">timestamp</a>, extractformat: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>From <code>input</code>, extracts and formats the time as identified in <code>extractformat</code> using standard <code>strftime</code> notation (though not all formatting is

</span></td><td>Immutable</td></tr> <tr><td><a name="experimentalstrftime"></a><code>experimentalstrftime(input: <a href="timestamp.html">timestamptz</a>, extractformat: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>From <code>input</code>, extracts and formats the time as identified in <code>extractformat</code> using standard <code>strftime</code> notation (though not all formatting is supported).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="experimentalstrptime"></a><code>experimentalstrptime(input: <a href="string.html">string</a>, format: <a href="string.html">string</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns <code>input</code> as a timestamptz using <code>format</code> (which uses standard <code>strptime</code> formatting).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="extract"></a><code>extract(element: <a href="string.html">string</a>, input: <a href="date.html">date</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: millennium, century, decade, year, isoyear, quarter, month, week, dayofweek, isodow, dayofyear, julian, hour, minute, second, millisecond, microsecond, epoch</p> </span></td><td>Immutable</td></tr> <tr><td><a name="extract"></a><code>extract(element: <a href="string.html">string</a>, input: <a href="interval.html">interval</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: millennium, century, decade, year, month, day, hour, minute, second, millisecond, microsecond, epoch</p> </span></td><td>Immutable</td></tr> <tr><td><a name="extract"></a><code>extract(element: <a href="string.html">string</a>, input: <a href="time.html">time</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: hour, minute, second, millisecond, microsecond, epoch</p> </span></td><td>Immutable</td></tr> <tr><td><a name="extract"></a><code>extract(element: <a href="string.html">string</a>, input: <a href="timestamp.html">timestamp</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: millennium, century, decade, year, isoyear, quarter, month, week, dayofweek, isodow, dayofyear, julian, hour, minute, second, millisecond, microsecond, epoch</p> </span></td><td>Immutable</td></tr> <tr><td><a name="extract"></a><code>extract(element: <a href="string.html">string</a>, input: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: millennium, century, decade, year, isoyear, quarter, month, week, dayofweek, isodow, dayofyear, julian, hour, minute, second, millisecond, microsecond, epoch, timezone, timezonehour, timezoneminute</p> </span></td><td>Stable</td></tr> <tr><td><a name="extract"></a><code>extract(element: <a href="string.html">string</a>, input: timetz) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>.</p> <p>Compatible elements: hour, minute, second, millisecond, microsecond, epoch, timezone, timezonehour, timezoneminute</p> </span></td><td>Immutable</td></tr> <tr><td><a name="extractduration"></a><code>extractduration(element: <a href="string.html">string</a>, input: <a href="interval.html">interval</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Extracts <code>element</code> from <code>input</code>. Compatible elements: hour, minute, second, millisecond, microsecond. This is deprecated in favor of <code>extract</code> which supports duration.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="followerreadtimestamp"></a><code>followerreadtimestamp() &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns a timestamp which is very likely to be safe to perform against a follower replica.</p> <p>This function is intended to be used with an AS OF SYSTEM TIME clause to perform historical reads against a time which is recent but sufficiently old for reads to be performed against the closest replica as opposed to the currently leaseholder for a given range.</p> <p>Note that this function requires an enterprise license on a CCL distribution to return a result that is less likely the closest replica. It is otherwise hardcoded as -4.8s from the statement time, which may not result in reading from the nearest replica.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="localtimestamp"></a><code>localtimestamp() &rarr; <a href="date.html">date</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="localtimestamp"></a><code>localtimestamp() &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> <p>This function is the preferred overload and will be evaluated by default.</p> </span></td><td>Stable</td></tr> <tr><td><a name="localtimestamp"></a><code>localtimestamp() &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="localtimestamp"></a><code>localtimestamp(precision: <a href="int.html">int</a>) &rarr; <a href="date.html">date</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="localtimestamp"></a><code>localtimestamp(precision: <a href="int.html">int</a>) &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Returns the time of the current

<p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> <p>This function is the preferred overload and will be evaluated by default.</p> </span></td><td>Stable</td></tr> <tr><td><a name="localtimestamp"></a><code>localtimestamp(precision: <a href="int.html">int</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="makedate"></a><code>makedate(year: <a href="int.html">int</a>, month: <a href="int.html">int</a>, day: <a href="int.html">int</a>) &rarr; <a href="date.html">date</a></code></td><td><span class="funcdesc"><p>Create date (formatted according to ISO 8601) from year, month, and day fields (negative years signify BC).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="maketimestamp"></a><code>maketimestamp(year: <a href="int.html">int</a>, month: <a href="int.html">int</a>, day: <a href="int.html">int</a>, hour: <a href="int.html">int</a>, min: <a href="int.html">int</a>, sec: <a href="float.html">float</a>) &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Create timestamp (formatted according to ISO 8601) from year, month, day, hour, minute, and seconds fields (negative years signify BC).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="maketimestamptz"></a><code>maketimestamptz(year: <a href="int.html">int</a>, month: <a href="int.html">int</a>, day: <a href="int.html">int</a>, hour: <a href="int.html">int</a>, min: <a href="int.html">int</a>, sec: <a href="float.html">float</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Create timestamp (formatted according to ISO 8601) with time zone from year, month, day, hour, minute and seconds fields (negative years signify BC). If timezone is not specified, the current time zone is used.</p> </span></td><td>Stable</td></tr> <tr><td><a name="maketimestamptz"></a><code>maketimestamptz(year: <a href="int.html">int</a>, month: <a href="int.html">int</a>, day: <a href="int.html">int</a>, hour: <a href="int.html">int</a>, min: <a href="int.html">int</a>, sec: <a href="float.html">float</a>, timezone: <a href="string.html">string</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Create timestamp (formatted according to ISO 8601) with time zone from year, month, day, hour, minute and seconds fields (negative years signify BC). If timezone is not specified, the current time zone is used.</p> </span></td><td>Stable</td></tr> <tr><td><a name="now"></a><code>now() &rarr; <a href="date.html">date</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="now"></a><code>now() &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="now"></a><code>now() &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> <p>This function is the preferred overload and will be evaluated by default.</p> </span></td><td>Stable</td></tr> <tr><td><a name="overlaps"></a><code>overlaps(s1: <a href="date.html">date</a>, e1: <a href="date.html">date</a>, s1: <a href="date.html">date</a>, e2: <a href="date.html">date</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns if two time periods (defined by their endpoints) overlap.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="overlaps"></a><code>overlaps(s1: <a href="date.html">date</a>, e1: <a href="interval.html">interval</a>, s1: <a href="date.html">date</a>, e2: <a href="interval.html">interval</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns if two time periods (defined by their endpoints) overlap.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="overlaps"></a><code>overlaps(s1: <a href="time.html">time</a>, e1: <a href="interval.html">interval</a>, s1: <a href="time.html">time</a>, e2: <a href="interval.html">interval</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns if two time periods (defined by their endpoints) overlap.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="overlaps"></a><code>overlaps(s1: <a href="time.html">time</a>, e1: <a href="time.html">time</a>, s1: <a href="time.html">time</a>, e2: <a href="time.html">time</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns if two time periods (defined by their endpoints) overlap.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="overlaps"></a><code>overlaps(s1: <a href="timestamp.html">timestamp</a>, e1: <a href="interval.html">interval</a>, s1: <a href="timestamp.html">timestamp</a>, e2: <a href="interval.html">interval</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns if two time periods (defined by their endpoints) overlap.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="overlaps"></a><code>overlaps(s1: <a href="timestamp.html">timestamp</a>, e1: <a href="timestamp.html">timestamp</a>, s1: <a href="timestamp.html">timestamp</a>, e2: <a href="timestamp.html">timestamp</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns if two time periods (defined by their endpoints) overlap.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="overlaps"></a><code>overlaps(s1: <a href="timestamp.html">timestamptz</a>, e1: <a href="interval.html">interval</a>, s1: <a href="timestamp.html">timestamptz</a>, e2: <a href="interval.html">interval</a>) &rarr; <a

class="funcdesc"><p>Returns if two time periods (defined by their endpoints) overlap.</p> </span></td><td>Stable</td></tr> <tr><td><a name="overlaps"></a><code>overlaps(s1: <a href="timestamp.html">timestamptz</a>, e1: <a href="timestamp.html">timestamptz</a>, s1: <a href="timestamp.html">timestamptz</a>, e2: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns if two time periods (defined by their endpoints) overlap.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="overlaps"></a><code>overlaps(s1: timetz, e1: <a href="interval.html">interval</a>, s1: timetz, e2: <a href="interval.html">interval</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns if two time periods (defined by their endpoints) overlap.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="overlaps"></a><code>overlaps(s1: timetz, e1: timetz, s1: timetz, e2: timetz) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns if two time periods (defined by their endpoints) overlap.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="statementtimestamp"></a><code>statementtimestamp() &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Returns the start time of the current statement.</p> </span></td><td>Stable</td></tr> <tr><td><a name="statementtimestamp"></a><code>statementtimestamp() &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns the start time of the current statement.</p> </span></td><td>Stable</td></tr> <tr><td><a name="strftime"></a><code>strftime(input: <a href="date.html">date</a>, extractformat: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>From <code>input</code>, extracts and formats the time as identified in <code>extractformat</code> using standard <code>strftime</code> notation (though not all formatting is supported).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strftime"></a><code>strftime(input: <a href="timestamp.html">timestamp</a>, extractformat: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>From <code>input</code>, extracts and formats the time as identified in <code>extractformat</code> using standard <code>strftime</code> notation (though not all formatting is supported).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strftime"></a><code>strftime(input: <a href="timestamp.html">timestamptz</a>, extractformat: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>From <code>input</code>, extracts and formats the time as identified in <code>extractformat</code> using standard <code>strftime</code> notation (though not all formatting is supported).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strptime"></a><code>strptime(input: <a href="string.html">string</a>, format: <a href="string.html">string</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns <code>input</code> as a timestamptz using <code>format</code> (which uses standard <code>strptime</code> formatting).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="timeofday"></a><code>timeofday() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the current system time on one of the cluster nodes as a string.</p> </span></td><td>Stable</td></tr> <tr><td><a name="timezone"></a><code>timezone(timezone: <a href="string.html">string</a>, time: <a href="time.html">time</a>) &rarr; timetz</code></td><td><span class="funcdesc"><p>Treat given time without time zone as located in the specified time zone.</p> </span></td><td>Stable</td></tr> <tr><td><a name="timezone"></a><code>timezone(timezone: <a href="string.html">string</a>, timestamp: <a href="timestamp.html">timestamp</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Treat given time stamp without time zone as located in the specified time zone.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="timezone"></a><code>timezone(timezone: <a href="string.html">string</a>, timestamptz: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Convert given time stamp with time zone to the new time zone, with no time zone designation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="timezone"></a><code>timezone(timezone: <a href="string.html">string</a>, timestamptz_string: <a href="string.html">string</a>) &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Convert given time stamp with time zone to the new time zone, with no time zone designation.</p> </span></td><td>Stable</td></tr> <tr><td><a name="timezone"></a><code>timezone(timezone: <a href="string.html">string</a>, timetz: timetz) &rarr; timetz</code></td><td><span class="funcdesc"><p>Convert given time with time zone to the new time zone.</p> </span></td><td>Stable</td></tr> <tr><td><a name="tochar"></a><code>tochar(date: <a href="date.html">date</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert an date to a string assuming the ISO, MDY DateStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tochar"></a><code>tochar(date: <a href="date.html">date</a>, format: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert a timestamp with time zone to a string using the given format.</p> </span></td><td>Stable</td></tr> <tr><td><a name="tochar"></a><code>tochar(interval: <a href="interval.html">interval</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert an interval to a string assuming the Postgres IntervalStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tochar"></a><code>tochar(interval: <a href="interval.html">interval</a>, format: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert an interval to a string using the given format.</p> </span></td><td>Stable</td></tr> <tr><td><a name="tochar"></a><code>tochar(timestamp: <a href="timestamp.html">timestamp</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert an timestamp to a string assuming the ISO, MDY DateStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tochar"></a><code>tochar(timestamp: <a href="timestamp.html">timestamp</a>, format: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert an timestamp to a string using the given format.</p> </span></td><td>Stable</td></tr> <tr><td><a name="tochar"></a><code>tochar(timestamptz: <a href="timestamp.html">timestamptz</a>, format: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert a timestamp with time zone to a string using the given format.</p> </span></td><td>Stable</td></tr> <tr><td><a name="totimestamp"></a><code>totimestamp(timestamp: <a href="float.html">float</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to timestamp with time zone.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="transactiontimestamp"></a><code>transactiontimestamp() &rarr; <a href="date.html">date</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="transactiontimestamp"></a><code>transactiontimestamp() &rarr; <a

class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> </span></td><td>Stable</td></tr> <tr><td><a name="transactiontimestamp"></a><code>transactiontimestamp() &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Returns the time of the current transaction.</p> <p>The value is based on a timestamp picked when the transaction starts and which stays constant throughout the transaction. This timestamp has no relationship with the commit order of concurrent transactions.</p> <p>This function is the preferred overload and will be evaluated by default.</p> </span></td><td>Stable</td></tr> <tr><td><a name="withmaxstaleness"></a><code>withmaxstaleness(max_staleness: <a href="interval.html">interval</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>When used in the AS OF SYSTEM TIME clause of an single-statement, read-only transaction, CockroachDB chooses the newest timestamp within the staleness bound that allows execution of the reads at the nearest available replica without blocking.</p> <p>Note this function requires an enterprise license on a CCL distribution.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="withmaxstaleness"></a><code>withmaxstaleness(maxstaleness: <a href="interval.html">interval</a>, nearestonly: <a href="bool.html">bool</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>When used in the AS OF SYSTEM TIME clause of an single-statement, read-only transaction, CockroachDB chooses the newest timestamp within the staleness bound that allows execution of the reads at the nearest available replica without blocking.</p> <p>If nearest_only is set to true, reads that cannot be served using the nearest available replica will error.</p> <p>Note this function requires an enterprise license on a CCL distribution.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="withmintimestamp"></a><code>withmintimestamp(min_timestamp: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>When used in the AS OF SYSTEM TIME clause of an single-statement, read-only transaction, CockroachDB chooses the newest timestamp before the min_timestamp that allows execution of the reads at the nearest available replica without blocking.</p> <p>Note this function requires an enterprise license on a CCL distribution.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="withmintimestamp"></a><code>withmintimestamp(mintimestamp: <a href="timestamp.html">timestamptz</a>, nearestonly: <a href="bool.html">bool</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>When used in the AS OF SYSTEM TIME clause of an single-statement, read-only transaction, CockroachDB chooses the newest timestamp before the min_timestamp that allows execution of the reads at the nearest available replica without blocking.</p> <p>If nearest_only is set to true, reads that cannot be served using the nearest available replica will error.</p> <p>Note this function requires an enterprise license on a CCL distribution.</p> </span></td><td>Volatile</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="enumfirst"></a><code>enumfirst(val: anyenum) &rarr; anyenum</code></td><td><span class="funcdesc"><p>Returns the first value of the input enum type.</p> </span></td><td>Stable</td></tr> <tr><td><a name="enumlast"></a><code>enumlast(val: anyenum) &rarr; anyenum</code></td><td><span class="funcdesc"><p>Returns the last value of the input enum type.</p> </span></td><td>Stable</td></tr> <tr><td><a name="enumrange"></a><code>enumrange(lower: anyenum, upper: anyenum) &rarr; anyenum[]</code></td><td><span class="funcdesc"><p>Returns all values of the input enum in an ordered array between the two arguments (inclusive).</p> </span></td><td>Stable</td></tr> <tr><td><a name="enumrange"></a><code>enumrange(val: anyenum) &rarr; anyenum[]</code></td><td><span class="funcdesc"><p>Returns all values of the input enum in an ordered array.</p> </span></td><td>Stable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="abs"></a><code>abs(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates the absolute value of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="abs"></a><code>abs(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the absolute value of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="abs"></a><code>abs(val: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the absolute value of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="acos"></a><code>acos(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse cosine of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="acosd"></a><code>acosd(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse cosine of <code>val</code> with the result in degrees</p> </span></td><td>Immutable</td></tr> <tr><td><a name="acosh"></a><code>acosh(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse hyperbolic cosine of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="asin"></a><code>asin(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse sine of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="asind"></a><code>asind(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse sine of <code>val</code> with the result in degrees.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="asinh"></a><code>asinh(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse hyperbolic sine of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="atan"></a><code>atan(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse tangent of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="atan2"></a><code>atan2(x: <a

y: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse tangent of <code>x</code>/<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="atan2d"></a><code>atan2d(x: <a href="float.html">float</a>, y: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse tangent of <code>x</code>/<code>y</code> with the result in degrees</p> </span></td><td>Immutable</td></tr> <tr><td><a name="atand"></a><code>atand(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse tangent of <code>val</code> with the result in degrees.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="atanh"></a><code>atanh(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the inverse hyperbolic tangent of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="cbrt"></a><code>cbrt(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates the cube root () of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="cbrt"></a><code>cbrt(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the cube root () of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ceil"></a><code>ceil(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates the smallest integer not smaller than <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ceil"></a><code>ceil(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the smallest integer not smaller than <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ceil"></a><code>ceil(val: <a href="int.html">int</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the smallest integer not smaller than <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ceiling"></a><code>ceiling(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates the smallest integer not smaller than <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ceiling"></a><code>ceiling(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the smallest integer not smaller than <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ceiling"></a><code>ceiling(val: <a href="int.html">int</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the smallest integer not smaller than <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="cos"></a><code>cos(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the cosine of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="cosd"></a><code>cosd(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the cosine of <code>val</code> where <code>val</code> is in degrees.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="cosh"></a><code>cosh(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the hyperbolic cosine of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="cot"></a><code>cot(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the cotangent of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="cotd"></a><code>cotd(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the cotangent of <code>val</code> where <code>val</code> is in degrees.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="degrees"></a><code>degrees(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Converts <code>val</code> as a radian value to a degree value.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="div"></a><code>div(x: <a href="decimal.html">decimal</a>, y: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates the integer quotient of <code>x</code>/<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="div"></a><code>div(x: <a href="float.html">float</a>, y: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the integer quotient of <code>x</code>/<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="div"></a><code>div(x: <a href="int.html">int</a>, y: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the integer quotient of <code>x</code>/<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="exp"></a><code>exp(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates <em>e</em> ^ <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="exp"></a><code>exp(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates <em>e</em> ^ <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="floor"></a><code>floor(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates the largest integer not greater than <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="floor"></a><code>floor(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the largest integer not greater than <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="floor"></a><code>floor(val: <a href="int.html">int</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the largest integer not greater than <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="isnan"></a><code>isnan(val: <a href="decimal.html">decimal</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if <code>val</code> is NaN, false otherwise.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="isnan"></a><code>isnan(val: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if <code>val</code> is NaN, false otherwise.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ln"></a><code>ln(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates the natural log of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ln"></a><code>ln(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the natural log of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="log"></a><code>log(b: <a href="decimal.html">decimal</a>, x: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates the base <code>b</code> log of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="log"></a><code>log(b: <a href="float.html">float</a>, x: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the base <code>b</code> log of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="log"></a><code>log(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates the base 10 log of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="log"></a><code>log(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the base 10 log of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="mod"></a><code>mod(x: <a href="decimal.html">decimal</a>, y: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates <code>x</code>%<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="mod"></a><code>mod(x: <a href="float.html">float</a>, y: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates <code>x</code>%<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="mod"></a><code>mod(x: <a href="int.html">int</a>, y: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates <code>x</code>%<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="pi"></a><code>pi() &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the value for pi (3.141592653589793).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="pow"></a><code>pow(x: <a href="decimal.html">decimal</a>, y: <a

&rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates <code>x</code>^<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="pow"></a><code>pow(x: <a href="float.html">float</a>, y: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates <code>x</code>^<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="pow"></a><code>pow(x: <a href="int.html">int</a>, y: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates <code>x</code>^<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="power"></a><code>power(x: <a href="decimal.html">decimal</a>, y: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates <code>x</code>^<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="power"></a><code>power(x: <a href="float.html">float</a>, y: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates <code>x</code>^<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="power"></a><code>power(x: <a href="int.html">int</a>, y: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates <code>x</code>^<code>y</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="radians"></a><code>radians(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Converts <code>val</code> as a degree value to a radians value.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="random"></a><code>random() &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns a random floating-point number between 0 (inclusive) and 1 (exclusive). Note that the value contains at most 53 bits of randomness.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="round"></a><code>round(input: <a href="decimal.html">decimal</a>, decimalaccuracy: <a href="int.html">int</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Keeps <code>decimalaccuracy</code> number of figures to the right of the zero position in <code>input</code> using half away from zero rounding. If <code>decimal_accuracy</code> is not in the range -2^31(2^31-1), the results are undefined.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="round"></a><code>round(input: <a href="float.html">float</a>, decimalaccuracy: <a href="int.html">int</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Keeps <code>decimalaccuracy</code> number of figures to the right of the zero position in <code>input</code> using half to even (bankers) rounding.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="round"></a><code>round(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Rounds <code>val</code> to the nearest integer, half away from zero: round(+/-2.4) = +/-2, round(+/-2.5) = +/-3.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="round"></a><code>round(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Rounds <code>val</code> to the nearest integer using half to even (bankers) rounding.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="setseed"></a><code>setseed(seed: <a href="float.html">float</a>) &rarr; void</code></td><td><span class="funcdesc"><p>Sets the seed for subsequent random() calls in this session (value between -1.0 and 1.0, inclusive). There are no guarantees as to how this affects the seed of random() calls that appear in the same query as setseed().</p> </span></td><td>Volatile</td></tr> <tr><td><a name="sign"></a><code>sign(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Determines the sign of <code>val</code>: <strong>1</strong> for positive; <strong>0</strong> for 0 values; <strong>-1</strong> for negative.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sign"></a><code>sign(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Determines the sign of <code>val</code>: <strong>1</strong> for positive; <strong>0</strong> for 0 values; <strong>-1</strong> for negative.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sign"></a><code>sign(val: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Determines the sign of <code>val</code>: <strong>1</strong> for positive; <strong>0</strong> for 0 values; <strong>-1</strong> for negative.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sin"></a><code>sin(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the sine of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sind"></a><code>sind(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the sine of <code>val</code> where <code>val</code> is in degrees.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sinh"></a><code>sinh(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the hyperbolic sine of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sqrt"></a><code>sqrt(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Calculates the square root of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sqrt"></a><code>sqrt(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the square root of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tan"></a><code>tan(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the tangent of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tand"></a><code>tand(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the tangent of <code>val</code> where <code>val</code> is in degrees.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tanh"></a><code>tanh(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Calculates the hyperbolic tangent of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="trunc"></a><code>trunc(val: <a href="decimal.html">decimal</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Truncates the decimal values of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="trunc"></a><code>trunc(val: <a href="decimal.html">decimal</a>, scale: <a href="int.html">int</a>) &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Truncate <code>val</code> to <code>scale</code> decimal places</p> </span></td><td>Immutable</td></tr> <tr><td><a name="trunc"></a><code>trunc(val: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Truncates the decimal values of <code>val</code>.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="phrasetotsquery"></a><code>phrasetotsquery(config: <a href="string.html">string</a>, text: <a href="string.html">string</a>) &rarr; tsquery</code></td><td><span class="funcdesc"><p>Converts text to a tsquery, normalizing words according to the specified configuration. The &lt;-&gt; operator is inserted between each token in the input.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="phrasetotsquery"></a><code>phrasetotsquery(text: <a href="string.html">string</a>) &rarr; tsquery</code></td><td><span class="funcdesc"><p>Converts text to a tsquery, normalizing words according to the default configuration. The &lt;-&gt; operator is inserted between each token in the input.</p> </span></td><td>Stable</td></tr> <tr><td><a name="plaintotsquery"></a><code>plaintotsquery(config: <a href="string.html">string</a>, text: <a

&rarr; tsquery</code></td><td><span class="funcdesc"><p>Converts text to a tsquery, normalizing words according to the specified configuration. The &amp; operator is inserted between each token in the input.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="plaintotsquery"></a><code>plaintotsquery(text: <a href="string.html">string</a>) &rarr; tsquery</code></td><td><span class="funcdesc"><p>Converts text to a tsquery, normalizing words according to the default configuration. The &amp; operator is inserted between each token in the input.</p> </span></td><td>Stable</td></tr> <tr><td><a name="totsquery"></a><code>totsquery(config: <a href="string.html">string</a>, text: <a href="string.html">string</a>) &rarr; tsquery</code></td><td><span class="funcdesc"><p>Converts the input text into a tsquery by normalizing each word in the input according to the specified configuration. The input must already be formatted like a tsquery, in other words, subsequent tokens must be connected by a tsquery operator (&amp;, |, &lt;-&gt;, !).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="totsquery"></a><code>totsquery(text: <a href="string.html">string</a>) &rarr; tsquery</code></td><td><span class="funcdesc"><p>Converts the input text into a tsquery by normalizing each word in the input according to the default configuration. The input must already be formatted like a tsquery, in other words, subsequent tokens must be connected by a tsquery operator (&amp;, |, &lt;-&gt;, !).</p> </span></td><td>Stable</td></tr> <tr><td><a name="totsvector"></a><code>totsvector(config: <a href="string.html">string</a>, text: <a href="string.html">string</a>) &rarr; tsvector</code></td><td><span class="funcdesc"><p>Converts text to a tsvector, normalizing words according to the specified configuration. Position information is included in the result.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="totsvector"></a><code>totsvector(text: <a href="string.html">string</a>) &rarr; tsvector</code></td><td><span class="funcdesc"><p>Converts text to a tsvector, normalizing words according to the default configuration. Position information is included in the result.</p> </span></td><td>Stable</td></tr> <tr><td><a name="tsparse"></a><code>tsparse(parsername: <a href="string.html">string</a>, document: <a href="string.html">string</a>) &rarr; tuple{int AS tokid, string AS token}</code></td><td><span class="funcdesc"><p>tsparse parses the given document and returns a series of records, one for each token produced by parsing. Each record includes a tokid showing the assigned token type and a token which is the text of the token.</p> </span></td><td>Stable</td></tr> <tr><td><a name="tsrank"></a><code>tsrank(vector: tsvector, query: tsquery) &rarr; float4</code></td><td><span class="funcdesc"><p>Ranks vectors based on the frequency of their matching lexemes.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tsrank"></a><code>tsrank(vector: tsvector, query: tsquery, normalization: <a href="int.html">int</a>) &rarr; float4</code></td><td><span class="funcdesc"><p>Ranks vectors based on the frequency of their matching lexemes.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tsrank"></a><code>tsrank(weights: <a href="float.html">float</a>[], vector: tsvector, query: tsquery) &rarr; float4</code></td><td><span class="funcdesc"><p>Ranks vectors based on the frequency of their matching lexemes.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tsrank"></a><code>tsrank(weights: <a href="float.html">float</a>[], vector: tsvector, query: tsquery, normalization: <a href="int.html">int</a>) &rarr; float4</code></td><td><span class="funcdesc"><p>Ranks vectors based on the frequency of their matching lexemes.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="levenshtein"></a><code>levenshtein(source: <a href="string.html">string</a>, target: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the Levenshtein distance between two strings. Maximum input length is 255 characters.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="levenshtein"></a><code>levenshtein(source: <a href="string.html">string</a>, target: <a href="string.html">string</a>, inscost: <a href="int.html">int</a>, delcost: <a href="int.html">int</a>, sub_cost: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the Levenshtein distance between two strings. The cost parameters specify how much to charge for each edit operation. Maximum input length is 255 characters.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="metaphone"></a><code>metaphone(source: <a href="string.html">string</a>, maxoutputlength: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert a string to its Metaphone code. Maximum input length is 255 characters</p> </span></td><td>Immutable</td></tr> <tr><td><a name="soundex"></a><code>soundex(source: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert a string to its Soundex code.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="experimentaluuidv4"></a><code>experimentaluuidv4() &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns a UUID.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="genrandomulid"></a><code>genrandomulid() &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Generates a random ULID and returns it as a value of UUID type.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="genrandomuuid"></a><code>genrandomuuid() &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Generates a random version 4 UUID, and returns it as a value of UUID type.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="uniquerowid"></a><code>uniquerowid() &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns a unique ID used by CockroachDB to generate unique row IDs if a Primary Key isnt defined for the table. The value is a combination of the insert timestamp and the ID of the node executing the statement, which guarantees this combination is globally unique. However, there can be gaps and the order is not completely guaranteed.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="unordereduniquerowid"></a><code>unordereduniquerowid() &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns a unique

The value is a combination of the insert timestamp (bit-reversed) and the ID of the node executing the statement, which guarantees this combination is globally unique. The way it is generated is statistically likely to not have any ordering relative to previously generated values.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="uuidgeneratev1"></a><code>uuidgeneratev1() &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Generates a version 1 UUID, and returns it as a value of UUID type. To avoid exposing the servers real MAC address, this uses a random MAC address and a timestamp. Essentially, this is an alias for uuidgeneratev1mc.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="uuidgeneratev1mc"></a><code>uuidgeneratev1mc() &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Generates a version 1 UUID, and returns it as a value of UUID type. This uses a random MAC address and a timestamp.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="uuidgeneratev3"></a><code>uuidgeneratev3(namespace: <a href="uuid.html">uuid</a>, name: <a href="string.html">string</a>) &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Generates a version 3 UUID in the given namespace using the specified input name, with md5 as the hashing method. The namespace should be one of the special constants produced by the uuidns*() functions.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="uuidgeneratev4"></a><code>uuidgeneratev4() &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Generates a random version 4 UUID, and returns it as a value of UUID type.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="uuidgeneratev5"></a><code>uuidgeneratev5(namespace: <a href="uuid.html">uuid</a>, name: <a href="string.html">string</a>) &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Generates a version 5 UUID in the given namespace using the specified input name. This is similar to a version 3 UUID, except it uses SHA-1 for hashing.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="uuidnil"></a><code>uuidnil() &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Returns a nil UUID constant.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="uuidnsdns"></a><code>uuidnsdns() &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Returns a constant designating the DNS namespace for UUIDs.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="uuidnsoid"></a><code>uuidnsoid() &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Returns a constant designating the ISO object identifier (OID) namespace for UUIDs. These are unrelated to the OID type used internally in the database.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="uuidnsurl"></a><code>uuidnsurl() &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Returns a constant designating the URL namespace for UUIDs.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="uuidnsx500"></a><code>uuidnsx500() &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Returns a constant designating the X.500 distinguished name (DN) namespace for UUIDs.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="uuidv4"></a><code>uuidv4() &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns a UUID.</p> </span></td><td>Volatile</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="abbrev"></a><code>abbrev(val: <a href="inet.html">inet</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts the combined IP address and prefix length to an abbreviated display format as text.For INET types, this will omit the prefix length if its not the default (32 or IPv4, 128 for IPv6)</p> <p>For example, <code>abbrev('192.168.1.2/24')</code> returns <code>'192.168.1.2/24'</code></p> </span></td><td>Immutable</td></tr> <tr><td><a name="broadcast"></a><code>broadcast(val: <a href="inet.html">inet</a>) &rarr; <a href="inet.html">inet</a></code></td><td><span class="funcdesc"><p>Gets the broadcast address for the network address represented by the value.</p> <p>For example, <code>broadcast('192.168.1.2/24')</code> returns <code>'192.168.1.255/24'</code></p> </span></td><td>Immutable</td></tr> <tr><td><a name="family"></a><code>family(val: <a href="inet.html">inet</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Extracts the IP family of the value; 4 for IPv4, 6 for IPv6.</p> <p>For example, <code>family('::1')</code> returns <code>6</code></p> </span></td><td>Immutable</td></tr> <tr><td><a name="host"></a><code>host(val: <a href="inet.html">inet</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Extracts the address part of the combined address/prefixlen value as text.</p> <p>For example, <code>host('192.168.1.2/16')</code> returns <code>'192.168.1.2'</code></p> </span></td><td>Immutable</td></tr> <tr><td><a name="hostmask"></a><code>hostmask(val: <a href="inet.html">inet</a>) &rarr; <a href="inet.html">inet</a></code></td><td><span class="funcdesc"><p>Creates an IP host mask corresponding to the prefix length in the value.</p> <p>For example, <code>hostmask('192.168.1.2/16')</code> returns <code>'0.0.255.255'</code></p> </span></td><td>Immutable</td></tr> <tr><td><a name="masklen"></a><code>masklen(val: <a href="inet.html">inet</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Retrieves the prefix length stored in the value.</p> <p>For example, <code>masklen('192.168.1.2/16')</code> returns <code>16</code></p> </span></td><td>Immutable</td></tr> <tr><td><a name="netmask"></a><code>netmask(val: <a href="inet.html">inet</a>) &rarr; <a href="inet.html">inet</a></code></td><td><span class="funcdesc"><p>Creates an IP network mask corresponding to the prefix length in the value.</p> <p>For example, <code>netmask('192.168.1.2/16')</code> returns <code>'255.255.0.0'</code></p> </span></td><td>Immutable</td></tr> <tr><td><a name="setmasklen"></a><code>setmasklen(val: <a href="inet.html">inet</a>, prefixlen: <a href="int.html">int</a>) &rarr; <a href="inet.html">inet</a></code></td><td><span class="funcdesc"><p>Sets the prefix length of <code>val</code> to <code>prefixlen</code>.</p> <p>For example, <code>set_masklen('192.168.1.2', 16)</code> returns <code>'192.168.1.2/16'</code>.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="crc32c"></a><code>crc32c(<a href="bytes.html">bytes</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the CRC-32 hash using the Castagnoli polynomial.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="crc32c"></a><code>crc32c(<a href="string.html">string</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the CRC-32 hash using the Castagnoli polynomial.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="crc32ieee"></a><code>crc32ieee(<a href="bytes.html">bytes</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the CRC-32 hash using the IEEE

</span></td><td>Leakproof</td></tr> <tr><td><a name="crc32ieee"></a><code>crc32ieee(<a href="string.html">string</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the CRC-32 hash using the IEEE polynomial.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="fnv32"></a><code>fnv32(<a href="bytes.html">bytes</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the 32-bit FNV-1 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="fnv32"></a><code>fnv32(<a href="string.html">string</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the 32-bit FNV-1 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="fnv32a"></a><code>fnv32a(<a href="bytes.html">bytes</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the 32-bit FNV-1a hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="fnv32a"></a><code>fnv32a(<a href="string.html">string</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the 32-bit FNV-1a hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="fnv64"></a><code>fnv64(<a href="bytes.html">bytes</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the 64-bit FNV-1 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="fnv64"></a><code>fnv64(<a href="string.html">string</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the 64-bit FNV-1 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="fnv64a"></a><code>fnv64a(<a href="bytes.html">bytes</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the 64-bit FNV-1a hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="fnv64a"></a><code>fnv64a(<a href="string.html">string</a>...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the 64-bit FNV-1a hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="widthbucket"></a><code>widthbucket(operand: <a href="decimal.html">decimal</a>, b1: <a href="decimal.html">decimal</a>, b2: <a href="decimal.html">decimal</a>, count: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>return the bucket number to which operand would be assigned in a histogram having count equal-width buckets spanning the range b1 to b2.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="widthbucket"></a><code>widthbucket(operand: <a href="int.html">int</a>, b1: <a href="int.html">int</a>, b2: <a href="int.html">int</a>, count: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>return the bucket number to which operand would be assigned in a histogram having count equal-width buckets spanning the range b1 to b2.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="widthbucket"></a><code>widthbucket(operand: anyelement, thresholds: anyelement[]) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>return the bucket number to which operand would be assigned given an array listing the lower bounds of the buckets; returns 0 for an input less than the first lower bound; the thresholds array must be sorted, smallest first, or unexpected results will be obtained</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="arraytojson"></a><code>arraytojson(array: anyelement[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the array as JSON or JSONB.</p> </span></td><td>Stable</td></tr> <tr><td><a name="arraytojson"></a><code>arraytojson(array: anyelement[], pretty_bool: <a href="bool.html">bool</a>) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the array as JSON or JSONB.</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsonarrayelements"></a><code>jsonarrayelements(input: jsonb) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Expands a JSON array to a set of JSON values.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonarrayelementstext"></a><code>jsonarrayelementstext(input: jsonb) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Expands a JSON array to a set of text values.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonarraylength"></a><code>jsonarraylength(json: jsonb) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of elements in the outermost JSON or JSONB array.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbuildarray"></a><code>jsonbuildarray(anyelement...) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Builds a possibly-heterogeneously-typed JSON or JSONB array out of a variadic argument list.</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsonbuildobject"></a><code>jsonbuildobject(anyelement...) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Builds a JSON object out of a variadic argument list.</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsoneach"></a><code>jsoneach(input: jsonb) &rarr; tuple{string AS key, jsonb AS value}</code></td><td><span class="funcdesc"><p>Expands the outermost JSON or JSONB object into a set of key/value pairs.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsoneachtext"></a><code>jsoneachtext(input: jsonb) &rarr; tuple{string AS key, string AS value}</code></td><td><span class="funcdesc"><p>Expands the outermost JSON or JSONB object into a set of key/value pairs. The returned values will be of type text.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonextractpath"></a><code>jsonextractpath(jsonb, <a href="string.html">string</a>...) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the JSON value pointed to by the variadic arguments.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonextractpathtext"></a><code>jsonextractpathtext(jsonb, <a href="string.html">string</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the JSON value as text pointed to by the variadic arguments.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonobject"></a><code>jsonobject(keys: <a href="string.html">string</a>[], values: <a href="string.html">string</a>[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>This form of json_object takes keys and values pairwise from two separate arrays. In all other respects it is identical to the one-argument form.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonobject"></a><code>jsonobject(texts: <a href="string.html">string</a>[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Builds a JSON or JSONB object out of a text array. The array must have exactly one dimension with an even number of members, in which case they are taken as alternating key/value

</span></td><td>Immutable</td></tr> <tr><td><a name="jsonpopulaterecord"></a><code>jsonpopulaterecord(base: anyelement, fromjson: jsonb) &rarr; anyelement</code></td><td><span class="funcdesc"><p>Expands the object in fromjson to a row whose columns match the record type defined by base.</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsonpopulaterecordset"></a><code>jsonpopulaterecordset(base: anyelement, fromjson: jsonb) &rarr; anyelement</code></td><td><span class="funcdesc"><p>Expands the outermost array of objects in fromjson to a set of rows whose columns match the record type defined by base</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsonremovepath"></a><code>jsonremovepath(val: jsonb, path: <a href="string.html">string</a>[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Remove the specified path from the JSON object.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonset"></a><code>jsonset(val: jsonb, path: <a href="string.html">string</a>[], to: jsonb) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the JSON value pointed to by the variadic arguments.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonset"></a><code>jsonset(val: jsonb, path: <a href="string.html">string</a>[], to: jsonb, createmissing: <a href="bool.html">bool</a>) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the JSON value pointed to by the variadic arguments. If <code>createmissing</code> is false, new keys will not be inserted to objects and values will not be prepended or appended to arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonstripnulls"></a><code>jsonstripnulls(fromjson: jsonb) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns fromjson with all object fields that have null values omitted. Other null values are untouched.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsontypeof"></a><code>jsontypeof(val: jsonb) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the type of the outermost JSON value as a text string.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonvalid"></a><code>jsonvalid(string: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the given string is a valid JSON or not</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbarrayelements"></a><code>jsonbarrayelements(input: jsonb) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Expands a JSON array to a set of JSON values.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbarrayelementstext"></a><code>jsonbarrayelementstext(input: jsonb) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Expands a JSON array to a set of text values.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbarraylength"></a><code>jsonbarraylength(json: jsonb) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of elements in the outermost JSON or JSONB array.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbbuildarray"></a><code>jsonbbuildarray(anyelement...) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Builds a possibly-heterogeneously-typed JSON or JSONB array out of a variadic argument list.</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsonbbuildobject"></a><code>jsonbbuildobject(anyelement...) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Builds a JSON object out of a variadic argument list.</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsonbeach"></a><code>jsonbeach(input: jsonb) &rarr; tuple{string AS key, jsonb AS value}</code></td><td><span class="funcdesc"><p>Expands the outermost JSON or JSONB object into a set of key/value pairs.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbeachtext"></a><code>jsonbeachtext(input: jsonb) &rarr; tuple{string AS key, string AS value}</code></td><td><span class="funcdesc"><p>Expands the outermost JSON or JSONB object into a set of key/value pairs. The returned values will be of type text.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbexistsany"></a><code>jsonbexistsany(json: jsonb, array: <a href="string.html">string</a>[]) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether any of the strings in the text array exist as top-level keys or array elements</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbextractpath"></a><code>jsonbextractpath(jsonb, <a href="string.html">string</a>...) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the JSON value pointed to by the variadic arguments.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbextractpathtext"></a><code>jsonbextractpathtext(jsonb, <a href="string.html">string</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the JSON value as text pointed to by the variadic arguments.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbinsert"></a><code>jsonbinsert(target: jsonb, path: <a href="string.html">string</a>[], newval: jsonb) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the JSON value pointed to by the variadic arguments. <code>newval</code> will be inserted before path target.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbinsert"></a><code>jsonbinsert(target: jsonb, path: <a href="string.html">string</a>[], newval: jsonb, insertafter: <a href="bool.html">bool</a>) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the JSON value pointed to by the variadic arguments. If <code>insertafter</code> is true (default is false), <code>newval</code> will be inserted after path target.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbobject"></a><code>jsonbobject(keys: <a href="string.html">string</a>[], values: <a href="string.html">string</a>[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>This form of json_object takes keys and values pairwise from two separate arrays. In all other respects it is identical to the one-argument form.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbobject"></a><code>jsonbobject(texts: <a href="string.html">string</a>[]) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Builds a JSON or JSONB object out of a text array. The array must have exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbpopulaterecord"></a><code>jsonbpopulaterecord(base: anyelement, fromjson: jsonb) &rarr; anyelement</code></td><td><span class="funcdesc"><p>Expands the object in fromjson to a row whose columns match the record type defined by base.</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsonbpopulaterecordset"></a><code>jsonbpopulaterecordset(base: anyelement, fromjson: jsonb) &rarr; anyelement</code></td><td><span class="funcdesc"><p>Expands the outermost array of objects in fromjson to a set of rows whose columns match the record type defined by base</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsonbpretty"></a><code>jsonbpretty(val: jsonb) &rarr; <a

class="funcdesc"><p>Returns the given JSON value as a STRING indented and with newlines.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbset"></a><code>jsonbset(val: jsonb, path: <a href="string.html">string</a>[], to: jsonb) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the JSON value pointed to by the variadic arguments.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbset"></a><code>jsonbset(val: jsonb, path: <a href="string.html">string</a>[], to: jsonb, createmissing: <a href="bool.html">bool</a>) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the JSON value pointed to by the variadic arguments. If <code>createmissing</code> is false, new keys will not be inserted to objects and values will not be prepended or appended to arrays.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbstripnulls"></a><code>jsonbstripnulls(fromjson: jsonb) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns fromjson with all object fields that have null values omitted. Other null values are untouched.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbtypeof"></a><code>jsonbtypeof(val: jsonb) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the type of the outermost JSON value as a text string.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="rowtojson"></a><code>rowtojson(row: tuple) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the row as a JSON object.</p> </span></td><td>Stable</td></tr> <tr><td><a name="tojson"></a><code>tojson(val: anyelement) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the value as JSON or JSONB.</p> </span></td><td>Stable</td></tr> <tr><td><a name="tojsonb"></a><code>tojsonb(val: anyelement) &rarr; jsonb</code></td><td><span class="funcdesc"><p>Returns the value as JSON or JSONB.</p> </span></td><td>Stable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="defaulttodatabaseprimaryregion"></a><code>defaulttodatabaseprimaryregion(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the given region if the region has been added to the current database. Otherwise, this will return the primary region of the current database. This will error if the current database is not a multi-region database.</p> </span></td><td>Stable</td></tr> <tr><td><a name="gatewayregion"></a><code>gatewayregion() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the region of the connections current node as defined by the locality flag on node startup. Returns an error if no region is set.</p> </span></td><td>Stable</td></tr> <tr><td><a name="rehomerow"></a><code>rehomerow() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the region of the connections current node as defined by the locality flag on node startup. Returns an error if no region is set.</p> </span></td><td>Stable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="regexpsplittoarray"></a><code>regexpsplittoarray(string: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Split string using a POSIX regular expression as the delimiter.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="regexpsplittoarray"></a><code>regexpsplittoarray(string: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>, flags: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Split string using a POSIX regular expression as the delimiter with flags.</p> <p>CockroachDB supports the following flags:</p> <table> <thead> <tr> <th>Flag</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><strong>c</strong></td> <td>Case-sensitive matching</td> </tr> <tr> <td><strong>g</strong></td> <td>Global matching (match each substring instead of only the first)</td> </tr> <tr> <td><strong>i</strong></td> <td>Case-insensitive matching</td> </tr> <tr> <td><strong>m</strong> or <strong>n</strong></td> <td>Newline-sensitive (see below)</td> </tr> <tr> <td><strong>p</strong></td> <td>Partial newline-sensitive matching (see below)</td> </tr> <tr> <td><strong>s</strong></td> <td>Newline-insensitive (default)</td> </tr> <tr> <td><strong>w</strong></td> <td>Inverse partial newline-sensitive matching (see below)</td> </tr> </tbody> </table> <table> <thead> <tr> <th>Mode</th> <th><code>.</code> and <code>[^...]</code> match newlines</th> <th><code>^</code> and <code>$</code> match line boundaries</th> </tr> </thead> <tbody> <tr> <td>s</td> <td>yes</td> <td>no</td> </tr> <tr> <td>w</td> <td>yes</td> <td>yes</td> </tr> <tr> <td>p</td> <td>no</td> <td>no</td> </tr> <tr> <td>m/n</td> <td>no</td> <td>yes</td> </tr> </tbody> </table> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="currval"></a><code>currval(sequence_name: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the latest value obtained with nextval for this sequence in this session.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="currval"></a><code>currval(sequence_name: regclass) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the latest value obtained with nextval for this sequence in this session.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="lastval"></a><code>lastval() &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return value most recently obtained with nextval in this session.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="nextval"></a><code>nextval(sequence_name: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Advances the given sequence and returns its new value.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="nextval"></a><code>nextval(sequence_name: regclass) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Advances the given sequence and returns its new value.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="setval"></a><code>setval(sequence_name: <a href="string.html">string</a>, value: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Set the given sequences current value. The next call to nextval will return <code>value + Increment</code></p> </span></td><td>Volatile</td></tr> <tr><td><a name="setval"></a><code>setval(sequencename: <a href="string.html">string</a>, value: <a href="int.html">int</a>, iscalled: <a href="bool.html">bool</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Set the given sequences current value. If is_called is false, the next call to nextval will return <code>value</code>; otherwise <code>value +

</span></td><td>Volatile</td></tr> <tr><td><a name="setval"></a><code>setval(sequence_name: regclass, value: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Set the given sequences current value. The next call to nextval will return <code>value + Increment</code></p> </span></td><td>Volatile</td></tr> <tr><td><a name="setval"></a><code>setval(sequencename: regclass, value: <a href="int.html">int</a>, iscalled: <a href="bool.html">bool</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Set the given sequences current value. If is_called is false, the next call to nextval will return <code>value</code>; otherwise <code>value + Increment</code>.</p> </span></td><td>Volatile</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="aclexplode"></a><code>aclexplode(aclitems: <a href="string.html">string</a>[]) &rarr; tuple{oid AS grantor, oid AS grantee, string AS privilegetype, bool AS isgrantable}</code></td><td><span class="funcdesc"><p>Produces a virtual table containing aclitem stuff (returns no rows as this feature is unsupported in CockroachDB)</p> </span></td><td>Stable</td></tr> <tr><td><a name="generateseries"></a><code>generateseries(start: <a href="int.html">int</a>, end: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Produces a virtual table containing the integer values from <code>start</code> to <code>end</code>, inclusive.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="generateseries"></a><code>generateseries(start: <a href="int.html">int</a>, end: <a href="int.html">int</a>, step: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Produces a virtual table containing the integer values from <code>start</code> to <code>end</code>, inclusive, by increment of <code>step</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="generateseries"></a><code>generateseries(start: <a href="timestamp.html">timestamp</a>, end: <a href="timestamp.html">timestamp</a>, step: <a href="interval.html">interval</a>) &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Produces a virtual table containing the timestamp values from <code>start</code> to <code>end</code>, inclusive, by increment of <code>step</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="generateseries"></a><code>generateseries(start: <a href="timestamp.html">timestamptz</a>, end: <a href="timestamp.html">timestamptz</a>, step: <a href="interval.html">interval</a>) &rarr; <a href="timestamp.html">timestamptz</a></code></td><td><span class="funcdesc"><p>Produces a virtual table containing the timestampTZ values from <code>start</code> to <code>end</code>, inclusive, by increment of <code>step</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="generatesubscripts"></a><code>generatesubscripts(array: anyelement[]) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns a series comprising the given arrays subscripts.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="generatesubscripts"></a><code>generatesubscripts(array: anyelement[], dim: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns a series comprising the given arrays subscripts.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="generatesubscripts"></a><code>generatesubscripts(array: anyelement[], dim: <a href="int.html">int</a>, reverse: <a href="bool.html">bool</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns a series comprising the given arrays subscripts.</p> <p>When reverse is true, the series is returned in reverse order.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="informationschema.pgexpandarray"></a><code>informationschema.pgexpandarray(input: anyelement[]) &rarr; tuple{anyelement AS x, int AS n}</code></td><td><span class="funcdesc"><p>Returns the input array as a set of rows with an index</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonobjectkeys"></a><code>jsonobjectkeys(input: jsonb) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns sorted set of keys in the outermost JSON object.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsontorecord"></a><code>jsontorecord(input: jsonb) &rarr; tuple</code></td><td><span class="funcdesc"><p>Builds an arbitrary record from a JSON object.</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsontorecordset"></a><code>jsontorecordset(input: jsonb) &rarr; tuple</code></td><td><span class="funcdesc"><p>Builds an arbitrary set of records from a JSON array of objects.</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsonbobjectkeys"></a><code>jsonbobjectkeys(input: jsonb) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns sorted set of keys in the outermost JSON object.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="jsonbtorecord"></a><code>jsonbtorecord(input: jsonb) &rarr; tuple</code></td><td><span class="funcdesc"><p>Builds an arbitrary record from a JSON object.</p> </span></td><td>Stable</td></tr> <tr><td><a name="jsonbtorecordset"></a><code>jsonbtorecordset(input: jsonb) &rarr; tuple</code></td><td><span class="funcdesc"><p>Builds an arbitrary set of records from a JSON array of objects.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetkeywords"></a><code>pggetkeywords() &rarr; tuple{string AS word, string AS catcode, string AS catdesc}</code></td><td><span class="funcdesc"><p>Produces a virtual table containing the keywords known to the SQL parser.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="pgoptionstotable"></a><code>pgoptionstotable(options: <a href="string.html">string</a>[]) &rarr; tuple{string AS optionname, string AS optionvalue}</code></td><td><span class="funcdesc"><p>Converts the options array format to a table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="regexpsplittotable"></a><code>regexpsplittotable(string: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Split string using a POSIX regular expression as the delimiter.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="regexpsplittotable"></a><code>regexpsplittotable(string: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>, flags: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Split string using a POSIX regular expression as the delimiter with flags.</p> <p>CockroachDB supports the following flags:</p> <table> <thead> <tr> <th>Flag</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><strong>c</strong></td> <td>Case-sensitive matching</td> </tr> <tr> <td><strong>g</strong></td> <td>Global matching (match each substring instead of only the first)</td> </tr> <tr> <td><strong>i</strong></td> <td>Case-insensitive matching</td> </tr> <tr> <td><strong>m</strong> or <strong>n</strong></td> <td>Newline-sensitive (see below)</td> </tr> <tr> <td><strong>p</strong></td> <td>Partial newline-sensitive matching (see below)</td> </tr> <tr> <td><strong>s</strong></td> <td>Newline-insensitive (default)</td> </tr> <tr> <td><strong>w</strong></td> <td>Inverse partial newline-sensitive matching (see below)</td> </tr> </tbody> </table> <table> <thead> <tr> <th>Mode</th> <th><code>.</code> and

match newlines</th> <th><code>^</code> and <code>$</code> match line boundaries</th> </tr> </thead> <tbody> <tr> <td>s</td> <td>yes</td> <td>no</td> </tr> <tr> <td>w</td> <td>yes</td> <td>yes</td> </tr> <tr> <td>p</td> <td>no</td> <td>no</td> </tr> <tr> <td>m/n</td> <td>no</td> <td>yes</td> </tr> </tbody> </table> </span></td><td>Immutable</td></tr> <tr><td><a name="unnest"></a><code>unnest(anyelement[], anyelement[], anyelement[]...) &rarr; tuple{anyelement AS unnest, anyelement AS unnest, anyelement AS unnest}</code></td><td><span class="funcdesc"><p>Returns the input arrays as a set of rows</p> </span></td><td>Immutable</td></tr> <tr><td><a name="unnest"></a><code>unnest(input: anyelement[]) &rarr; anyelement</code></td><td><span class="funcdesc"><p>Returns the input array as a set of rows</p> </span></td><td>Immutable</td></tr> <tr><td><a name="workloadindexrecs"></a><code>workloadindexrecs() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns set of index recommendations</p> </span></td><td>Immutable</td></tr> <tr><td><a name="workloadindexrecs"></a><code>workloadindexrecs(timestamptz: <a href="timestamp.html">timestamptz</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns set of index recommendations</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="stcontains"></a><code>stcontains(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no points of geometryb lie in the exterior of geometrya, and there is at least one point in the interior of geometryb that lies in the interior of geometrya.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcontainsproperly"></a><code>stcontainsproperly(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometryb intersects the interior of geometrya but not the boundary or exterior of geometry_a.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcoveredby"></a><code>stcoveredby(geographya: geography, geographyb: geography) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no point in geographya is outside geographyb.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcoveredby"></a><code>stcoveredby(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no point in geometrya is outside geometryb.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcovers"></a><code>stcovers(geographya: geography, geographyb: geography) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no point in geographyb is outside geographya.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcovers"></a><code>stcovers(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no point in geometryb is outside geometrya.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcrosses"></a><code>stcrosses(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya has some - but not all - interior points in common with geometryb.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdfullywithin"></a><code>stdfullywithin(geometrya: geometry, geometryb: geometry, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if every pair of points comprising geometrya and geometryb are within distance units, inclusive. In other words, the STMaxDistance between geometrya and geometry_b is less than or equal to distance units.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdfullywithinexclusive"></a><code>stdfullywithinexclusive(geometrya: geometry, geometryb: geometry, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if every pair of points comprising geometrya and geometryb are within distance units, exclusive. In other words, the STMaxDistance between geometrya and geometry_b is less than distance units.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithin"></a><code>stdwithin(geographya: geography, geographyb: geography, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geographya is within distance meters of geographyb, inclusive. Uses a spheroid to perform the operation.</p> <p>When operating on a spheroid, this function will use the sphere to calculate the closest two points. The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithin"></a><code>stdwithin(geographya: geography, geographyb: geography, distance: <a href="float.html">float</a>, usespheroid: <a href="bool.html">bool</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geographya is within distance meters of geography_b,

<p>When operating on a spheroid, this function will use the sphere to calculate the closest two points. The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithin"></a><code>stdwithin(geometrya: geometry, geometryb: geometry, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geometrya is within distance units of geometryb, inclusive.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithinexclusive"></a><code>stdwithinexclusive(geographya: geography, geographyb: geography, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geographya is within distance meters of geographyb, exclusive. Uses a spheroid to perform the operation.</p> <p>When operating on a spheroid, this function will use the sphere to calculate the closest two points. The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithinexclusive"></a><code>stdwithinexclusive(geographya: geography, geographyb: geography, distance: <a href="float.html">float</a>, usespheroid: <a href="bool.html">bool</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geographya is within distance meters of geography_b, exclusive.</p> <p>When operating on a spheroid, this function will use the sphere to calculate the closest two points. The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithinexclusive"></a><code>stdwithinexclusive(geometrya: geometry, geometryb: geometry, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geometrya is within distance units of geometryb, exclusive.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stequals"></a><code>stequals(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya is spatially equal to geometryb, i.e. STWithin(geometrya, geometryb) = STWithin(geometryb, geometrya) = true.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stintersects"></a><code>stintersects(geographya: geography, geographyb: geography) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geographya shares any portion of space with geographyb.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stintersects"></a><code>stintersects(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya shares any portion of space with geometryb.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stoverlaps"></a><code>stoverlaps(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya intersects but does not completely contain geometryb, or vice versa. Does not completely implies STWithin(geometrya, geometryb) = STWithin(geometryb, geometrya) = false.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttouches"></a><code>sttouches(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if the only points in common between geometrya and geometryb are on the boundary. Note points do not touch other points.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stwithin"></a><code>stwithin(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya is completely inside geometryb.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant does not utilize any spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="addgeometrycolumn"></a><code>addgeometrycolumn(catalogname: <a href="string.html">string</a>, schemaname: <a href="string.html">string</a>, tablename: <a

columnname: <a href="string.html">string</a>, srid: <a href="int.html">int</a>, type: <a href="string.html">string</a>, dimension: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Adds a new geometry column to an existing table and returns metadata about the column created.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="addgeometrycolumn"></a><code>addgeometrycolumn(catalogname: <a href="string.html">string</a>, schemaname: <a href="string.html">string</a>, tablename: <a href="string.html">string</a>, columnname: <a href="string.html">string</a>, srid: <a href="int.html">int</a>, type: <a href="string.html">string</a>, dimension: <a href="int.html">int</a>, use_typmod: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Adds a new geometry column to an existing table and returns metadata about the column created.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="addgeometrycolumn"></a><code>addgeometrycolumn(schemaname: <a href="string.html">string</a>, tablename: <a href="string.html">string</a>, column_name: <a href="string.html">string</a>, srid: <a href="int.html">int</a>, type: <a href="string.html">string</a>, dimension: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Adds a new geometry column to an existing table and returns metadata about the column created.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="addgeometrycolumn"></a><code>addgeometrycolumn(schemaname: <a href="string.html">string</a>, tablename: <a href="string.html">string</a>, columnname: <a href="string.html">string</a>, srid: <a href="int.html">int</a>, type: <a href="string.html">string</a>, dimension: <a href="int.html">int</a>, usetypmod: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Adds a new geometry column to an existing table and returns metadata about the column created.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="addgeometrycolumn"></a><code>addgeometrycolumn(tablename: <a href="string.html">string</a>, columnname: <a href="string.html">string</a>, srid: <a href="int.html">int</a>, type: <a href="string.html">string</a>, dimension: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Adds a new geometry column to an existing table and returns metadata about the column created.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="addgeometrycolumn"></a><code>addgeometrycolumn(tablename: <a href="string.html">string</a>, columnname: <a href="string.html">string</a>, srid: <a href="int.html">int</a>, type: <a href="string.html">string</a>, dimension: <a href="int.html">int</a>, use_typmod: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Adds a new geometry column to an existing table and returns metadata about the column created.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="geometrytype"></a><code>geometrytype(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the type of geometry as a string.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="geomfromewkb"></a><code>geomfromewkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from an EWKB representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="geomfromewkt"></a><code>geomfromewkt(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from an EWKT representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisaddbbox"></a><code>postgisaddbbox(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. This does not perform any operation on the Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisdropbbox"></a><code>postgisdropbbox(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. This does not perform any operation on the Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisextensionsupgrade"></a><code>postgisextensionsupgrade() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisfullversion"></a><code>postgisfullversion() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisgeosversion"></a><code>postgisgeosversion() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisgetbbox"></a><code>postgisgetbbox(geometry: geometry) &rarr; box2d</code></td><td><span class="funcdesc"><p>Returns a box2d encapsulating the given Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgishasbbox"></a><code>postgishasbbox(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether a given Geometry has a bounding box. False for points and empty geometries; always true otherwise.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgislibbuilddate"></a><code>postgislibbuilddate() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgislibversion"></a><code>postgislibversion() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisliblwgeomversion"></a><code>postgisliblwgeomversion() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgislibxmlversion"></a><code>postgislibxmlversion() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisprojversion"></a><code>postgisprojversion() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisscriptsbuilddate"></a><code>postgisscriptsbuilddate() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisscriptsinstalled"></a><code>postgisscriptsinstalled() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisscriptsreleased"></a><code>postgisscriptsreleased() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with

Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgisversion"></a><code>postgisversion() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="postgiswagyuversion"></a><code>postgiswagyuversion() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Compatibility placeholder function with PostGIS. Returns a fixed string based on PostGIS 3.0.1, with minor edits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="staddmeasure"></a><code>staddmeasure(geometry: geometry, start: <a href="float.html">float</a>, end: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a copy of a LineString or MultiLineString with measure coordinates linearly interpolated between the specified start and end values. Any existing M coordinates will be overwritten.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="staddpoint"></a><code>staddpoint(line_string: geometry, point: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Adds a Point to the end of a LineString.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="staddpoint"></a><code>staddpoint(line_string: geometry, point: geometry, index: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Adds a Point to a LineString at the given 0-based index (-1 to append).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="staffine"></a><code>staffine(geometry: geometry, a: <a href="float.html">float</a>, b: <a href="float.html">float</a>, c: <a href="float.html">float</a>, d: <a href="float.html">float</a>, e: <a href="float.html">float</a>, f: <a href="float.html">float</a>, g: <a href="float.html">float</a>, h: <a href="float.html">float</a>, i: <a href="float.html">float</a>, xoff: <a href="float.html">float</a>, yoff: <a href="float.html">float</a>, z_off: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Applies a 3D affine transformation to the given geometry.</p> <p>The matrix transformation will be applied as follows for each coordinate: / a b c x_off \ / x <br /> | d e f y_off | | y | | g h i z_off | | z | \ 0 0 0 1 / \ 0 /</p> </span></td><td>Immutable</td></tr> <tr><td><a name="staffine"></a><code>staffine(geometry: geometry, a: <a href="float.html">float</a>, b: <a href="float.html">float</a>, d: <a href="float.html">float</a>, e: <a href="float.html">float</a>, xoff: <a href="float.html">float</a>, yoff: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Applies a 2D affine transformation to the given geometry.</p> <p>The matrix transformation will be applied as follows for each coordinate: / a b x_off \ / x <br /> | d e y_off | | y | \ 0 0 1 / \ 0 /</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stangle"></a><code>stangle(line1: geometry, line2: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the clockwise angle between two LINESTRING geometries, treating them as vectors between their start- and endpoints. Returns NULL if any vectors have 0 length.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stangle"></a><code>stangle(point1: geometry, point2: geometry, point3: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the clockwise angle between the vectors formed by point2,point1 and point2,point3. The arguments must be POINT geometries. Returns NULL if any vectors have 0 length.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stangle"></a><code>stangle(point1: geometry, point2: geometry, point3: geometry, point4: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the clockwise angle between the vectors formed by point1,point2 and point3,point4. The arguments must be POINT geometries. Returns NULL if any vectors have 0 length.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="starea"></a><code>starea(geography: geography) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the area of the given geography in meters^2. Uses a spheroid to perform the operation.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="starea"></a><code>starea(geography: geography, use_spheroid: <a href="bool.html">bool</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the area of the given geography in meters^2.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="starea"></a><code>starea(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the area of the given geometry.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="starea"></a><code>starea(geometry_str: <a href="string.html">string</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the area of the given geometry.</p> <p>This function utilizes the GEOS module.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="starea2d"></a><code>starea2d(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the area of the given geometry.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasbinary"></a><code>stasbinary(geography: geography) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the WKB representation of a given Geography.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasbinary"></a><code>stasbinary(geography: geography, xdrorndr: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the WKB representation of a given

This variant has a second argument denoting the encoding - <code>xdr</code> for big endian and <code>ndr</code> for little endian.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasbinary"></a><code>stasbinary(geometry: geometry) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the WKB representation of a given Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasbinary"></a><code>stasbinary(geometry: geometry, xdrorndr: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the WKB representation of a given Geometry. This variant has a second argument denoting the encoding - <code>xdr</code> for big endian and <code>ndr</code> for little endian.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasencodedpolyline"></a><code>stasencodedpolyline(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the geometry as an Encoded Polyline. This format is used by Google Maps with precision=5 and by Open Source Routing Machine with precision=5 and 6. Preserves 5 decimal places.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasencodedpolyline"></a><code>stasencodedpolyline(geometry: geometry, precision: int4) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the geometry as an Encoded Polyline. This format is used by Google Maps with precision=5 and by Open Source Routing Machine with precision=5 and 6. Precision specifies how many decimal places will be preserved in Encoded Polyline. Value should be the same on encoding and decoding, or coordinates will be incorrect.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasewkb"></a><code>stasewkb(geography: geography) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the EWKB representation of a given Geography.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasewkb"></a><code>stasewkb(geometry: geometry) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the EWKB representation of a given Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasewkt"></a><code>stasewkt(geography: geography) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the EWKT representation of a given Geography. A default of 15 decimal digits is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasewkt"></a><code>stasewkt(geography: geography, maxdecimaldigits: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the EWKT representation of a given Geography. The maxdecimaldigits parameter controls the maximum decimal digits to print after the <code>.</code>. Use -1 to print as many digits as required to rebuild the same number.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasewkt"></a><code>stasewkt(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the EWKT representation of a given Geometry. A maximum of 15 decimal digits is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasewkt"></a><code>stasewkt(geometry: geometry, maxdecimaldigits: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the WKT representation of a given Geometry. The maxdecimaldigits parameter controls the maximum decimal digits to print after the <code>.</code>. Use -1 to print as many digits as required to rebuild the same number.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasewkt"></a><code>stasewkt(geometry_str: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the EWKT representation of a given Geometry. A maximum of 15 decimal digits is used.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasewkt"></a><code>stasewkt(geometrystr: <a href="string.html">string</a>, maxdecimaldigits: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the WKT representation of a given Geometry. The maxdecimal_digits parameter controls the maximum decimal digits to print after the <code>.</code>. Use -1 to print as many digits as required to rebuild the same number.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(geography: geography) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geography. Coordinates have a maximum of 9 decimal digits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(geography: geography, maxdecimaldigits: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geography with maxdecimaldigits output for each coordinate value.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(geography: geography, maxdecimaldigits: <a href="int.html">int</a>, options: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geography with maxdecimaldigits output for each coordinate value.</p> <p>Options is a flag that can be bitmasked. The options are:</p> <ul> <li>0: no option (default for Geography)</li> <li>1: GeoJSON BBOX</li> <li>2: GeoJSON Short CRS (e.g EPSG:4326)</li> <li>4: GeoJSON Long CRS (e.g urn:ogc:def:crs:EPSG::4326)</li> <li>8: GeoJSON Short CRS if not EPSG:4326</li> </ul> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geometry. Coordinates have a maximum of 9 decimal digits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(geometry: geometry, maxdecimaldigits: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geometry with maxdecimaldigits output for each coordinate value.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(geometry: geometry, maxdecimaldigits: <a href="int.html">int</a>, options: <a href="int.html">int</a>) &rarr; <a

class="funcdesc"><p>Returns the GeoJSON representation of a given Geometry with maxdecimaldigits output for each coordinate value.</p> <p>Options is a flag that can be bitmasked. The options are:</p> <ul> <li>0: no option</li> <li>1: GeoJSON BBOX</li> <li>2: GeoJSON Short CRS (e.g EPSG:4326)</li> <li>4: GeoJSON Long CRS (e.g urn:ogc:def:crs:EPSG::4326)</li> <li>8: GeoJSON Short CRS if not EPSG:4326 (default for Geometry)</li> </ul> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(geometry_str: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geometry. Coordinates have a maximum of 9 decimal digits.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(geometrystr: <a href="string.html">string</a>, maxdecimaldigits: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geometry with maxdecimal_digits output for each coordinate value.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(geometrystr: <a href="string.html">string</a>, maxdecimaldigits: <a href="int.html">int</a>, options: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geometry with maxdecimal_digits output for each coordinate value.</p> <p>Options is a flag that can be bitmasked. The options are:</p> <ul> <li>0: no option</li> <li>1: GeoJSON BBOX</li> <li>2: GeoJSON Short CRS (e.g EPSG:4326)</li> <li>4: GeoJSON Long CRS (e.g urn:ogc:def:crs:EPSG::4326)</li> <li>8: GeoJSON Short CRS if not EPSG:4326 (default for Geometry)</li> </ul> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(row: tuple) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geometry. Coordinates have a maximum of 9 decimal digits.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(row: tuple, geocolumn: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geometry, using geocolumn as the geometry for the given Feature. Coordinates have a maximum of 9 decimal digits.</p> </span></td><td>Stable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(row: tuple, geocolumn: <a href="string.html">string</a>, maxdecimaldigits: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geometry, using geocolumn as the geometry for the given Feature. maxdecimaldigits will be output for each coordinate value.</p> </span></td><td>Stable</td></tr> <tr><td><a name="stasgeojson"></a><code>stasgeojson(row: tuple, geocolumn: <a href="string.html">string</a>, maxdecimaldigits: <a href="int.html">int</a>, pretty: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the GeoJSON representation of a given Geometry, using geocolumn as the geometry for the given Feature. maxdecimaldigits will be output for each coordinate value. Output will be pretty printed in JSON if pretty is true.</p> </span></td><td>Stable</td></tr> <tr><td><a name="stashexewkb"></a><code>stashexewkb(geography: geography) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the EWKB representation in hex of a given Geography.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stashexewkb"></a><code>stashexewkb(geography: geography, xdrorndr: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the EWKB representation in hex of a given Geography. This variant has a second argument denoting the encoding - <code>xdr</code> for big endian and <code>ndr</code> for little endian.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stashexewkb"></a><code>stashexewkb(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the EWKB representation in hex of a given Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stashexewkb"></a><code>stashexewkb(geometry: geometry, xdrorndr: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the EWKB representation in hex of a given Geometry. This variant has a second argument denoting the encoding - <code>xdr</code> for big endian and <code>ndr</code> for little endian.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stashexwkb"></a><code>stashexwkb(geography: geography) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the WKB representation in hex of a given Geography.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stashexwkb"></a><code>stashexwkb(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the WKB representation in hex of a given Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="staskml"></a><code>staskml(geography: geography) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the KML representation of a given Geography.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="staskml"></a><code>staskml(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the KML representation of a given Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="staskml"></a><code>staskml(geometry_str: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the KML representation of a given Geometry.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasmvtgeom"></a><code>stasmvtgeom(geometry: geometry, bbox: box2d) &rarr; geometry</code></td><td><span class="funcdesc"><p>Transforms a geometry into the coordinate space of a MVT (Mapbox Vector Tile) tile, clipping it to the tile bounds. Uses 256 as the buffer size in tile coordinate space for geometry

Uses 4096 as the tile extent size in tile coordinate space.</p> <p>The geometry must be in the coordinate system of the target map. The function attempts to preserve geometry validity, and corrects it if needed. This may cause the result geometry to collapse to a lower dimension. The rectangular bounds of the tile in the target map coordinate space must be provided, so the geometry will be clipped can be transformed.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasmvtgeom"></a><code>stasmvtgeom(geometry: geometry, bbox: box2d, extent: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Transforms a geometry into the coordinate space of a MVT (Mapbox Vector Tile) tile, clipping it to the tile bounds. Uses 256 as the buffer size in tile coordinate space for geometry clipping.</p> <p>The geometry must be in the coordinate system of the target map. The function attempts to preserve geometry validity, and corrects it if needed. This may cause the result geometry to collapse to a lower dimension. The rectangular bounds of the tile in the target map coordinate space must be provided, so the geometry will be clipped can be transformed.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasmvtgeom"></a><code>stasmvtgeom(geometry: geometry, bbox: box2d, extent: <a href="int.html">int</a>, buffer: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Transforms a geometry into the coordinate space of a MVT (Mapbox Vector Tile) tile, clipping it to the tile bounds.</p> <p>The geometry must be in the coordinate system of the target map. The function attempts to preserve geometry validity, and corrects it if needed. This may cause the result geometry to collapse to a lower dimension. The rectangular bounds of the tile in the target map coordinate space must be provided, so the geometry will be clipped can be transformed.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stasmvtgeom"></a><code>stasmvtgeom(geometry: geometry, bbox: box2d, extent: <a href="int.html">int</a>, buffer: <a href="int.html">int</a>, clip: <a href="bool.html">bool</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Transforms a geometry into the coordinate space of a MVT (Mapbox Vector Tile) tile, clipping it to the tile bounds if required.</p> <p>The geometry must be in the coordinate system of the target map. The function attempts to preserve geometry validity, and corrects it if needed. This may cause the result geometry to collapse to a lower dimension. The rectangular bounds of the tile in the target map coordinate space must be provided, so the geometry can be transformed, and clipped if required.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stastext"></a><code>stastext(geography: geography) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the WKT representation of a given Geography. A default of 15 decimal digits is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stastext"></a><code>stastext(geography: geography, maxdecimaldigits: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the WKT representation of a given Geography. The maxdecimaldigits parameter controls the maximum decimal digits to print after the <code>.</code>. Use -1 to print as many digits as required to rebuild the same number.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stastext"></a><code>stastext(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the WKT representation of a given Geometry. A maximum of 15 decimal digits is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stastext"></a><code>stastext(geometry: geometry, maxdecimaldigits: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the WKT representation of a given Geometry. The maxdecimaldigits parameter controls the maximum decimal digits to print after the <code>.</code>. Use -1 to print as many digits as required to rebuild the same number.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stastext"></a><code>stastext(geometry_str: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the WKT representation of a given Geometry. A maximum of 15 decimal digits is used.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stastext"></a><code>stastext(geometrystr: <a href="string.html">string</a>, maxdecimaldigits: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the WKT representation of a given Geometry. The maxdecimal_digits parameter controls the maximum decimal digits to print after the <code>.</code>. Use -1 to print as many digits as required to rebuild the same

<p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stastwkb"></a><code>stastwkb(geometry: geometry, precision_xy: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the TWKB representation of a given geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stastwkb"></a><code>stastwkb(geometry: geometry, precisionxy: <a href="int.html">int</a>, precisionz: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the TWKB representation of a given geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stastwkb"></a><code>stastwkb(geometry: geometry, precisionxy: <a href="int.html">int</a>, precisionz: <a href="int.html">int</a>, precision_m: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the TWKB representation of a given geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stazimuth"></a><code>stazimuth(geographya: geography, geographyb: geography) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the azimuth in radians of the segment defined by the given point geographies, or NULL if the two points are coincident. It is solved using the Inverse geodesic problem.</p> <p>The azimuth is angle is referenced from north, and is positive clockwise: North = 0; East = /2; South = ; West = 3/2.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stazimuth"></a><code>stazimuth(geometrya: geometry, geometryb: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the azimuth in radians of the segment defined by the given point geometries, or NULL if the two points are coincident.</p> <p>The azimuth is angle is referenced from north, and is positive clockwise: North = 0; East = /2; South = ; West = 3/2.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbdpolyfromtext"></a><code>stbdpolyfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Polygon from multilinestring WKT with a SRID. If the input is not a multilinestring an error will be thrown.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stboundary"></a><code>stboundary(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the closure of the combinatorial boundary of this Geometry.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbox2dfromgeohash"></a><code>stbox2dfromgeohash(geohash: <a href="string.html">string</a>) &rarr; box2d</code></td><td><span class="funcdesc"><p>Return a Box2D from a GeoHash string with max precision.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbox2dfromgeohash"></a><code>stbox2dfromgeohash(geohash: <a href="string.html">string</a>, precision: <a href="int.html">int</a>) &rarr; box2d</code></td><td><span class="funcdesc"><p>Return a Box2D from a GeoHash string with supplied precision.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geography: geography, distance: <a href="float.html">float</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This function utilizes the GEOS module.</p> <p>This operation is done by transforming the object into a Geometry. This occurs by translating the Geography objects into Geometry objects before applying an LAEA, UTM or Web Mercator based projection based on the bounding boxes of the given Geography objects. When the result is calculated, the result is transformed back into a Geography with SRID 4326.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geography: geography, distance: <a href="float.html">float</a>, bufferstyleparams: <a href="string.html">string</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This variant takes in a space separate parameter string, which will augment the buffer styles. Valid parameters are:</p> <ul> <li>quad_segs=&lt;int&gt;, default 8</li> <li>endcap=&lt;round|flat|butt|square&gt;, default round</li> <li>join=&lt;round|mitre|miter|bevel&gt;, default round</li> <li>side=&lt;both|left|right&gt;, default both</li> <li>mitre_limit=&lt;float&gt;, default 5.0</li> </ul> <p>This function utilizes the GEOS module.</p> <p>This operation is done by transforming the object into a Geometry. This occurs by translating the Geography objects into Geometry objects before applying an LAEA, UTM or Web Mercator based projection based on the bounding boxes of the given Geography objects. When the result is calculated, the result is transformed back into a Geography with SRID 4326.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geography: geography, distance: <a href="float.html">float</a>, quad_segs: <a href="int.html">int</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This variant approximates the circle into quad_seg segments per line (the default is 8).</p> <p>This function utilizes the GEOS module.</p> <p>This operation is done by transforming the object into a

This occurs by translating the Geography objects into Geometry objects before applying an LAEA, UTM or Web Mercator based projection based on the bounding boxes of the given Geography objects. When the result is calculated, the result is transformed back into a Geography with SRID 4326.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geometry: geometry, distance: <a href="decimal.html">decimal</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geometry: geometry, distance: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geometry: geometry, distance: <a href="float.html">float</a>, bufferstyleparams: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This variant takes in a space separate parameter string, which will augment the buffer styles. Valid parameters are:</p> <ul> <li>quad_segs=&lt;int&gt;, default 8</li> <li>endcap=&lt;round|flat|butt|square&gt;, default round</li> <li>join=&lt;round|mitre|miter|bevel&gt;, default round</li> <li>side=&lt;both|left|right&gt;, default both</li> <li>mitre_limit=&lt;float&gt;, default 5.0</li> </ul> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geometry: geometry, distance: <a href="float.html">float</a>, quad_segs: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This variant approximates the circle into quad_seg segments per line (the default is 8).</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geometry: geometry, distance: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geometry_str: <a href="string.html">string</a>, distance: <a href="decimal.html">decimal</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This function utilizes the GEOS module.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geometry_str: <a href="string.html">string</a>, distance: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This function utilizes the GEOS module.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geometrystr: <a href="string.html">string</a>, distance: <a href="float.html">float</a>, bufferstyle_params: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This variant takes in a space separate parameter string, which will augment the buffer styles. Valid parameters are:</p> <ul> <li>quad_segs=&lt;int&gt;, default 8</li> <li>endcap=&lt;round|flat|butt|square&gt;, default round</li> <li>join=&lt;round|mitre|miter|bevel&gt;, default round</li> <li>side=&lt;both|left|right&gt;, default both</li> <li>mitre_limit=&lt;float&gt;, default 5.0</li> </ul> <p>This function utilizes the GEOS module.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geometrystr: <a href="string.html">string</a>, distance: <a href="float.html">float</a>, quadsegs: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This variant approximates the circle into quad_seg segments per line (the default is 8).</p> <p>This function utilizes the GEOS module.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stbuffer"></a><code>stbuffer(geometry_str: <a href="string.html">string</a>, distance: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that represents all points whose distance is less than or equal to the given distance from the given Geometry.</p> <p>This function utilizes the GEOS module.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcentroid"></a><code>stcentroid(geography: geography) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the centroid of given geography. Uses a spheroid to perform the operation.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcentroid"></a><code>stcentroid(geography: geography, use_spheroid: <a

&rarr; geography</code></td><td><span class="funcdesc"><p>Returns the centroid of given geography.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcentroid"></a><code>stcentroid(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the centroid of the given geometry.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcentroid"></a><code>stcentroid(geometry_str: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the centroid of the given geometry.</p> <p>This function utilizes the GEOS module.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stclipbybox2d"></a><code>stclipbybox2d(geometry: geometry, box2d: box2d) &rarr; geometry</code></td><td><span class="funcdesc"><p>Clips the geometry to conform to the bounding box specified by box2d.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stclosestpoint"></a><code>stclosestpoint(geometrya: geometry, geometryb: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the 2-dimensional point on geometrya that is closest to geometryb. This is the first point of the shortest line.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcollectionextract"></a><code>stcollectionextract(geometry: geometry, type: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Given a collection, returns a multitype consisting only of elements of the specified type. If there are no elements of the given type, an EMPTY geometry is returned. Types are specified as 1=POINT, 2=LINESTRING, 3=POLYGON - other types are not supported.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcollectionhomogenize"></a><code>stcollectionhomogenize(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the simplest representation of a collections contents. Collections of a single type will be returned as an appopriate multitype, or a singleton if it only contains a single geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcombinebbox"></a><code>stcombinebbox(box2d: box2d, geometry: geometry) &rarr; box2d</code></td><td><span class="funcdesc"><p>Combines the current bounding box with the bounding box of the Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcontains"></a><code>stcontains(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no points of geometryb lie in the exterior of geometrya, and there is at least one point in the interior of geometryb that lies in the interior of geometrya.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcontainsproperly"></a><code>stcontainsproperly(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometryb intersects the interior of geometrya but not the boundary or exterior of geometry_a.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stconvexhull"></a><code>stconvexhull(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a geometry that represents the Convex Hull of the given geometry.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcoorddim"></a><code>stcoorddim(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of coordinate dimensions of a given Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcoveredby"></a><code>stcoveredby(geographya: geography, geographyb: geography) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no point in geographya is outside geographyb.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcoveredby"></a><code>stcoveredby(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no point in geometrya is outside geometryb.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcoveredby"></a><code>stcoveredby(geometryastr: <a href="string.html">string</a>, geometrybstr: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no point in geometrya is outside geometryb.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcovers"></a><code>stcovers(geographya: geography, geographyb: geography) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no point in geographyb is outside geographya.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcovers"></a><code>stcovers(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if no point in geometryb is outside geometrya.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcovers"></a><code>stcovers(geometryastr: <a href="string.html">string</a>, geometrybstr: <a href="string.html">string</a>) &rarr; <a

class="funcdesc"><p>Returns true if no point in geometryb is outside geometrya.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stcrosses"></a><code>stcrosses(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya has some - but not all - interior points in common with geometryb.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdfullywithin"></a><code>stdfullywithin(geometrya: geometry, geometryb: geometry, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if every pair of points comprising geometrya and geometryb are within distance units, inclusive. In other words, the STMaxDistance between geometrya and geometry_b is less than or equal to distance units.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdfullywithinexclusive"></a><code>stdfullywithinexclusive(geometrya: geometry, geometryb: geometry, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if every pair of points comprising geometrya and geometryb are within distance units, exclusive. In other words, the STMaxDistance between geometrya and geometry_b is less than distance units.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdifference"></a><code>stdifference(geometrya: geometry, geometryb: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the difference of two Geometries.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdimension"></a><code>stdimension(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of topological dimensions of a given Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdisjoint"></a><code>stdisjoint(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya does not overlap, touch or is within geometryb.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdistance"></a><code>stdistance(geographya: geography, geographyb: geography) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the distance in meters between geographya and geographyb. Uses a spheroid to perform the operation.</p> <p>When operating on a spheroid, this function will use the sphere to calculate the closest two points. The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdistance"></a><code>stdistance(geographya: geography, geographyb: geography, usespheroid: <a href="bool.html">bool</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the distance in meters between geographya and geography_b.</p> <p>When operating on a spheroid, this function will use the sphere to calculate the closest two points. The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdistance"></a><code>stdistance(geometrya: geometry, geometryb: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the distance between the given geometries.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdistance"></a><code>stdistance(geometryastr: <a href="string.html">string</a>, geometrybstr: <a href="string.html">string</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the distance between the given geometries.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdistancesphere"></a><code>stdistancesphere(geometrya: geometry, geometryb: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the distance in meters between geometrya and geometryb assuming the coordinates represent lng/lat points on a sphere.</p> <p>This function utilizes the S2 library for spherical calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdistancespheroid"></a><code>stdistancespheroid(geometrya: geometry, geometryb: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the distance in meters between geometrya and geometryb assuming the coordinates represent lng/lat points on a spheroid.</p> <p>When operating on a spheroid, this function will use the sphere to calculate the closest two points. The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithin"></a><code>stdwithin(geographya: geography, geographyb: geography, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geographya is within distance meters of geographyb, inclusive. Uses a spheroid to perform the operation.</p> <p>When operating on a spheroid, this function will use the sphere to calculate the closest two

The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithin"></a><code>stdwithin(geographya: geography, geographyb: geography, distance: <a href="float.html">float</a>, usespheroid: <a href="bool.html">bool</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geographya is within distance meters of geography_b, inclusive.</p> <p>When operating on a spheroid, this function will use the sphere to calculate the closest two points. The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithin"></a><code>stdwithin(geometrya: geometry, geometryb: geometry, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geometrya is within distance units of geometryb, inclusive.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithin"></a><code>stdwithin(geometryastr: <a href="string.html">string</a>, geometrybstr: <a href="string.html">string</a>, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geometrya is within distance units of geometryb, inclusive.</p> <p>This function variant will attempt to utilize any available spatial index.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithinexclusive"></a><code>stdwithinexclusive(geographya: geography, geographyb: geography, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geographya is within distance meters of geographyb, exclusive. Uses a spheroid to perform the operation.</p> <p>When operating on a spheroid, this function will use the sphere to calculate the closest two points. The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithinexclusive"></a><code>stdwithinexclusive(geographya: geography, geographyb: geography, distance: <a href="float.html">float</a>, usespheroid: <a href="bool.html">bool</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geographya is within distance meters of geography_b, exclusive.</p> <p>When operating on a spheroid, this function will use the sphere to calculate the closest two points. The spheroid distance between these two points is calculated using GeographicLib. This follows observed PostGIS behavior.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithinexclusive"></a><code>stdwithinexclusive(geometrya: geometry, geometryb: geometry, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geometrya is within distance units of geometryb, exclusive.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stdwithinexclusive"></a><code>stdwithinexclusive(geometryastr: <a href="string.html">string</a>, geometrybstr: <a href="string.html">string</a>, distance: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if any of geometrya is within distance units of geometryb, exclusive.</p> <p>This function variant will attempt to utilize any available spatial index.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stendpoint"></a><code>stendpoint(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the last point of a geometry which has shape LineString. Returns NULL if the geometry is not a LineString.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stenvelope"></a><code>stenvelope(box2d: box2d) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a bounding geometry for the given box.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stenvelope"></a><code>stenvelope(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a bounding envelope for the given geometry.</p> <p>For geometries which have a POINT or LINESTRING bounding box (i.e. is a single point or a horizontal or vertical line), a POINT or LINESTRING is

Otherwise, the returned POLYGON will be ordered Bottom Left, Top Left, Top Right, Bottom Right, Bottom Left.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stequals"></a><code>stequals(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya is spatially equal to geometryb, i.e. STWithin(geometrya, geometryb) = STWithin(geometryb, geometrya) = true.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stestimatedextent"></a><code>stestimatedextent(schemaname: <a href="string.html">string</a>, tablename: <a href="string.html">string</a>, geocolumn_name: <a href="string.html">string</a>) &rarr; box2d</code></td><td><span class="funcdesc"><p>Returns the estimated extent of the geometries in the column of the given table. This currently always returns NULL.</p> </span></td><td>Stable</td></tr> <tr><td><a name="stestimatedextent"></a><code>stestimatedextent(schemaname: <a href="string.html">string</a>, tablename: <a href="string.html">string</a>, geocolumnname: <a href="string.html">string</a>, parentonly: <a href="bool.html">bool</a>) &rarr; box2d</code></td><td><span class="funcdesc"><p>Returns the estimated extent of the geometries in the column of the given table. This currently always returns NULL.</p> <p>The parent_only boolean is always ignored.</p> </span></td><td>Stable</td></tr> <tr><td><a name="stestimatedextent"></a><code>stestimatedextent(tablename: <a href="string.html">string</a>, geocolumnname: <a href="string.html">string</a>) &rarr; box2d</code></td><td><span class="funcdesc"><p>Returns the estimated extent of the geometries in the column of the given table. This currently always returns NULL.</p> </span></td><td>Stable</td></tr> <tr><td><a name="stexpand"></a><code>stexpand(box2d: box2d, delta: <a href="float.html">float</a>) &rarr; box2d</code></td><td><span class="funcdesc"><p>Extends the box2d by delta units across all dimensions.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stexpand"></a><code>stexpand(box2d: box2d, deltax: <a href="float.html">float</a>, deltay: <a href="float.html">float</a>) &rarr; box2d</code></td><td><span class="funcdesc"><p>Extends the box2d by deltax units in the x dimension and deltay units in the y dimension.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stexpand"></a><code>stexpand(geometry: geometry, delta: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Extends the bounding box represented by the geometry by delta units across all dimensions, returning a Polygon representing the new bounding box.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stexpand"></a><code>stexpand(geometry: geometry, deltax: <a href="float.html">float</a>, deltay: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Extends the bounding box represented by the geometry by deltax units in the x dimension and deltay units in the y dimension, returning a Polygon representing the new bounding box.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stexteriorring"></a><code>stexteriorring(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the exterior ring of a Polygon as a LineString. Returns NULL if the shape is not a Polygon.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stflipcoordinates"></a><code>stflipcoordinates(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a new geometry with the X and Y axes flipped.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforce2d"></a><code>stforce2d(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that is forced into XY layout with any Z or M dimensions discarded.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforce3d"></a><code>stforce3d(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that is forced into XYZ layout. If a Z coordinate doesnt exist, it will be set to 0. If a M coordinate is present, it will be discarded.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforce3d"></a><code>stforce3d(geometry: geometry, defaultZ: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that is forced into XYZ layout. If a Z coordinate doesnt exist, it will be set to the specified default Z value. If a M coordinate is present, it will be discarded.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforce3dm"></a><code>stforce3dm(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that is forced into XYM layout. If a M coordinate doesnt exist, it will be set to 0. If a Z coordinate is present, it will be discarded.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforce3dm"></a><code>stforce3dm(geometry: geometry, defaultM: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that is forced into XYM layout. If a M coordinate doesnt exist, it will be set to the specified default M value. If a Z coordinate is present, it will be discarded.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforce3dz"></a><code>stforce3dz(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that is forced into XYZ layout. If a Z coordinate doesnt exist, it will be set to 0. If a M coordinate is present, it will be discarded.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforce3dz"></a><code>stforce3dz(geometry: geometry, defaultZ: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that is forced into XYZ layout. If a Z coordinate doesnt exist, it will be set to the specified default Z value. If a M coordinate is present, it will be

</span></td><td>Immutable</td></tr> <tr><td><a name="stforce4d"></a><code>stforce4d(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that is forced into XYZM layout. If a Z coordinate doesnt exist, it will be set to 0. If a M coordinate doesnt exist, it will be set to 0.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforce4d"></a><code>stforce4d(geometry: geometry, defaultZ: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that is forced into XYZ layout. If a Z coordinate doesnt exist, it will be set to the specified default Z value. If a M coordinate doesnt exist, it will be set to 0.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforce4d"></a><code>stforce4d(geometry: geometry, defaultZ: <a href="float.html">float</a>, defaultM: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry that is forced into XYZ layout. If a Z coordinate doesnt exist, it will be set to the specified Z value. If a M coordinate doesnt exist, it will be set to the specified M value.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforcecollection"></a><code>stforcecollection(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Converts the geometry into a GeometryCollection.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforcepolygonccw"></a><code>stforcepolygonccw(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry where all Polygon objects have exterior rings in the counter-clockwise orientation and interior rings in the clockwise orientation. Non-Polygon objects are unchanged.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stforcepolygoncw"></a><code>stforcepolygoncw(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a Geometry where all Polygon objects have exterior rings in the clockwise orientation and interior rings in the counter-clockwise orientation. Non-Polygon objects are unchanged.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stfrechetdistance"></a><code>stfrechetdistance(geometrya: geometry, geometryb: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the Frechet distance between the given geometries.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stfrechetdistance"></a><code>stfrechetdistance(geometrya: geometry, geometryb: geometry, densify_frac: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the Frechet distance between the given geometries, with the given segment densification (range 0.0-1.0, -1 to disable).</p> <p>Smaller densify_frac gives a more accurate Frchet distance. However, the computation time and memory usage increases with the square of the number of subsegments.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeneratepoints"></a><code>stgeneratepoints(geometry: geometry, npoints: int4) &rarr; geometry</code></td><td><span class="funcdesc"><p>Generates pseudo-random points until the requested number are found within the input area. Uses system time as a seed. The requested number of points must be not larger than 65336.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="stgeneratepoints"></a><code>stgeneratepoints(geometry: geometry, npoints: int4, seed: int4) &rarr; geometry</code></td><td><span class="funcdesc"><p>Generates pseudo-random points until the requested number are found within the input area. The requested number of points must be not larger than 65336.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeogfromewkb"></a><code>stgeogfromewkb(val: <a href="bytes.html">bytes</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the Geography from an EWKB representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeogfromewkt"></a><code>stgeogfromewkt(val: <a href="string.html">string</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the Geography from an EWKT representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeogfromgeojson"></a><code>stgeogfromgeojson(val: <a href="string.html">string</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the Geography from an GeoJSON representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeogfromgeojson"></a><code>stgeogfromgeojson(val: jsonb) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the Geography from an GeoJSON representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeogfromtext"></a><code>stgeogfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the Geography from a WKT or EWKT representation with an SRID. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeogfromtext"></a><code>stgeogfromtext(val: <a href="string.html">string</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the Geography from a WKT or EWKT representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeogfromwkb"></a><code>stgeogfromwkb(bytes: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the Geography from a WKB (or EWKB) representation with the given SRID set.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeogfromwkb"></a><code>stgeogfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the Geography from a WKB (or EWKB) representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeographyfromtext"></a><code>stgeographyfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the Geography from a WKT or EWKT representation with an SRID. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeographyfromtext"></a><code>stgeographyfromtext(val: <a href="string.html">string</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the Geography from a WKT or EWKT representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeohash"></a><code>stgeohash(geography: geography) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a GeoHash representation of the geeographywith full precision if a point is provided, or with variable precision based on the size of the

</span></td><td>Immutable</td></tr> <tr><td><a name="stgeohash"></a><code>stgeohash(geography: geography, precision: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a GeoHash representation of the geography with the supplied precision.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeohash"></a><code>stgeohash(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a GeoHash representation of the geometry with full precision if a point is provided, or with variable precision based on the size of the feature. This will error any coordinates are outside the bounds of longitude/latitude.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeohash"></a><code>stgeohash(geometry: geometry, precision: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a GeoHash representation of the geometry with the supplied precision. This will error any coordinates are outside the bounds of longitude/latitude.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomcollfromtext"></a><code>stgeomcollfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not GeometryCollection, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomcollfromtext"></a><code>stgeomcollfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not GeometryCollection, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomcollfromwkb"></a><code>stgeomcollfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not GeometryCollection, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomcollfromwkb"></a><code>stgeomcollfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not GeometryCollection, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeometryfromtext"></a><code>stgeometryfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeometryfromtext"></a><code>stgeometryfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeometryn"></a><code>stgeometryn(geometry: geometry, n: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the n-th Geometry (1-indexed). Returns NULL if out of bounds.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeometrytype"></a><code>stgeometrytype(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the type of geometry as a string prefixed with <code>ST_</code>.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomfromewkb"></a><code>stgeomfromewkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from an EWKB representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomfromewkt"></a><code>stgeomfromewkt(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from an EWKT representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomfromgeohash"></a><code>stgeomfromgeohash(geohash: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Return a POLYGON Geometry from a GeoHash string with max precision.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomfromgeohash"></a><code>stgeomfromgeohash(geohash: <a href="string.html">string</a>, precision: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Return a POLYGON Geometry from a GeoHash string with supplied precision.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomfromgeojson"></a><code>stgeomfromgeojson(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from an GeoJSON representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomfromgeojson"></a><code>stgeomfromgeojson(val: jsonb) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from an GeoJSON representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomfromtext"></a><code>stgeomfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomfromtext"></a><code>stgeomfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomfromwkb"></a><code>stgeomfromwkb(bytes: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with the given SRID set.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stgeomfromwkb"></a><code>stgeomfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sthasarc"></a><code>sthasarc(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether there is a CIRCULARSTRING in the geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sthausdorffdistance"></a><code>sthausdorffdistance(geometrya: geometry, geometryb: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the Hausdorff distance between the given geometries.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sthausdorffdistance"></a><code>sthausdorffdistance(geometrya: geometry, geometryb: geometry, densify_frac: <a href="float.html">float</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the Hausdorff distance between the given geometries, with the given segment densification (range 0.0-1.0).</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stinteriorringn"></a><code>stinteriorringn(geometry: geometry, n: <a

&rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the n-th (1-indexed) interior ring of a Polygon as a LineString. Returns NULL if the shape is not a Polygon, or the ring does not exist.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stintersection"></a><code>stintersection(geographya: geography, geographyb: geography) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns the point intersections of the given geographies.</p> <p>This operation is done by transforming the object into a Geometry. This occurs by translating the Geography objects into Geometry objects before applying an LAEA, UTM or Web Mercator based projection based on the bounding boxes of the given Geography objects. When the result is calculated, the result is transformed back into a Geography with SRID 4326.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stintersection"></a><code>stintersection(geometrya: geometry, geometryb: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the point intersections of the given geometries.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stintersection"></a><code>stintersection(geometryastr: <a href="string.html">string</a>, geometrybstr: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the point intersections of the given geometries.</p> <p>This function utilizes the GEOS module.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stintersects"></a><code>stintersects(geographya: geography, geographyb: geography) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geographya shares any portion of space with geographyb.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stintersects"></a><code>stintersects(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya shares any portion of space with geometryb.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stintersects"></a><code>stintersects(geometryastr: <a href="string.html">string</a>, geometrybstr: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya shares any portion of space with geometryb.</p> <p>The calculations performed are have a precision of 1cm.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stisclosed"></a><code>stisclosed(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the geometry is closed as defined by whether the start and end points are coincident. Points are considered closed, empty geometries are not. For collections and multi-types, all members must be closed, as must all polygon rings.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stiscollection"></a><code>stiscollection(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the geometry is of a collection type (including multi-types).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stisempty"></a><code>stisempty(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the geometry is empty.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stispolygonccw"></a><code>stispolygonccw(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the Polygon objects inside the Geometry have exterior rings in the counter-clockwise orientation and interior rings in the clockwise orientation. Non-Polygon objects are considered counter-clockwise.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stispolygoncw"></a><code>stispolygoncw(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the Polygon objects inside the Geometry have exterior rings in the clockwise orientation and interior rings in the counter-clockwise orientation. Non-Polygon objects are considered clockwise.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stisring"></a><code>stisring(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the geometry is a single linestring that is closed and simple, as defined by STIsClosed and STIsSimple.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stissimple"></a><code>stissimple(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if the geometry has no anomalous geometric points, e.g. that it intersects with or lies tangent to itself.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stisvalid"></a><code>stisvalid(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the geometry is valid as defined by the OGC spec.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stisvalid"></a><code>stisvalid(geometry: geometry, flags: <a href="int.html">int</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the geometry is valid.</p> <p>For flags=0, validity is defined by the OGC spec.</p> <p>For flags=1, validity considers self-intersecting rings forming holes as valid as per

This is not valid under OGC and CRDB spatial operations may not operate correctly.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stisvalidreason"></a><code>stisvalidreason(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a string containing the reason the geometry is invalid along with the point of interest, or Valid Geometry if it is valid. Validity is defined by the OGC spec.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stisvalidreason"></a><code>stisvalidreason(geometry: geometry, flags: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the reason the geometry is invalid or Valid Geometry if it is valid.</p> <p>For flags=0, validity is defined by the OGC spec.</p> <p>For flags=1, validity considers self-intersecting rings forming holes as valid as per ESRI. This is not valid under OGC and CRDB spatial operations may not operate correctly.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stisvalidtrajectory"></a><code>stisvalidtrajectory(geometry: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the geometry encodes a valid trajectory.</p> <p>Note the geometry must be a LineString with M coordinates.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlength"></a><code>stlength(geography: geography) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the length of the given geography in meters. Uses a spheroid to perform the operation.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlength"></a><code>stlength(geography: geography, use_spheroid: <a href="bool.html">bool</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the length of the given geography in meters.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlength"></a><code>stlength(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the length of the given geometry.</p> <p>Note STLength is only valid for LineString - use STPerimeter for Polygon.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlength"></a><code>stlength(geometry_str: <a href="string.html">string</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the length of the given geometry.</p> <p>Note STLength is only valid for LineString - use STPerimeter for Polygon.</p> <p>This function utilizes the GEOS module.</p> <p>This variant will cast all geometry_str arguments into Geometry types.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlength2d"></a><code>stlength2d(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the length of the given geometry.</p> <p>Note STLength is only valid for LineString - use STPerimeter for Polygon.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinecrossingdirection"></a><code>stlinecrossingdirection(linestringa: geometry, linestringb: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns an interger value defining behavior of crossing of lines: 0: lines do not cross, -1: linestringb crosses linestringa from right to left, 1: linestringb crosses linestringa from left to right, -2: linestringb crosses linestringa multiple times from right to left, 2: linestringb crosses linestringa multiple times from left to right, -3: linestringb crosses linestringa multiple times from left to left, 3: linestringb crosses linestringa multiple times from right to right.</p> <p>Note that the top vertex of the segment touching another line does not count as a crossing, but the bottom vertex of segment touching another line is considered a crossing.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinefromencodedpolyline"></a><code>stlinefromencodedpolyline(encoded_polyline: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Creates a LineString from an Encoded Polyline string.</p> <p>Returns valid results only if the polyline was encoded with 5 decimal places.</p> <p>See <a href="http://developers.google.com/maps/documentation/utilities/polylinealgorithm" rel="nofollow">http://developers.google.com/maps/documentation/utilities/polylinealgorithm</a></p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinefromencodedpolyline"></a><code>stlinefromencodedpolyline(encoded_polyline: <a href="string.html">string</a>, precision: int4) &rarr; geometry</code></td><td><span class="funcdesc"><p>Creates a LineString from an Encoded Polyline string.</p> <p>Precision specifies how many decimal places will be preserved in Encoded Polyline. Value should be the same on encoding and decoding, or coordinates will be incorrect.</p> <p>See <a href="http://developers.google.com/maps/documentation/utilities/polylinealgorithm" rel="nofollow">http://developers.google.com/maps/documentation/utilities/polylinealgorithm</a></p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinefrommultipoint"></a><code>stlinefrommultipoint(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Creates a LineString from a MultiPoint geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinefromtext"></a><code>stlinefromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not LineString, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinefromtext"></a><code>stlinefromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT

If the shape underneath is not LineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinefromwkb"></a><code>stlinefromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not LineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinefromwkb"></a><code>stlinefromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not LineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlineinterpolatepoint"></a><code>stlineinterpolatepoint(geometry: geometry, fraction: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a point along the given LineString which is at given fraction of LineStrings total length.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlineinterpolatepoints"></a><code>stlineinterpolatepoints(geometry: geometry, fraction: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns one or more points along the LineString which is at an integral multiples of given fraction of LineStrings total length.</p> <p>Note If the result has zero or one points, it will be returned as a POINT. If it has two or more points, it will be returned as a MULTIPOINT.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlineinterpolatepoints"></a><code>stlineinterpolatepoints(geometry: geometry, fraction: <a href="float.html">float</a>, repeat: <a href="bool.html">bool</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns one or more points along the LineString which is at an integral multiples of given fraction of LineStrings total length. If repeat is false (default true) then it returns first point.</p> <p>Note If the result has zero or one points, it will be returned as a POINT. If it has two or more points, it will be returned as a MULTIPOINT.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinelocatepoint"></a><code>stlinelocatepoint(line: geometry, point: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns a float between 0 and 1 representing the location of the closest point on LineString to the given Point, as a fraction of total 2d line length.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinemerge"></a><code>stlinemerge(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a LineString or MultiLineString by joining together constituents of a MultiLineString with matching endpoints. If the input is not a MultiLineString or LineString, an empty GeometryCollection is returned.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinestringfromtext"></a><code>stlinestringfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not LineString, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinestringfromtext"></a><code>stlinestringfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not LineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinestringfromwkb"></a><code>stlinestringfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not LineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinestringfromwkb"></a><code>stlinestringfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not LineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinesubstring"></a><code>stlinesubstring(linestring: geometry, startfraction: <a href="decimal.html">decimal</a>, endfraction: <a href="decimal.html">decimal</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Return a linestring being a substring of the input one starting and ending at the given fractions of total 2D length. Second and third arguments are float8 values between 0 and 1.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlinesubstring"></a><code>stlinesubstring(linestring: geometry, startfraction: <a href="float.html">float</a>, endfraction: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Return a linestring being a substring of the input one starting and ending at the given fractions of total 2D length. Second and third arguments are float8 values between 0 and 1.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stlongestline"></a><code>stlongestline(geometrya: geometry, geometryb: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the LineString corresponds to the max distance across every pair of points comprising the given geometries.</p> <p>Note if geometries are the same, it will return the LineString with the maximum distance between the geometrys

The function will return the longest line that was discovered first when comparing maximum distances if more than one is found.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stm"></a><code>stm(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the M coordinate of a geometry if it is a Point.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmakebox2d"></a><code>stmakebox2d(geometrya: geometry, geometryb: geometry) &rarr; box2d</code></td><td><span class="funcdesc"><p>Creates a box2d from two points. Errors if arguments are not two non-empty points.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmakeenvelope"></a><code>stmakeenvelope(xmin: <a href="float.html">float</a>, ymin: <a href="float.html">float</a>, xmax: <a href="float.html">float</a>, ymax: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Creates a rectangular Polygon from the minimum and maximum values for X and Y with SRID 0.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmakeenvelope"></a><code>stmakeenvelope(xmin: <a href="float.html">float</a>, ymin: <a href="float.html">float</a>, xmax: <a href="float.html">float</a>, ymax: <a href="float.html">float</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Creates a rectangular Polygon from the minimum and maximum values for X and Y with the given SRID.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmakepoint"></a><code>stmakepoint(x: <a href="float.html">float</a>, y: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a new Point with the given X and Y coordinates.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmakepoint"></a><code>stmakepoint(x: <a href="float.html">float</a>, y: <a href="float.html">float</a>, z: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a new Point with the given X, Y, and Z coordinates.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmakepoint"></a><code>stmakepoint(x: <a href="float.html">float</a>, y: <a href="float.html">float</a>, z: <a href="float.html">float</a>, m: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a new Point with the given X, Y, Z, and M coordinates.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmakepointm"></a><code>stmakepointm(x: <a href="float.html">float</a>, y: <a href="float.html">float</a>, m: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a new Point with the given X, Y, and M coordinates.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmakepolygon"></a><code>stmakepolygon(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a new Polygon with the given outer LineString.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmakepolygon"></a><code>stmakepolygon(outer: geometry, interior: anyelement[]) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a new Polygon with the given outer LineString and interior (hole) LineString(s).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmakevalid"></a><code>stmakevalid(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a valid form of the given geometry according to the OGC spec.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmaxdistance"></a><code>stmaxdistance(geometrya: geometry, geometryb: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the maximum distance across every pair of points comprising the given geometries. Note if the geometries are the same, it will return the maximum distance between the geometrys vertexes.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmemsize"></a><code>stmemsize(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the amount of memory space (in bytes) the geometry takes.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stminimumboundingcircle"></a><code>stminimumboundingcircle(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the smallest circle polygon that can fully contain a geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stminimumboundingcircle"></a><code>stminimumboundingcircle(geometry: geometry, num_segs: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the smallest circle polygon that can fully contain a geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stminimumboundingradius"></a><code>stminimumboundingradius(geometry: geometry) &rarr; tuple{geometry AS center, float AS radius}</code></td><td><span class="funcdesc"><p>Returns a record containing the center point and radius of the smallest circle that can fully contains the given geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stminimumclearance"></a><code>stminimumclearance(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the minimum distance a vertex can move before producing an invalid geometry. Returns Infinity if no minimum clearance can be found (e.g. for a single point).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stminimumclearanceline"></a><code>stminimumclearanceline(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a LINESTRING spanning the minimum distance a vertex can move before producing an invalid geometry. If no minimum clearance can be found (e.g. for a single point), an empty LINESTRING is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmlinefromtext"></a><code>stmlinefromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not MultiLineString, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmlinefromtext"></a><code>stmlinefromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not MultiLineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmlinefromwkb"></a><code>stmlinefromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not MultiLineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmlinefromwkb"></a><code>stmlinefromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a

&rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not MultiLineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmpointfromtext"></a><code>stmpointfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not MultiPoint, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmpointfromtext"></a><code>stmpointfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not MultiPoint, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmpointfromwkb"></a><code>stmpointfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not MultiPoint, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmpointfromwkb"></a><code>stmpointfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not MultiPoint, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmpolyfromtext"></a><code>stmpolyfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not MultiPolygon, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmpolyfromtext"></a><code>stmpolyfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not MultiPolygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmpolyfromwkb"></a><code>stmpolyfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not MultiPolygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmpolyfromwkb"></a><code>stmpolyfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not MultiPolygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmulti"></a><code>stmulti(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the geometry as a new multi-geometry, e.g converts a POINT to a MULTIPOINT. If the input is already a multitype or collection, it is returned as is.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultilinefromtext"></a><code>stmultilinefromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not MultiLineString, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultilinefromtext"></a><code>stmultilinefromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not MultiLineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultilinefromwkb"></a><code>stmultilinefromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not MultiLineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultilinefromwkb"></a><code>stmultilinefromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not MultiLineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultilinestringfromtext"></a><code>stmultilinestringfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not MultiLineString, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultilinestringfromtext"></a><code>stmultilinestringfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not MultiLineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultilinestringfromwkb"></a><code>stmultilinestringfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not MultiLineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultilinestringfromwkb"></a><code>stmultilinestringfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not MultiLineString, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipointfromtext"></a><code>stmultipointfromtext(str: <a

srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not MultiPoint, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipointfromtext"></a><code>stmultipointfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not MultiPoint, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipointfromwkb"></a><code>stmultipointfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not MultiPoint, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipointfromwkb"></a><code>stmultipointfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not MultiPoint, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipolyfromtext"></a><code>stmultipolyfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not MultiPolygon, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipolyfromtext"></a><code>stmultipolyfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not MultiPolygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipolyfromwkb"></a><code>stmultipolyfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not MultiPolygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipolyfromwkb"></a><code>stmultipolyfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not MultiPolygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipolygonfromtext"></a><code>stmultipolygonfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not MultiPolygon, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipolygonfromtext"></a><code>stmultipolygonfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not MultiPolygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipolygonfromwkb"></a><code>stmultipolygonfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not MultiPolygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stmultipolygonfromwkb"></a><code>stmultipolygonfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not MultiPolygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stndims"></a><code>stndims(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of coordinate dimensions of a given Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stnode"></a><code>stnode(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Adds a node on a geometry for each intersection. Resulting geometry is always a MultiLineString.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stnormalize"></a><code>stnormalize(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the geometry in its normalized form.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stnpoints"></a><code>stnpoints(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of points in a given Geometry. Works for any shape type.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stnrings"></a><code>stnrings(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of rings in a Polygon Geometry. Returns 0 if the shape is not a Polygon.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stnumgeometries"></a><code>stnumgeometries(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of shapes inside a given Geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stnuminteriorring"></a><code>stnuminteriorring(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of interior rings in a Polygon Geometry. Returns NULL if the shape is not a Polygon.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stnuminteriorrings"></a><code>stnuminteriorrings(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of interior rings in a Polygon Geometry. Returns NULL if the shape is not a Polygon.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stnumpoints"></a><code>stnumpoints(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the number of points in a LineString. Returns NULL if the Geometry is not a

</span></td><td>Immutable</td></tr> <tr><td><a name="storderingequals"></a><code>storderingequals(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya is exactly equal to geometryb, having all coordinates in the same order, as well as the same type, SRID, bounding box, and so on.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="storientedenvelope"></a><code>storientedenvelope(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a minimum rotated rectangle enclosing a geometry. Note that more than one minimum rotated rectangle may exist. May return a Point or LineString in the case of degenerate inputs.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stoverlaps"></a><code>stoverlaps(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya intersects but does not completely contain geometryb, or vice versa. Does not completely implies STWithin(geometrya, geometryb) = STWithin(geometryb, geometrya) = false.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stperimeter"></a><code>stperimeter(geography: geography) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the perimeter of the given geography in meters. Uses a spheroid to perform the operation.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stperimeter"></a><code>stperimeter(geography: geography, use_spheroid: <a href="bool.html">bool</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the perimeter of the given geography in meters.</p> <p>This function utilizes the S2 library for spherical calculations.</p> <p>This function utilizes the GeographicLib library for spheroid calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stperimeter"></a><code>stperimeter(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the perimeter of the given geometry.</p> <p>Note STPerimeter is only valid for Polygon - use STLength for LineString.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stperimeter2d"></a><code>stperimeter2d(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the perimeter of the given geometry.</p> <p>Note STPerimeter is only valid for Polygon - use STLength for LineString.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpoint"></a><code>stpoint(x: <a href="float.html">float</a>, y: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a new Point with the given X and Y coordinates.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpointfromgeohash"></a><code>stpointfromgeohash(geohash: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Return a POINT Geometry from a GeoHash string with max precision.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpointfromgeohash"></a><code>stpointfromgeohash(geohash: <a href="string.html">string</a>, precision: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Return a POINT Geometry from a GeoHash string with supplied precision.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpointfromtext"></a><code>stpointfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not Point, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpointfromtext"></a><code>stpointfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not Point, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpointfromwkb"></a><code>stpointfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not Point, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpointfromwkb"></a><code>stpointfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not Point, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpointinsidecircle"></a><code>stpointinsidecircle(geometry: geometry, xcoord: <a href="float.html">float</a>, ycoord: <a href="float.html">float</a>, radius: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns the true if the geometry is a point and is inside the circle. Returns false otherwise.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpointn"></a><code>stpointn(geometry: geometry, n: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the n-th Point of a LineString (1-indexed). Returns NULL if out of bounds or not a LineString.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpointonsurface"></a><code>stpointonsurface(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a point that intersects with the given Geometry.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpoints"></a><code>stpoints(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns all coordinates in the given Geometry as a MultiPoint, including duplicates.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpolyfromtext"></a><code>stpolyfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not Polygon, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is

</span></td><td>Immutable</td></tr> <tr><td><a name="stpolyfromtext"></a><code>stpolyfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not Polygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpolyfromwkb"></a><code>stpolyfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not Polygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpolyfromwkb"></a><code>stpolyfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not Polygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpolygon"></a><code>stpolygon(geometry: geometry, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a new Polygon from the given LineString and sets its SRID. It is equivalent to STMakePolygon with a single argument followed by STSetSRID.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpolygonfromtext"></a><code>stpolygonfromtext(str: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation with an SRID. If the shape underneath is not Polygon, NULL is returned. If the SRID is present in both the EWKT and the argument, the argument value is used.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpolygonfromtext"></a><code>stpolygonfromtext(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation. If the shape underneath is not Polygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpolygonfromwkb"></a><code>stpolygonfromwkb(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation. If the shape underneath is not Polygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stpolygonfromwkb"></a><code>stpolygonfromwkb(wkb: <a href="bytes.html">bytes</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation with an SRID. If the shape underneath is not Polygon, NULL is returned.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stproject"></a><code>stproject(geography: geography, distance: <a href="float.html">float</a>, azimuth: <a href="float.html">float</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns a point projected from a start point along a geodesic using a given distance and azimuth (bearing). This is known as the direct geodesic problem.</p> <p>The distance is given in meters. Negative values are supported.</p> <p>The azimuth (also known as heading or bearing) is given in radians. It is measured clockwise from true north (azimuth zero). East is azimuth /2 (90 degrees); south is azimuth (180 degrees); west is azimuth 3/2 (270 degrees). Negative azimuth values and values greater than 2 (360 degrees) are supported.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strelate"></a><code>strelate(geometrya: geometry, geometryb: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the DE-9IM spatial relation between geometrya and geometryb.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strelate"></a><code>strelate(geometrya: geometry, geometryb: geometry, bnr: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the DE-9IM spatial relation between geometrya and geometryb using the given boundary node rule (1:OGC/MOD2, 2:Endpoint, 3:MultivalentEndpoint, 4:MonovalentEndpoint).</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strelate"></a><code>strelate(geometrya: geometry, geometryb: geometry, pattern: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the DE-9IM spatial relation between geometrya and geometryb matches the DE-9IM pattern.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strelatematch"></a><code>strelatematch(intersection_matrix: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the given DE-9IM intersection matrix satisfies the given pattern.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stremovepoint"></a><code>stremovepoint(line_string: geometry, index: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Removes the Point at the given 0-based index and returns the modified LineString geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stremoverepeatedpoints"></a><code>stremoverepeatedpoints(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a geometry with repeated points removed.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stremoverepeatedpoints"></a><code>stremoverepeatedpoints(geometry: geometry, tolerance: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a geometry with repeated points removed, within the given distance tolerance.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="streverse"></a><code>streverse(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified geometry by reversing the order of its vertices.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strotate"></a><code>strotate(g: geometry, angle_radians: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry whose coordinates are rotated around the origin by a rotation angle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strotate"></a><code>strotate(g: geometry, angleradians: <a href="float.html">float</a>, originpoint: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry whose coordinates are rotated around the provided origin by a rotation angle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strotate"></a><code>strotate(g: geometry, angleradians: <a

originx: <a href="float.html">float</a>, origin_y: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry whose coordinates are rotated around the provided origin by a rotation angle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strotatex"></a><code>strotatex(g: geometry, angle_radians: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry whose coordinates are rotated about the x axis by a rotation angle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strotatey"></a><code>strotatey(g: geometry, angle_radians: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry whose coordinates are rotated about the y axis by a rotation angle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strotatez"></a><code>strotatez(g: geometry, angle_radians: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry whose coordinates are rotated about the z axis by a rotation angle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sts2covering"></a><code>sts2covering(geography: geography) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns a geography which represents the S2 covering used by the index using the default index configuration.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sts2covering"></a><code>sts2covering(geography: geography, settings: <a href="string.html">string</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns a geography which represents the S2 covering used by the index using the index configuration specified by the settings parameter.</p> <p>The settings parameter uses the same format as the parameters inside the <code>WITH</code> in <code>CREATE INDEX ... WITH (...)</code>, e.g. <code>CREATE INDEX tidx ON t USING GIST(geom) WITH (s2maxlevel=15, s2levelmod=3)</code> can be tried using <code>SELECT STS2Covering(geography, 's2maxlevel=15,s2levelmod=3')</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sts2covering"></a><code>sts2covering(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a geometry which represents the S2 covering used by the index using the default index configuration.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sts2covering"></a><code>sts2covering(geometry: geometry, settings: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a geometry which represents the S2 covering used by the index using the index configuration specified by the settings parameter.</p> <p>The settings parameter uses the same format as the parameters inside the <code>WITH</code> in <code>CREATE INDEX ... WITH (...)</code>, e.g. <code>CREATE INDEX tidx ON t USING GIST(geom) WITH (s2maxlevel=15, s2levelmod=3)</code> can be tried using <code>SELECT STS2Covering(geometry, 's2maxlevel=15,s2levelmod=3')</code></p> </span></td><td>Immutable</td></tr> <tr><td><a name="stscale"></a><code>stscale(g: geometry, factor: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry scaled by taking in a Geometry as the factor.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stscale"></a><code>stscale(g: geometry, factor: geometry, origin: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry scaled by the Geometry factor relative to a false origin.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stscale"></a><code>stscale(geometry: geometry, xfactor: <a href="float.html">float</a>, yfactor: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry scaled by the given factors.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsegmentize"></a><code>stsegmentize(geography: geography, maxsegmentlengthmeters: <a href="float.html">float</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Returns a modified Geography having no segment longer than the given maxsegment_length meters.</p> <p>The calculations are done on a sphere.</p> <p>This function utilizes the S2 library for spherical calculations.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsegmentize"></a><code>stsegmentize(geometry: geometry, maxsegmentlength: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry having no segment longer than the given maxsegmentlength. Length units are in units of spatial reference.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsetpoint"></a><code>stsetpoint(line_string: geometry, index: <a href="int.html">int</a>, point: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Sets the Point at the given 0-based index and returns the modified LineString geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsetsrid"></a><code>stsetsrid(geography: geography, srid: <a href="int.html">int</a>) &rarr; geography</code></td><td><span class="funcdesc"><p>Sets a Geography to a new SRID without transforming the coordinates.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsetsrid"></a><code>stsetsrid(geometry: geometry, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Sets a Geometry to a new SRID without transforming the coordinates.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsharedpaths"></a><code>stsharedpaths(geometrya: geometry, geometryb: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a collection containing paths shared by the two input geometries.</p> <p>Those going in the same direction are in the first element of the collection, those going in the opposite direction are in the second element. The paths themselves are given in the direction of the first geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stshiftlongitude"></a><code>stshiftlongitude(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified version of a geometry in which the longitude (X coordinate) of each point is incremented by 360 if it is &lt;0 and decremented by 360 if it is &gt;180. The result is only meaningful if the coordinates are in

</span></td><td>Immutable</td></tr> <tr><td><a name="stshortestline"></a><code>stshortestline(geometrya: geometry, geometryb: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the LineString corresponds to the minimum distance across every pair of points comprising the given geometries.</p> <p>Note if geometries are the same, it will return the LineString with the minimum distance between the geometrys vertexes. The function will return the shortest line that was discovered first when comparing minimum distances if more than one is found.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsimplify"></a><code>stsimplify(geometry: geometry, tolerance: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Simplifies the given geometry using the Douglas-Peucker algorithm.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsimplify"></a><code>stsimplify(geometry: geometry, tolerance: <a href="float.html">float</a>, preservecollapsed: <a href="bool.html">bool</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Simplifies the given geometry using the Douglas-Peucker algorithm, retaining objects that would be too small given the tolerance if preservecollapsed is set to true.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsimplifypreservetopology"></a><code>stsimplifypreservetopology(geometry: geometry, tolerance: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Simplifies the given geometry using the Douglas-Peucker algorithm, avoiding the creation of invalid geometries.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsnap"></a><code>stsnap(input: geometry, target: geometry, tolerance: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Snaps the vertices and segments of input geometry the target geometrys vertices. Tolerance is used to control where snapping is performed. The result geometry is the input geometry with the vertices snapped. If no snapping occurs then the input geometry is returned unchanged.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsnaptogrid"></a><code>stsnaptogrid(geometry: geometry, origin: geometry, sizex: <a href="float.html">float</a>, sizey: <a href="float.html">float</a>, sizez: <a href="float.html">float</a>, sizem: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Snap a geometry to a grid defined by the given origin and X, Y, Z, and M cell sizes. Any dimension with a 0 cell size will not be snapped.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsnaptogrid"></a><code>stsnaptogrid(geometry: geometry, originx: <a href="float.html">float</a>, originy: <a href="float.html">float</a>, sizex: <a href="float.html">float</a>, sizey: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Snap a geometry to a grid of with X coordinates snapped to sizex and Y coordinates snapped to sizey based on an origin of (originx, originy).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsnaptogrid"></a><code>stsnaptogrid(geometry: geometry, size: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Snap a geometry to a grid of the given size. The specified size is only used to snap X and Y coordinates.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsnaptogrid"></a><code>stsnaptogrid(geometry: geometry, sizex: <a href="float.html">float</a>, sizey: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Snap a geometry to a grid of with X coordinates snapped to sizex and Y coordinates snapped to sizey.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsrid"></a><code>stsrid(geography: geography) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the Spatial Reference Identifier (SRID) for the STGeography as defined in spatialref_sys table.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsrid"></a><code>stsrid(geometry: geometry) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the Spatial Reference Identifier (SRID) for the STGeometry as defined in spatialref_sys table.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ststartpoint"></a><code>ststartpoint(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the first point of a geometry which has shape LineString. Returns NULL if the geometry is not a LineString.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsubdivide"></a><code>stsubdivide(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a geometry divided into parts, where each part contains no more than 256 vertices.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsubdivide"></a><code>stsubdivide(geometry: geometry, max_vertices: int4) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a geometry divided into parts, where each part contains no more than the number of vertices provided.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsummary"></a><code>stsummary(geography: geography) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a text summary of the contents of the geography.</p> <p>Flags shown square brackets after the geometry type have the following meaning:</p> <ul> <li>M: has M coordinate</li> <li>Z: has Z coordinate</li> <li>B: has a cached bounding box</li> <li>G: is geography</li> <li>S: has spatial reference system</li> </ul> </span></td><td>Immutable</td></tr> <tr><td><a name="stsummary"></a><code>stsummary(geometry: geometry) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a text summary of the contents of the geometry.</p> <p>Flags shown square brackets after the geometry type have the following meaning:</p> <ul> <li>M: has M coordinate</li> <li>Z: has Z coordinate</li> <li>B: has a cached bounding box</li> <li>G: is geography</li> <li>S: has spatial reference system</li> </ul> </span></td><td>Immutable</td></tr> <tr><td><a name="stswapordinates"></a><code>stswapordinates(geometry: geometry, swapordinatestring: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a version of the given geometry with given ordinates

The swapordinatestring parameter is a 2-character string naming the ordinates to swap. Valid names are: x, y, z and m.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsymdifference"></a><code>stsymdifference(geometrya: geometry, geometryb: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the symmetric difference of both geometries.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stsymmetricdifference"></a><code>stsymmetricdifference(geometrya: geometry, geometryb: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the symmetric difference of both geometries.</p> <p>This function utilizes the GEOS module.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttileenvelope"></a><code>sttileenvelope(tileZoom: int4, tileX: int4, tileY: int4) &rarr; geometry</code></td><td><span class="funcdesc"><p>Creates a rectangular Polygon giving the extent of a tile in the XYZ tile system. The tile is specifed by the zoom level Z and the XY index of the tile in the grid at that level. Can be used to define the tile bounds required by ST_AsMVTGeom to convert geometry into the MVT tile coordinate space.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttileenvelope"></a><code>sttileenvelope(tileZoom: int4, tileX: int4, tileY: int4, bounds: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Creates a rectangular Polygon giving the extent of a tile in the XYZ tile system. The tile is specifed by the zoom level Z and the XY index of the tile in the grid at that level. Can be used to define the tile bounds required by ST_AsMVTGeom to convert geometry into the MVT tile coordinate space.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttileenvelope"></a><code>sttileenvelope(tileZoom: int4, tileX: int4, tileY: int4, bounds: geometry, margin: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Creates a rectangular Polygon giving the extent of a tile in the XYZ tile system. The tile is specifed by the zoom level Z and the XY index of the tile in the grid at that level. Can be used to define the tile bounds required by ST_AsMVTGeom to convert geometry into the MVT tile coordinate space.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttouches"></a><code>sttouches(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if the only points in common between geometrya and geometryb are on the boundary. Note points do not touch other points.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttransform"></a><code>sttransform(geometry: geometry, fromprojtext: <a href="string.html">string</a>, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Transforms a geometry into the coordinate reference system assuming the fromprojtext to the new toprojtext by projecting its coordinates. The supplied SRID is set on the new geometry.</p> <p>This function utilizes the PROJ library for coordinate projections.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttransform"></a><code>sttransform(geometry: geometry, fromprojtext: <a href="string.html">string</a>, toprojtext: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Transforms a geometry into the coordinate reference system assuming the fromprojtext to the new toprojtext by projecting its coordinates.</p> <p>This function utilizes the PROJ library for coordinate projections.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttransform"></a><code>sttransform(geometry: geometry, srid: <a href="int.html">int</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Transforms a geometry into the given SRID coordinate reference system by projecting its coordinates.</p> <p>This function utilizes the PROJ library for coordinate projections.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttransform"></a><code>sttransform(geometry: geometry, toprojtext: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Transforms a geometry into the coordinate reference system referenced by the projection text by projecting its coordinates.</p> <p>This function utilizes the PROJ library for coordinate projections.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttranslate"></a><code>sttranslate(g: geometry, deltax: <a href="float.html">float</a>, deltay: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry translated by the given deltas.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttranslate"></a><code>sttranslate(g: geometry, deltax: <a href="float.html">float</a>, deltay: <a href="float.html">float</a>, delta_z: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a modified Geometry translated by the given deltas.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sttransscale"></a><code>sttransscale(geometry: geometry, deltax: <a href="float.html">float</a>, deltay: <a href="float.html">float</a>, xfactor: <a href="float.html">float</a>, yfactor: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Translates the geometry using the deltaX and deltaY args, then scales it using the XFactor, YFactor args, working in 2D only.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stunaryunion"></a><code>stunaryunion(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a union of the components for any geometry or geometry collection provided. Dissolves boundaries of a

</span></td><td>Immutable</td></tr> <tr><td><a name="stvoronoilines"></a><code>stvoronoilines(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a two-dimensional Voronoi diagram from the vertices of the supplied geometry asthe boundaries between cells in that diagram as a MultiLineString.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stvoronoilines"></a><code>stvoronoilines(geometry: geometry, tolerance: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a two-dimensional Voronoi diagram from the vertices of the supplied geometry asthe boundaries between cells in that diagram as a MultiLineString.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stvoronoilines"></a><code>stvoronoilines(geometry: geometry, tolerance: <a href="float.html">float</a>, extend_to: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a two-dimensional Voronoi diagram from the vertices of the supplied geometry asthe boundaries between cells in that diagram as a MultiLineString.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stvoronoipolygons"></a><code>stvoronoipolygons(geometry: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a two-dimensional Voronoi diagram from the vertices of the supplied geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stvoronoipolygons"></a><code>stvoronoipolygons(geometry: geometry, tolerance: <a href="float.html">float</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a two-dimensional Voronoi diagram from the vertices of the supplied geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stvoronoipolygons"></a><code>stvoronoipolygons(geometry: geometry, tolerance: <a href="float.html">float</a>, extend_to: geometry) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns a two-dimensional Voronoi diagram from the vertices of the supplied geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stwithin"></a><code>stwithin(geometrya: geometry, geometryb: geometry) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if geometrya is completely inside geometryb.</p> <p>This function utilizes the GEOS module.</p> <p>This function variant will attempt to utilize any available spatial index.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stwkbtosql"></a><code>stwkbtosql(val: <a href="bytes.html">bytes</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKB (or EWKB) representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stwkttosql"></a><code>stwkttosql(val: <a href="string.html">string</a>) &rarr; geometry</code></td><td><span class="funcdesc"><p>Returns the Geometry from a WKT or EWKT representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stx"></a><code>stx(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the X coordinate of a geometry if it is a Point.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stxmax"></a><code>stxmax(box2d: box2d) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the maximum X ordinate of a box2d.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stxmax"></a><code>stxmax(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the maximum X ordinate of a geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stxmin"></a><code>stxmin(box2d: box2d) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the minimum X ordinate of a box2d.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stxmin"></a><code>stxmin(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the minimum X ordinate of a geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sty"></a><code>sty(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the Y coordinate of a geometry if it is a Point.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stymax"></a><code>stymax(box2d: box2d) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the maximum Y ordinate of a box2d.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stymax"></a><code>stymax(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the maximum Y ordinate of a geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stymin"></a><code>stymin(box2d: box2d) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the minimum Y ordinate of a box2d.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stymin"></a><code>stymin(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the minimum Y ordinate of a geometry.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stz"></a><code>stz(geometry: geometry) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns the Z coordinate of a geometry if it is a Point.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="stzmflag"></a><code>stzmflag(geometry: geometry) &rarr; int2</code></td><td><span class="funcdesc"><p>Returns a code based on the ZM coordinate dimension of a geometry (XY = 0, XYM = 1, XYZ = 2, XYZM = 3).</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="ascii"></a><code>ascii(val: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the character code of the first character in <code>val</code>. Despite the name, the function supports Unicode too.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitcount"></a><code>bitcount(val: <a href="bytes.html">bytes</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bits set used to represent <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitcount"></a><code>bitcount(val: varbit) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bits set used to represent <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitlength"></a><code>bitlength(val: <a href="bytes.html">bytes</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bits used to represent <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitlength"></a><code>bitlength(val: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bits used to represent <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitlength"></a><code>bitlength(val: varbit) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bits used to represent <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskand"></a><code>bitmaskand(a: <a href="string.html">string</a>, b: <a href="string.html">string</a>) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise AND value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskand"></a><code>bitmaskand(a: <a href="string.html">string</a>, b: varbit) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise AND value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskand"></a><code>bitmaskand(a: varbit, b: <a

&rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise AND value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskand"></a><code>bitmaskand(a: varbit, b: varbit) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise AND value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskor"></a><code>bitmaskor(a: <a href="string.html">string</a>, b: <a href="string.html">string</a>) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise OR value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskor"></a><code>bitmaskor(a: <a href="string.html">string</a>, b: varbit) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise OR value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskor"></a><code>bitmaskor(a: varbit, b: <a href="string.html">string</a>) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise OR value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskor"></a><code>bitmaskor(a: varbit, b: varbit) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise OR value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskxor"></a><code>bitmaskxor(a: <a href="string.html">string</a>, b: <a href="string.html">string</a>) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise XOR value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskxor"></a><code>bitmaskxor(a: <a href="string.html">string</a>, b: varbit) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise XOR value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskxor"></a><code>bitmaskxor(a: varbit, b: <a href="string.html">string</a>) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise XOR value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="bitmaskxor"></a><code>bitmaskxor(a: varbit, b: varbit) &rarr; varbit</code></td><td><span class="funcdesc"><p>Calculates bitwise XOR value of unsigned bit arrays a and b that may have different lengths.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="btrim"></a><code>btrim(input: <a href="string.html">string</a>, trimchars: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Removes any characters included in <code>trimchars</code> from the beginning or end of <code>input</code> (applies recursively).</p> <p>For example, <code>btrim('doggie', 'eod')</code> returns <code>ggi</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="btrim"></a><code>btrim(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Removes all spaces from the beginning and end of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="charlength"></a><code>charlength(val: <a href="bytes.html">bytes</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bytes in <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="charlength"></a><code>charlength(val: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of characters in <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="characterlength"></a><code>characterlength(val: <a href="bytes.html">bytes</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bytes in <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="characterlength"></a><code>characterlength(val: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of characters in <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="chr"></a><code>chr(val: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the character with the code given in <code>val</code>. Inverse function of <code>ascii()</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="compress"></a><code>compress(data: <a href="bytes.html">bytes</a>, codec: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Compress <code>data</code> with the specified <code>codec</code> (<code>gzip</code>, lz4, snappy, 'zstd).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="concat"></a><code>concat(<a href="string.html">string</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Concatenates a comma-separated list of strings.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="concatws"></a><code>concatws(<a href="string.html">string</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Uses the first argument as a separator between the concatenation of the subsequent arguments.</p> <p>For example <code>concat_ws('!','wow','great')</code> returns <code>wow!great</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="convertfrom"></a><code>convertfrom(str: <a href="bytes.html">bytes</a>, enc: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Decode the bytes in <code>str</code> into a string using encoding <code>enc</code>. Supports encodings UTF8 and LATIN1.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="convertto"></a><code>convertto(str: <a href="string.html">string</a>, enc: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Encode the string <code>str</code> as a byte array using encoding <code>enc</code>. Supports encodings UTF8 and LATIN1.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="decode"></a><code>decode(text: <a href="string.html">string</a>, format: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Decodes <code>data</code> using <code>format</code> (<code>hex</code> / <code>escape</code> / <code>base64</code>).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="decompress"></a><code>decompress(data: <a href="bytes.html">bytes</a>, codec: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Decompress <code>data</code> with the specified <code>codec</code> (<code>gzip</code>, lz4, snappy, 'zstd).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="difference"></a><code>difference(source: <a href="string.html">string</a>, target: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Convert two strings to their Soundex codes and report the number of matching code positions.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="encode"></a><code>encode(data: <a href="bytes.html">bytes</a>, format: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Encodes <code>data</code> using <code>format</code> (<code>hex</code> / <code>escape</code> / <code>base64</code>).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="format"></a><code>format(<a href="string.html">string</a>, anyelement...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Interprets the first argument as a format string similar to C sprintf and interpolates the remaining

</span></td><td>Stable</td></tr> <tr><td><a name="fromip"></a><code>fromip(val: <a href="bytes.html">bytes</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts the byte string representation of an IP to its character string representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="fromuuid"></a><code>fromuuid(val: <a href="bytes.html">bytes</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts the byte string representation of a UUID to its character string representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="getbit"></a><code>getbit(bit_string: varbit, index: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Extracts a bit at given index in the bit array.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="getbit"></a><code>getbit(byte_string: <a href="bytes.html">bytes</a>, index: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Extracts a bit at the given index in the byte array.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="getbyte"></a><code>getbyte(byte_string: <a href="bytes.html">bytes</a>, index: <a href="int.html">int</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Extracts a byte at the given index in the byte array.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="initcap"></a><code>initcap(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Capitalizes the first letter of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="left"></a><code>left(input: <a href="bytes.html">bytes</a>, returnset: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the first <code>returnset</code> bytes from <code>input</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="left"></a><code>left(input: <a href="string.html">string</a>, returnset: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the first <code>returnset</code> characters from <code>input</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="length"></a><code>length(val: <a href="bytes.html">bytes</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bytes in <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="length"></a><code>length(val: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of characters in <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="length"></a><code>length(val: varbit) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bits in <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="lower"></a><code>lower(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts all characters in <code>val</code> to their lower-case equivalents.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="lpad"></a><code>lpad(string: <a href="string.html">string</a>, length: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Pads <code>string</code> to <code>length</code> by adding to the left of <code>string</code>.If <code>string</code> is longer than <code>length</code> it is truncated.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="lpad"></a><code>lpad(string: <a href="string.html">string</a>, length: <a href="int.html">int</a>, fill: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Pads <code>string</code> by adding <code>fill</code> to the left of <code>string</code> to make it <code>length</code>. If <code>string</code> is longer than <code>length</code> it is truncated.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ltrim"></a><code>ltrim(input: <a href="string.html">string</a>, trimchars: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Removes any characters included in <code>trimchars</code> from the beginning (left-hand side) of <code>input</code> (applies recursively).</p> <p>For example, <code>ltrim('doggie', 'od')</code> returns <code>ggie</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ltrim"></a><code>ltrim(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Removes all spaces from the beginning (left-hand side) of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="md5"></a><code>md5(<a href="bytes.html">bytes</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the MD5 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="md5"></a><code>md5(<a href="string.html">string</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the MD5 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="octetlength"></a><code>octetlength(val: <a href="bytes.html">bytes</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bytes used to represent <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="octetlength"></a><code>octetlength(val: <a href="string.html">string</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bytes used to represent <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="octetlength"></a><code>octetlength(val: varbit) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the number of bits used to represent <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="overlay"></a><code>overlay(input: <a href="string.html">string</a>, overlayval: <a href="string.html">string</a>, startpos: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Replaces characters in <code>input</code> with <code>overlayval</code> starting at <code>startpos</code> (begins at 1).</p> <p>For example, <code>overlay('doggie', 'CAT', 2)</code> returns <code>dCATie</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="overlay"></a><code>overlay(input: <a href="string.html">string</a>, overlayval: <a href="string.html">string</a>, startpos: <a href="int.html">int</a>, endpos: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Deletes the characters in <code>input</code> between <code>startpos</code> and <code>endpos</code> (count starts at 1), and then insert <code>overlayval</code> at <code>start_pos</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parsedate"></a><code>parsedate(string: <a href="string.html">string</a>, datestyle: <a href="string.html">string</a>) &rarr; <a href="date.html">date</a></code></td><td><span class="funcdesc"><p>Parses a date assuming it is in format specified by DateStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parsedate"></a><code>parsedate(val: <a href="string.html">string</a>) &rarr; <a href="date.html">date</a></code></td><td><span class="funcdesc"><p>Parses a date assuming it is in MDY format.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parseident"></a><code>parseident(qualifiedidentifier: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Splits qualifiedidentifier into an array of identifiers, removing any quoting of individual identifiers. Extra characters after the last identifier are considered an error</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parseident"></a><code>parseident(qualifiedidentifier: <a href="string.html">string</a>, strict: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Splits <code>qualifiedidentifier</code> into an array of identifiers, removing any quoting of individual identifiers. If <code>strict</code> is false, then extra characters after the last identifier are

</span></td><td>Immutable</td></tr> <tr><td><a name="parseinterval"></a><code>parseinterval(string: <a href="string.html">string</a>, style: <a href="string.html">string</a>) &rarr; <a href="interval.html">interval</a></code></td><td><span class="funcdesc"><p>Convert a string to an interval using the given IntervalStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parseinterval"></a><code>parseinterval(val: <a href="string.html">string</a>) &rarr; <a href="interval.html">interval</a></code></td><td><span class="funcdesc"><p>Convert a string to an interval assuming the Postgres IntervalStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parsetime"></a><code>parsetime(string: <a href="string.html">string</a>, timestyle: <a href="string.html">string</a>) &rarr; <a href="time.html">time</a></code></td><td><span class="funcdesc"><p>Parses a time assuming the date (if any) is in format specified by DateStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parsetime"></a><code>parsetime(val: <a href="string.html">string</a>) &rarr; <a href="time.html">time</a></code></td><td><span class="funcdesc"><p>Parses a time assuming the date (if any) is in MDY format.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parsetimestamp"></a><code>parsetimestamp(string: <a href="string.html">string</a>, datestyle: <a href="string.html">string</a>) &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Convert a string containing an absolute timestamp to the corresponding timestamp assuming dates formatted using the given DateStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parsetimestamp"></a><code>parsetimestamp(val: <a href="string.html">string</a>) &rarr; <a href="timestamp.html">timestamp</a></code></td><td><span class="funcdesc"><p>Convert a string containing an absolute timestamp to the corresponding timestamp assuming dates are in MDY format.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parsetimetz"></a><code>parsetimetz(string: <a href="string.html">string</a>, timestyle: <a href="string.html">string</a>) &rarr; timetz</code></td><td><span class="funcdesc"><p>Parses a timetz assuming the date (if any) is in format specified by DateStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="parsetimetz"></a><code>parsetimetz(val: <a href="string.html">string</a>) &rarr; timetz</code></td><td><span class="funcdesc"><p>Parses a timetz assuming the date (if any) is in MDY format.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="prettifystatement"></a><code>prettifystatement(statement: <a href="string.html">string</a>, linewidth: <a href="int.html">int</a>, alignmode: <a href="int.html">int</a>, case_mode: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Prettifies a statement using a user-configured pretty-printing config. Align mode values range from 0 - 3, representing no, partial, full, and extra alignment respectively. Case mode values range between 0 - 1, representing lower casing and upper casing respectively.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="prettifystatement"></a><code>prettifystatement(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Prettifies a statement using a the default pretty-printing config.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="quoteident"></a><code>quoteident(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Return <code>val</code> suitably quoted to serve as identifier in a SQL statement.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="quoteliteral"></a><code>quoteliteral(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Return <code>val</code> suitably quoted to serve as string literal in a SQL statement.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="quoteliteral"></a><code>quoteliteral(val: anyelement) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Coerce <code>val</code> to a string and then quote it as a literal.</p> </span></td><td>Stable</td></tr> <tr><td><a name="quotenullable"></a><code>quotenullable(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Coerce <code>val</code> to a string and then quote it as a literal. If <code>val</code> is NULL, returns NULL.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="quotenullable"></a><code>quotenullable(val: anyelement) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Coerce <code>val</code> to a string and then quote it as a literal. If <code>val</code> is NULL, returns NULL.</p> </span></td><td>Stable</td></tr> <tr><td><a name="regexpextract"></a><code>regexpextract(input: <a href="string.html">string</a>, regex: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the first match for the Regular Expression <code>regex</code> in <code>input</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="regexpreplace"></a><code>regexpreplace(input: <a href="string.html">string</a>, regex: <a href="string.html">string</a>, replace: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Replaces matches for the Regular Expression <code>regex</code> in <code>input</code> with the Regular Expression <code>replace</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="regexpreplace"></a><code>regexpreplace(input: <a href="string.html">string</a>, regex: <a href="string.html">string</a>, replace: <a href="string.html">string</a>, flags: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Replaces matches for the regular expression <code>regex</code> in <code>input</code> with the regular expression <code>replace</code> using <code>flags</code>.</p> <p>CockroachDB supports the following flags:</p> <table> <thead> <tr> <th>Flag</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><strong>c</strong></td> <td>Case-sensitive matching</td> </tr> <tr> <td><strong>g</strong></td> <td>Global matching (match each substring instead of only the first)</td> </tr> <tr> <td><strong>i</strong></td> <td>Case-insensitive matching</td> </tr> <tr> <td><strong>m</strong> or <strong>n</strong></td> <td>Newline-sensitive (see below)</td> </tr> <tr> <td><strong>p</strong></td> <td>Partial newline-sensitive matching (see below)</td> </tr> <tr> <td><strong>s</strong></td> <td>Newline-insensitive (default)</td> </tr> <tr> <td><strong>w</strong></td> <td>Inverse partial newline-sensitive matching (see below)</td> </tr> </tbody> </table> <table> <thead> <tr> <th>Mode</th> <th><code>.</code> and <code>[^...]</code> match newlines</th> <th><code>^</code> and <code>$</code> match line boundaries</th> </tr> </thead> <tbody> <tr> <td>s</td> <td>yes</td> <td>no</td> </tr> <tr> <td>w</td> <td>yes</td> <td>yes</td> </tr> <tr> <td>p</td> <td>no</td> <td>no</td> </tr> <tr> <td>m/n</td> <td>no</td> <td>yes</td> </tr> </tbody> </table> </span></td><td>Immutable</td></tr> <tr><td><a name="repeat"></a><code>repeat(input: <a href="string.html">string</a>, repeatcounter: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Concatenates <code>input</code> <code>repeatcounter</code> number of times.</p> <p>For example, <code>repeat('dog', 2)</code> returns <code>dogdog</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="replace"></a><code>replace(input: <a href="string.html">string</a>, find: <a href="string.html">string</a>, replace: <a href="string.html">string</a>) &rarr; <a

class="funcdesc"><p>Replaces all occurrences of <code>find</code> with <code>replace</code> in <code>input</code></p> </span></td><td>Immutable</td></tr> <tr><td><a name="reverse"></a><code>reverse(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Reverses the order of the strings characters.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="right"></a><code>right(input: <a href="bytes.html">bytes</a>, returnset: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns the last <code>returnset</code> bytes from <code>input</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="right"></a><code>right(input: <a href="string.html">string</a>, returnset: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the last <code>returnset</code> characters from <code>input</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="rpad"></a><code>rpad(string: <a href="string.html">string</a>, length: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Pads <code>string</code> to <code>length</code> by adding to the right of string. If <code>string</code> is longer than <code>length</code> it is truncated.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="rpad"></a><code>rpad(string: <a href="string.html">string</a>, length: <a href="int.html">int</a>, fill: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Pads <code>string</code> to <code>length</code> by adding <code>fill</code> to the right of <code>string</code>. If <code>string</code> is longer than <code>length</code> it is truncated.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="rtrim"></a><code>rtrim(input: <a href="string.html">string</a>, trimchars: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Removes any characters included in <code>trimchars</code> from the end (right-hand side) of <code>input</code> (applies recursively).</p> <p>For example, <code>rtrim('doggie', 'ei')</code> returns <code>dogg</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="rtrim"></a><code>rtrim(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Removes all spaces from the end (right-hand side) of <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="setbit"></a><code>setbit(bitstring: varbit, index: <a href="int.html">int</a>, toset: <a href="int.html">int</a>) &rarr; varbit</code></td><td><span class="funcdesc"><p>Updates a bit at given index in the bit array.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="setbit"></a><code>setbit(bytestring: <a href="bytes.html">bytes</a>, index: <a href="int.html">int</a>, toset: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Updates a bit at the given index in the byte array.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="setbyte"></a><code>setbyte(bytestring: <a href="bytes.html">bytes</a>, index: <a href="int.html">int</a>, toset: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Updates a byte at the given index in the byte array.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="sha1"></a><code>sha1(<a href="bytes.html">bytes</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the SHA1 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="sha1"></a><code>sha1(<a href="string.html">string</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the SHA1 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="sha224"></a><code>sha224(<a href="bytes.html">bytes</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the SHA224 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="sha224"></a><code>sha224(<a href="string.html">string</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the SHA224 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="sha256"></a><code>sha256(<a href="bytes.html">bytes</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the SHA256 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="sha256"></a><code>sha256(<a href="string.html">string</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the SHA256 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="sha384"></a><code>sha384(<a href="bytes.html">bytes</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the SHA384 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="sha384"></a><code>sha384(<a href="string.html">string</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the SHA384 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="sha512"></a><code>sha512(<a href="bytes.html">bytes</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the SHA512 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="sha512"></a><code>sha512(<a href="string.html">string</a>...) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Calculates the SHA512 hash value of a set of values.</p> </span></td><td>Leakproof</td></tr> <tr><td><a name="similarescape"></a><code>similarescape(pattern: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts a SQL regexp <code>pattern</code> to a POSIX regexp <code>pattern</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="similarescape"></a><code>similarescape(pattern: <a href="string.html">string</a>, escape: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts a SQL regexp <code>pattern</code> to a POSIX regexp <code>pattern</code> using <code>escape</code> as an escape token.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="similartoescape"></a><code>similartoescape(pattern: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts a SQL regexp <code>pattern</code> to a POSIX regexp <code>pattern</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="similartoescape"></a><code>similartoescape(pattern: <a href="string.html">string</a>, escape: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts a SQL regexp <code>pattern</code> to a POSIX regexp <code>pattern</code> using <code>escape</code> as an escape token.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="similartoescape"></a><code>similartoescape(unescaped: <a href="string.html">string</a>, pattern: <a href="string.html">string</a>, escape: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Matches <code>unescaped</code> with <code>pattern</code> using <code>escape</code> as an escape token.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="splitpart"></a><code>splitpart(input: <a href="string.html">string</a>, delimiter: <a href="string.html">string</a>, returnindexpos: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Splits <code>input</code> on <code>delimiter</code> and return the value in the <code>returnindexpos</code> position (starting at 1).</p> <p>For example, <code>split_part('123.456.789.0','.',3)</code>returns <code>789</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strpos"></a><code>strpos(input: <a href="bytes.html">bytes</a>, find: <a href="bytes.html">bytes</a>) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the position where the byte subarray <code>find</code> begins in <code>input</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strpos"></a><code>strpos(input: <a href="string.html">string</a>, find: <a

&rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the position where the string <code>find</code> begins in <code>input</code>.</p> <p>For example, <code>strpos('doggie', 'gie')</code> returns <code>4</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="strpos"></a><code>strpos(input: varbit, find: varbit) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Calculates the position where the bit subarray <code>find</code> begins in <code>input</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substr"></a><code>substr(input: <a href="bytes.html">bytes</a>, startpos: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns a byte subarray of <code>input</code> starting at <code>startpos</code> (count starts at 1).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substr"></a><code>substr(input: <a href="bytes.html">bytes</a>, startpos: <a href="int.html">int</a>, length: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns a byte subarray of <code>input</code> starting at <code>startpos</code> (count starts at 1) and including up to <code>length</code> characters.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substr"></a><code>substr(input: <a href="string.html">string</a>, regex: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a substring of <code>input</code> that matches the regular expression <code>regex</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substr"></a><code>substr(input: <a href="string.html">string</a>, regex: <a href="string.html">string</a>, escapechar: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a substring of <code>input</code> that matches the regular expression <code>regex</code> using <code>escapechar</code> as your escape character instead of <code>\</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substr"></a><code>substr(input: <a href="string.html">string</a>, startpos: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a substring of <code>input</code> starting at <code>startpos</code> (count starts at 1).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substr"></a><code>substr(input: <a href="string.html">string</a>, startpos: <a href="int.html">int</a>, length: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a substring of <code>input</code> starting at <code>startpos</code> (count starts at 1) and including up to <code>length</code> characters.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substr"></a><code>substr(input: varbit, startpos: <a href="int.html">int</a>) &rarr; varbit</code></td><td><span class="funcdesc"><p>Returns a bit subarray of <code>input</code> starting at <code>startpos</code> (count starts at 1).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substr"></a><code>substr(input: varbit, startpos: <a href="int.html">int</a>, length: <a href="int.html">int</a>) &rarr; varbit</code></td><td><span class="funcdesc"><p>Returns a bit subarray of <code>input</code> starting at <code>startpos</code> (count starts at 1) and including up to <code>length</code> characters.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substring"></a><code>substring(input: <a href="bytes.html">bytes</a>, startpos: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns a byte subarray of <code>input</code> starting at <code>startpos</code> (count starts at 1).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substring"></a><code>substring(input: <a href="bytes.html">bytes</a>, startpos: <a href="int.html">int</a>, length: <a href="int.html">int</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Returns a byte subarray of <code>input</code> starting at <code>startpos</code> (count starts at 1) and including up to <code>length</code> characters.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substring"></a><code>substring(input: <a href="string.html">string</a>, regex: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a substring of <code>input</code> that matches the regular expression <code>regex</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substring"></a><code>substring(input: <a href="string.html">string</a>, regex: <a href="string.html">string</a>, escapechar: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a substring of <code>input</code> that matches the regular expression <code>regex</code> using <code>escapechar</code> as your escape character instead of <code>\</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substring"></a><code>substring(input: <a href="string.html">string</a>, startpos: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a substring of <code>input</code> starting at <code>startpos</code> (count starts at 1).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substring"></a><code>substring(input: <a href="string.html">string</a>, startpos: <a href="int.html">int</a>, length: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns a substring of <code>input</code> starting at <code>startpos</code> (count starts at 1) and including up to <code>length</code> characters.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substring"></a><code>substring(input: varbit, startpos: <a href="int.html">int</a>) &rarr; varbit</code></td><td><span class="funcdesc"><p>Returns a bit subarray of <code>input</code> starting at <code>startpos</code> (count starts at 1).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="substring"></a><code>substring(input: varbit, startpos: <a href="int.html">int</a>, length: <a href="int.html">int</a>) &rarr; varbit</code></td><td><span class="funcdesc"><p>Returns a bit subarray of <code>input</code> starting at <code>startpos</code> (count starts at 1) and including up to <code>length</code> characters.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tocharwithstyle"></a><code>tocharwithstyle(date: <a href="date.html">date</a>, datestyle: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert an date to a string assuming the string is formatted using the given DateStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tocharwithstyle"></a><code>tocharwithstyle(interval: <a href="interval.html">interval</a>, style: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert an interval to a string using the given IntervalStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tocharwithstyle"></a><code>tocharwithstyle(timestamp: <a href="timestamp.html">timestamp</a>, datestyle: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Convert an timestamp to a string assuming the string is formatted using the given DateStyle.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="toenglish"></a><code>toenglish(val: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>This function enunciates the value of its argument using English cardinals.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tohex"></a><code>tohex(val: <a href="bytes.html">bytes</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts <code>val</code> to its hexadecimal representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tohex"></a><code>tohex(val: <a href="int.html">int</a>) &rarr; <a

class="funcdesc"><p>Converts <code>val</code> to its hexadecimal representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="tohex"></a><code>tohex(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts <code>val</code> to its hexadecimal representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="toip"></a><code>toip(val: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Converts the character string representation of an IP to its byte string representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="touuid"></a><code>touuid(val: <a href="string.html">string</a>) &rarr; <a href="bytes.html">bytes</a></code></td><td><span class="funcdesc"><p>Converts the character string representation of a UUID to its byte string representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="translate"></a><code>translate(input: <a href="string.html">string</a>, find: <a href="string.html">string</a>, replace: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>In <code>input</code>, replaces the first character from <code>find</code> with the first character in <code>replace</code>; repeat for each character in <code>find</code>.</p> <p>For example, <code>translate('doggie', 'dog', '123');</code> returns <code>1233ie</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="ulidtouuid"></a><code>ulidtouuid(val: <a href="string.html">string</a>) &rarr; <a href="uuid.html">uuid</a></code></td><td><span class="funcdesc"><p>Converts a ULID string to its UUID-encoded representation.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="unaccent"></a><code>unaccent(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Removes accents (diacritic signs) from the text provided in <code>val</code>.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="upper"></a><code>upper(val: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts all characters in <code>val</code> to their to their upper-case equivalents.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="clusterlogicaltimestamp"></a><code>clusterlogicaltimestamp() &rarr; <a href="decimal.html">decimal</a></code></td><td><span class="funcdesc"><p>Returns the logical time of the current transaction as a CockroachDB HLC in decimal form.</p> <p>Note that uses of this function disable server-side optimizations and may increase either contention or retry errors, or both.</p> <p>Returns an error if run in a transaction with an isolation level weaker than SERIALIZABLE.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="currentdatabase"></a><code>currentdatabase() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the current database.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currentschema"></a><code>currentschema() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the current schema.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currentschemas"></a><code>currentschemas(includepgcatalog: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a>[]</code></td><td><span class="funcdesc"><p>Returns the valid schemas in the search path.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currentuser"></a><code>currentuser() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the current user. This function is provided for compatibility with PostgreSQL.</p> </span></td><td>Stable</td></tr> <tr><td><a name="sessionuser"></a><code>sessionuser() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the session user. This function is provided for compatibility with PostgreSQL.</p> </span></td><td>Stable</td></tr> <tr><td><a name="toregclass"></a><code>toregclass(text: <a href="string.html">string</a>) &rarr; regtype</code></td><td><span class="funcdesc"><p>Translates a textual relation name to its OID</p> </span></td><td>Stable</td></tr> <tr><td><a name="toregnamespace"></a><code>toregnamespace(text: <a href="string.html">string</a>) &rarr; regtype</code></td><td><span class="funcdesc"><p>Translates a textual schema name to its OID</p> </span></td><td>Stable</td></tr> <tr><td><a name="toregproc"></a><code>toregproc(text: <a href="string.html">string</a>) &rarr; regtype</code></td><td><span class="funcdesc"><p>Translates a textual function or procedure name to its OID</p> </span></td><td>Stable</td></tr> <tr><td><a name="toregprocedure"></a><code>toregprocedure(text: <a href="string.html">string</a>) &rarr; regtype</code></td><td><span class="funcdesc"><p>Translates a textual function or procedure name(with argument types) to its OID</p> </span></td><td>Stable</td></tr> <tr><td><a name="toregrole"></a><code>toregrole(text: <a href="string.html">string</a>) &rarr; regtype</code></td><td><span class="funcdesc"><p>Translates a textual role name to its OID</p> </span></td><td>Stable</td></tr> <tr><td><a name="toregtype"></a><code>toregtype(text: <a href="string.html">string</a>) &rarr; regtype</code></td><td><span class="funcdesc"><p>Translates a textual type name to its OID</p> </span></td><td>Stable</td></tr> <tr><td><a name="version"></a><code>version() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the nodes version of CockroachDB.</p> </span></td><td>Volatile</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="currenttime"></a><code>currenttime() &rarr; <a href="time.html">time</a></code></td><td><span class="funcdesc"><p>Returns the current transactions time with no time zone.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currenttime"></a><code>currenttime() &rarr; timetz</code></td><td><span class="funcdesc"><p>Returns the current transactions time with time zone.</p> <p>This function is the preferred overload and will be evaluated by default.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currenttime"></a><code>currenttime(precision: <a href="int.html">int</a>) &rarr; <a href="time.html">time</a></code></td><td><span class="funcdesc"><p>Returns the current transactions time with no time zone.</p> </span></td><td>Stable</td></tr> <tr><td><a name="currenttime"></a><code>currenttime(precision: <a href="int.html">int</a>) &rarr; timetz</code></td><td><span class="funcdesc"><p>Returns the current transactions time with time zone.</p> <p>This function is the preferred overload and will be evaluated by default.</p> </span></td><td>Stable</td></tr> <tr><td><a name="localtime"></a><code>localtime() &rarr; <a href="time.html">time</a></code></td><td><span class="funcdesc"><p>Returns the current transactions time with no time zone.</p> <p>This function is the preferred overload and will be evaluated by default.</p> </span></td><td>Stable</td></tr> <tr><td><a name="localtime"></a><code>localtime() &rarr; timetz</code></td><td><span class="funcdesc"><p>Returns the current transactions time with time zone.</p> </span></td><td>Stable</td></tr> <tr><td><a name="localtime"></a><code>localtime(precision: <a href="int.html">int</a>) &rarr; <a href="time.html">time</a></code></td><td><span class="funcdesc"><p>Returns the current transactions time with no time zone.</p> <p>This function is the preferred overload and will be evaluated by default.</p> </span></td><td>Stable</td></tr> <tr><td><a name="localtime"></a><code>localtime(precision: <a href="int.html">int</a>) &rarr; timetz</code></td><td><span class="funcdesc"><p>Returns the current transactions time with time zone.</p> </span></td><td>Stable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="showtrgm"></a><code>showtrgm(input: <a href="string.html">string</a>) &rarr; <a

class="funcdesc"><p>Returns an array of all the trigrams in the given string.</p> </span></td><td>Immutable</td></tr> <tr><td><a name="similarity"></a><code>similarity(left: <a href="string.html">string</a>, right: <a href="string.html">string</a>) &rarr; <a href="float.html">float</a></code></td><td><span class="funcdesc"><p>Returns a number that indicates how similar the two arguments are. The range of the result is zero (indicating that the two strings are completely dissimilar) to one (indicating that the two strings are identical).</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="uuidtoulid"></a><code>uuidtoulid(val: <a href="uuid.html">uuid</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Converts a UUID-encoded ULID to its string representation.</p> </span></td><td>Immutable</td></tr></tbody> </table> <table> <thead><tr><th>Function &rarr; Returns</th><th>Description</th><th>Volatility</th></tr></thead> <tbody> <tr><td><a name="coldescription"></a><code>coldescription(tableoid: oid, columnnumber: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the comment for a table column, which is specified by the OID of its table and its column number. (obj_description cannot be used for table columns, since columns do not have OIDs of their own.)</p> </span></td><td>Stable</td></tr> <tr><td><a name="currentsetting"></a><code>currentsetting(setting_name: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>System info</p> </span></td><td>Stable</td></tr> <tr><td><a name="currentsetting"></a><code>currentsetting(settingname: <a href="string.html">string</a>, missingok: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>System info</p> </span></td><td>Stable</td></tr> <tr><td><a name="formattype"></a><code>formattype(type_oid: oid, typemod: <a href="int.html">int</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the SQL name of a data type that is identified by its type OID and possibly a type modifier. Currently, the type modifier is ignored.</p> </span></td><td>Stable</td></tr> <tr><td><a name="getdatabaseencoding"></a><code>getdatabaseencoding() &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the current encoding name used by the database.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasanycolumnprivilege"></a><code>hasanycolumnprivilege(table: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for any column of table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasanycolumnprivilege"></a><code>hasanycolumnprivilege(table: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for any column of table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasanycolumnprivilege"></a><code>hasanycolumnprivilege(user: <a href="string.html">string</a>, table: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for any column of table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasanycolumnprivilege"></a><code>hasanycolumnprivilege(user: <a href="string.html">string</a>, table: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for any column of table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasanycolumnprivilege"></a><code>hasanycolumnprivilege(user: oid, table: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for any column of table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasanycolumnprivilege"></a><code>hasanycolumnprivilege(user: oid, table: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for any column of table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(table: <a href="string.html">string</a>, column: <a href="int.html">int</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(table: <a href="string.html">string</a>, column: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(table: oid, column: <a href="int.html">int</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(table: oid, column: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(user: <a href="string.html">string</a>, table: <a href="string.html">string</a>, column: <a href="int.html">int</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(user: <a href="string.html">string</a>, table: <a href="string.html">string</a>, column: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(user: <a href="string.html">string</a>, table: oid, column: <a href="int.html">int</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(user: <a href="string.html">string</a>, table: oid, column: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(user: oid, table: <a href="string.html">string</a>, column: <a href="int.html">int</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(user: oid, table: <a href="string.html">string</a>, column: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a

class="funcdesc"><p>Returns whether or not the user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(user: oid, table: oid, column: <a href="int.html">int</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hascolumnprivilege"></a><code>hascolumnprivilege(user: oid, table: oid, column: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for column.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasdatabaseprivilege"></a><code>hasdatabaseprivilege(database: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for database.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasdatabaseprivilege"></a><code>hasdatabaseprivilege(database: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for database.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasdatabaseprivilege"></a><code>hasdatabaseprivilege(user: <a href="string.html">string</a>, database: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for database.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasdatabaseprivilege"></a><code>hasdatabaseprivilege(user: <a href="string.html">string</a>, database: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for database.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasdatabaseprivilege"></a><code>hasdatabaseprivilege(user: oid, database: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for database.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasdatabaseprivilege"></a><code>hasdatabaseprivilege(user: oid, database: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for database.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasforeigndatawrapperprivilege"></a><code>hasforeigndatawrapperprivilege(fdw: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for foreign-data wrapper.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasforeigndatawrapperprivilege"></a><code>hasforeigndatawrapperprivilege(fdw: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for foreign-data wrapper.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasforeigndatawrapperprivilege"></a><code>hasforeigndatawrapperprivilege(user: <a href="string.html">string</a>, fdw: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for foreign-data wrapper.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasforeigndatawrapperprivilege"></a><code>hasforeigndatawrapperprivilege(user: <a href="string.html">string</a>, fdw: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for foreign-data wrapper.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasforeigndatawrapperprivilege"></a><code>hasforeigndatawrapperprivilege(user: oid, fdw: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for foreign-data wrapper.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasforeigndatawrapperprivilege"></a><code>hasforeigndatawrapperprivilege(user: oid, fdw: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for foreign-data wrapper.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasfunctionprivilege"></a><code>hasfunctionprivilege(function: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for function.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasfunctionprivilege"></a><code>hasfunctionprivilege(function: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for function.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasfunctionprivilege"></a><code>hasfunctionprivilege(user: <a href="string.html">string</a>, function: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for function.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasfunctionprivilege"></a><code>hasfunctionprivilege(user: <a href="string.html">string</a>, function: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for function.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasfunctionprivilege"></a><code>hasfunctionprivilege(user: oid, function: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for function.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasfunctionprivilege"></a><code>hasfunctionprivilege(user: oid, function: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for function.</p> </span></td><td>Stable</td></tr> <tr><td><a name="haslanguageprivilege"></a><code>haslanguageprivilege(language: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for language.</p> </span></td><td>Stable</td></tr> <tr><td><a name="haslanguageprivilege"></a><code>haslanguageprivilege(language: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for language.</p> </span></td><td>Stable</td></tr> <tr><td><a name="haslanguageprivilege"></a><code>haslanguageprivilege(user: <a href="string.html">string</a>, language: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for language.</p> </span></td><td>Stable</td></tr> <tr><td><a name="haslanguageprivilege"></a><code>haslanguageprivilege(user: <a href="string.html">string</a>, language: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for language.</p> </span></td><td>Stable</td></tr> <tr><td><a name="haslanguageprivilege"></a><code>haslanguageprivilege(user: oid, language: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for language.</p> </span></td><td>Stable</td></tr> <tr><td><a name="haslanguageprivilege"></a><code>haslanguageprivilege(user: oid, language: oid, privilege: <a

&rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for language.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasschemaprivilege"></a><code>hasschemaprivilege(schema: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for schema.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasschemaprivilege"></a><code>hasschemaprivilege(schema: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for schema.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasschemaprivilege"></a><code>hasschemaprivilege(user: <a href="string.html">string</a>, schema: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for schema.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasschemaprivilege"></a><code>hasschemaprivilege(user: <a href="string.html">string</a>, schema: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for schema.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasschemaprivilege"></a><code>hasschemaprivilege(user: oid, schema: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for schema.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasschemaprivilege"></a><code>hasschemaprivilege(user: oid, schema: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for schema.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hassequenceprivilege"></a><code>hassequenceprivilege(sequence: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for sequence.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hassequenceprivilege"></a><code>hassequenceprivilege(sequence: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for sequence.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hassequenceprivilege"></a><code>hassequenceprivilege(user: <a href="string.html">string</a>, sequence: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for sequence.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hassequenceprivilege"></a><code>hassequenceprivilege(user: <a href="string.html">string</a>, sequence: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for sequence.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hassequenceprivilege"></a><code>hassequenceprivilege(user: oid, sequence: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for sequence.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hassequenceprivilege"></a><code>hassequenceprivilege(user: oid, sequence: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for sequence.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasserverprivilege"></a><code>hasserverprivilege(server: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for foreign server.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasserverprivilege"></a><code>hasserverprivilege(server: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for foreign server.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasserverprivilege"></a><code>hasserverprivilege(user: <a href="string.html">string</a>, server: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for foreign server.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasserverprivilege"></a><code>hasserverprivilege(user: <a href="string.html">string</a>, server: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for foreign server.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasserverprivilege"></a><code>hasserverprivilege(user: oid, server: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for foreign server.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hasserverprivilege"></a><code>hasserverprivilege(user: oid, server: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for foreign server.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastableprivilege"></a><code>hastableprivilege(table: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastableprivilege"></a><code>hastableprivilege(table: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastableprivilege"></a><code>hastableprivilege(user: <a href="string.html">string</a>, table: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastableprivilege"></a><code>hastableprivilege(user: <a href="string.html">string</a>, table: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastableprivilege"></a><code>hastableprivilege(user: oid, table: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastableprivilege"></a><code>hastableprivilege(user: oid, table: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for table.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastablespaceprivilege"></a><code>hastablespaceprivilege(tablespace: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for tablespace.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastablespaceprivilege"></a><code>hastablespaceprivilege(tablespace: oid, privilege: <a href="string.html">string</a>) &rarr; <a

class="funcdesc"><p>Returns whether or not the current user has privileges for tablespace.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastablespaceprivilege"></a><code>hastablespaceprivilege(user: <a href="string.html">string</a>, tablespace: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for tablespace.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastablespaceprivilege"></a><code>hastablespaceprivilege(user: <a href="string.html">string</a>, tablespace: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for tablespace.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastablespaceprivilege"></a><code>hastablespaceprivilege(user: oid, tablespace: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for tablespace.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastablespaceprivilege"></a><code>hastablespaceprivilege(user: oid, tablespace: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for tablespace.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastypeprivilege"></a><code>hastypeprivilege(type: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for type.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastypeprivilege"></a><code>hastypeprivilege(type: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for type.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastypeprivilege"></a><code>hastypeprivilege(user: <a href="string.html">string</a>, type: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for type.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastypeprivilege"></a><code>hastypeprivilege(user: <a href="string.html">string</a>, type: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for type.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastypeprivilege"></a><code>hastypeprivilege(user: oid, type: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for type.</p> </span></td><td>Stable</td></tr> <tr><td><a name="hastypeprivilege"></a><code>hastypeprivilege(user: oid, type: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for type.</p> </span></td><td>Stable</td></tr> <tr><td><a name="informationschema.pgnumericprecision"></a><code>informationschema.pgnumericprecision(typid: oid, typmod: int4) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the precision of the given type with type modifier</p> </span></td><td>Immutable</td></tr> <tr><td><a name="informationschema.pgnumericprecisionradix"></a><code>informationschema.pgnumericprecisionradix(typid: oid, typmod: int4) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the radix of the given type with type modifier</p> </span></td><td>Immutable</td></tr> <tr><td><a name="informationschema.pgnumericscale"></a><code>informationschema.pgnumericscale(typid: oid, typmod: int4) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the scale of the given type with type modifier</p> </span></td><td>Immutable</td></tr> <tr><td><a name="nameconcatoid"></a><code>nameconcatoid(name: <a href="string.html">string</a>, oid: oid) &rarr; name</code></td><td><span class="funcdesc"><p>Used in the informationschema to produce specificname columns, which are supposed to be unique per schema. The result is the same as ($1::text || _ || $2::text)::name except that, if it would not fit in 63 characters, we make it do so by truncating the name input (not the oid).</p> </span></td><td>Immutable</td></tr> <tr><td><a name="objdescription"></a><code>objdescription(object_oid: oid) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the comment for a database object specified by its OID alone. This is deprecated since there is no guarantee that OIDs are unique across different system catalogs; therefore, the wrong comment might be returned.</p> </span></td><td>Stable</td></tr> <tr><td><a name="objdescription"></a><code>objdescription(objectoid: oid, catalogname: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the comment for a database object specified by its OID and the name of the containing system catalog. For example, objdescription(123456, pgclass) would retrieve the comment for the table with OID 123456.</p> </span></td><td>Stable</td></tr> <tr><td><a name="oidvectortypes"></a><code>oidvectortypes(vector: oidvector) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Generates a comma seperated string of type names from an oidvector.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pgbackendpid"></a><code>pgbackendpid() &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns a numerical ID attached to this session. This ID is part of the query cancellation key used by the wire protocol. This function was only added for compatibility, and unlike in Postgres, the returned value does not correspond to a real process ID.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pgcollationfor"></a><code>pgcollationfor(str: anyelement) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the collation of the argument</p> </span></td><td>Stable</td></tr> <tr><td><a name="pgcolumnisupdatable"></a><code>pgcolumnisupdatable(reloid: oid, attnum: int2, include_triggers: <a href="bool.html">bool</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the given column can be updated.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pgcolumnsize"></a><code>pgcolumnsize(anyelement...) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Return size in bytes of the column provided as an argument</p> </span></td><td>Immutable</td></tr> <tr><td><a name="pgfunctionisvisible"></a><code>pgfunctionisvisible(oid: oid) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the function with the given OID belongs to one of the schemas on the search path.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetfunctionargdefault"></a><code>pggetfunctionargdefault(funcoid: oid, argnum: int4) &rarr; <a

class="funcdesc"><p>Get textual representation of a function arguments default value. The second argument of this function is the argument number among all arguments (i.e. proallargtypes, <em>not</em> proargtypes), starting with 1, because thats how information_schema.sql uses it. Currently, this always returns NULL, since CockroachDB does not support default values.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetfunctionarguments"></a><code>pggetfunctionarguments(func_oid: oid) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the argument list (with defaults) necessary to identify a function, in the form it would need to appear in within CREATE FUNCTION.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetfunctionidentityarguments"></a><code>pggetfunctionidentityarguments(func_oid: oid) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the argument list (without defaults) necessary to identify a function, in the form it would need to appear in within ALTER FUNCTION, for instance.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetfunctionresult"></a><code>pggetfunctionresult(func_oid: oid) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the types of the result of the specified function.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetfunctiondef"></a><code>pggetfunctiondef(func_oid: oid) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>For user-defined functions, returns the definition of the specified function. For builtin functions, returns the name of the function.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetindexdef"></a><code>pggetindexdef(index_oid: oid) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Gets the CREATE INDEX command for index</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetindexdef"></a><code>pggetindexdef(indexoid: oid, columnno: <a href="int.html">int</a>, pretty_bool: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Gets the CREATE INDEX command for index, or definition of just one index column when given a non-zero column number</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetserialsequence"></a><code>pggetserialsequence(tablename: <a href="string.html">string</a>, columnname: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the name of the sequence used by the given columnname in the table tablename.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetviewdef"></a><code>pggetviewdef(view_oid: oid) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the CREATE statement for an existing view.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pggetviewdef"></a><code>pggetviewdef(viewoid: oid, prettybool: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the CREATE statement for an existing view.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pghasrole"></a><code>pghasrole(role: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for role.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pghasrole"></a><code>pghasrole(role: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for role.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pghasrole"></a><code>pghasrole(user: <a href="string.html">string</a>, role: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for role.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pghasrole"></a><code>pghasrole(user: <a href="string.html">string</a>, role: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for role.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pghasrole"></a><code>pghasrole(user: oid, role: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for role.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pghasrole"></a><code>pghasrole(user: oid, role: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the user has privileges for role.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pgisothertempschema"></a><code>pgisothertempschema(oid: oid) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns true if the given OID is the OID of another sessions temporary schema. (This can be useful, for example, to exclude other sessions temporary tables from a catalog display.)</p> </span></td><td>Stable</td></tr> <tr><td><a name="pgmytempschema"></a><code>pgmytempschema() &rarr; oid</code></td><td><span class="funcdesc"><p>Returns the OID of the current sessions temporary schema, or zero if it has none (because it has not created any temporary tables).</p> </span></td><td>Stable</td></tr> <tr><td><a name="pgrelationisupdatable"></a><code>pgrelationisupdatable(reloid: oid, include_triggers: <a href="bool.html">bool</a>) &rarr; int4</code></td><td><span class="funcdesc"><p>Returns the update events the relation supports.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pgsequencelastvalue"></a><code>pgsequencelastvalue(sequence_oid: oid) &rarr; <a href="int.html">int</a></code></td><td><span class="funcdesc"><p>Returns the last value generated by a sequence, or NULL if the sequence has not been used yet.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="pgsleep"></a><code>pgsleep(seconds: <a href="float.html">float</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>pg_sleep makes the current sessions process sleep until seconds seconds have elapsed. seconds is a value of type double precision, so fractional-second delays can be specified.</p> </span></td><td>Volatile</td></tr> <tr><td><a name="pgtableisvisible"></a><code>pgtableisvisible(oid: oid) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the table with the given OID belongs to one of the schemas on the search path.</p> </span></td><td>Stable</td></tr> <tr><td><a name="pgtypeisvisible"></a><code>pgtypeisvisible(oid: oid) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether the type with the given OID belongs to one of the schemas on the search path.</p> </span></td><td>Stable</td></tr> <tr><td><a name="setconfig"></a><code>setconfig(settingname: <a href="string.html">string</a>, newvalue: <a href="string.html">string</a>, is_local: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>System info</p> </span></td><td>Volatile</td></tr>