mirror of
https://github.com/postgres/postgres.git
synced 2025-05-24 00:03:23 -04:00
Doc: update remaining tables of functions/operators for new layout.
This converts the contrib documentation to the new style, and mops up a couple of function tables that were outside chapter 9 in the main docs. A few contrib modules choose not to present their functions in the standard tabular format. There might be room to rethink those decisions now that the standard format is more friendly to verbose descriptions. But I have not undertaken to do that here; I just converted existing tables.
This commit is contained in:
parent
c265ed9b35
commit
b2fd8ebe23
@ -29,49 +29,69 @@
|
|||||||
|
|
||||||
<table id="functions-adminpack-table">
|
<table id="functions-adminpack-table">
|
||||||
<title><filename>adminpack</filename> Functions</title>
|
<title><filename>adminpack</filename> Functions</title>
|
||||||
<tgroup cols="3">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry>
|
<row>
|
||||||
</row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
</thead>
|
Function
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><function>pg_catalog.pg_file_write(filename text, data text, append boolean)</function></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>bigint</type></entry>
|
<function>pg_catalog.pg_file_write</function> ( <parameter>filename</parameter> <type>text</type>, <parameter>data</parameter> <type>text</type>, <parameter>append</parameter> <type>boolean</type> )
|
||||||
<entry>
|
<returnvalue>bigint</returnvalue>
|
||||||
Write, or append to, a text file
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
</row>
|
Writes, or appends to, a text file.
|
||||||
<row>
|
</para></entry>
|
||||||
<entry><function>pg_catalog.pg_file_sync(filename text)</function></entry>
|
</row>
|
||||||
<entry><type>void</type></entry>
|
|
||||||
<entry>
|
<row>
|
||||||
Flush a file or directory to disk
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
</entry>
|
<function>pg_catalog.pg_file_sync</function> ( <parameter>filename</parameter> <type>text</type> )
|
||||||
</row>
|
<returnvalue>void</returnvalue>
|
||||||
<row>
|
</para>
|
||||||
<entry><function>pg_catalog.pg_file_rename(oldname text, newname text <optional>, archivename text</optional>)</function></entry>
|
<para>
|
||||||
<entry><type>boolean</type></entry>
|
Flushes a file or directory to disk.
|
||||||
<entry>
|
</para></entry>
|
||||||
Rename a file
|
</row>
|
||||||
</entry>
|
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><function>pg_catalog.pg_file_unlink(filename text)</function></entry>
|
<function>pg_catalog.pg_file_rename</function> ( <parameter>oldname</parameter> <type>text</type>, <parameter>newname</parameter> <type>text</type> <optional>, <parameter>archivename</parameter> <type>text</type> </optional> )
|
||||||
<entry><type>boolean</type></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry>
|
</para>
|
||||||
Remove a file
|
<para>
|
||||||
</entry>
|
Renames a file.
|
||||||
</row>
|
</para></entry>
|
||||||
<row>
|
</row>
|
||||||
<entry><function>pg_catalog.pg_logdir_ls()</function></entry>
|
|
||||||
<entry><type>setof record</type></entry>
|
<row>
|
||||||
<entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
List the log files in the <varname>log_directory</varname> directory
|
<function>pg_catalog.pg_file_unlink</function> ( <parameter>filename</parameter> <type>text</type> )
|
||||||
</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
</tbody>
|
<para>
|
||||||
|
Removes a file.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>pg_catalog.pg_logdir_ls</function> ()
|
||||||
|
<returnvalue>setof record</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Lists the log files in the <varname>log_directory</varname> directory.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -112,114 +112,113 @@
|
|||||||
<title>Usage</title>
|
<title>Usage</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<xref linkend="cube-operators-table"/> shows the operators provided for
|
<xref linkend="cube-operators-table"/> shows the specialized operators
|
||||||
type <type>cube</type>.
|
provided for type <type>cube</type>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table id="cube-operators-table">
|
<table id="cube-operators-table">
|
||||||
<title>Cube Operators</title>
|
<title>Cube Operators</title>
|
||||||
<tgroup cols="3">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Operator</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Result</entry>
|
Operator
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
</thead>
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>a = b</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>cube</type> <literal>&&</literal> <type>cube</type>
|
||||||
<entry>The cubes a and b are identical.</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Do the cubes overlap?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>a && b</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>cube</type> <literal>@></literal> <type>cube</type>
|
||||||
<entry>The cubes a and b overlap.</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Does the first cube contain the second?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>a @> b</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>cube</type> <literal><@</literal> <type>cube</type>
|
||||||
<entry>The cube a contains the cube b.</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Is the first cube contained in the second?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>a <@ b</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>cube</type> <literal>-></literal> <type>integer</type>
|
||||||
<entry>The cube a is contained in the cube b.</entry>
|
<returnvalue>float8</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Extracts the <parameter>n</parameter>-th coordinate of the cube
|
||||||
|
(counting from 1).
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>a < b</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>cube</type> <literal>~></literal> <type>integer</type>
|
||||||
<entry>The cube a is less than the cube b.</entry>
|
<returnvalue>float8</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
<row>
|
Extracts the <parameter>n</parameter>-th coordinate of the cube,
|
||||||
<entry><literal>a <= b</literal></entry>
|
counting in the following way: <parameter>n</parameter> = 2
|
||||||
<entry><type>boolean</type></entry>
|
* <parameter>k</parameter> - 1 means lower bound
|
||||||
<entry>The cube a is less than or equal to the cube b.</entry>
|
of <parameter>k</parameter>-th dimension, <parameter>n</parameter> = 2
|
||||||
</row>
|
* <parameter>k</parameter> means upper bound of
|
||||||
|
<parameter>k</parameter>-th dimension. Negative
|
||||||
<row>
|
<parameter>n</parameter> denotes the inverse value of the corresponding
|
||||||
<entry><literal>a > b</literal></entry>
|
|
||||||
<entry><type>boolean</type></entry>
|
|
||||||
<entry>The cube a is greater than the cube b.</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal>a >= b</literal></entry>
|
|
||||||
<entry><type>boolean</type></entry>
|
|
||||||
<entry>The cube a is greater than or equal to the cube b.</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal>a <> b</literal></entry>
|
|
||||||
<entry><type>boolean</type></entry>
|
|
||||||
<entry>The cube a is not equal to the cube b.</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal>a -> n</literal></entry>
|
|
||||||
<entry><type>float8</type></entry>
|
|
||||||
<entry>Get <replaceable>n</replaceable>-th coordinate of cube (counting from 1).</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal>a ~> n</literal></entry>
|
|
||||||
<entry><type>float8</type></entry>
|
|
||||||
<entry>
|
|
||||||
Get <replaceable>n</replaceable>-th coordinate of cube in following way:
|
|
||||||
n = 2 * k - 1 means lower bound of <replaceable>k</replaceable>-th
|
|
||||||
dimension, n = 2 * k means upper bound of
|
|
||||||
<replaceable>k</replaceable>-th dimension. Negative
|
|
||||||
<replaceable>n</replaceable> denotes the inverse value of the corresponding
|
|
||||||
positive coordinate. This operator is designed for KNN-GiST support.
|
positive coordinate. This operator is designed for KNN-GiST support.
|
||||||
</entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>a <-> b</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>float8</type></entry>
|
<type>cube</type> <literal><-></literal> <type>cube</type>
|
||||||
<entry>Euclidean distance between a and b.</entry>
|
<returnvalue>float8</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Computes the Euclidean distance between the two cubes.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>a <#> b</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>float8</type></entry>
|
<type>cube</type> <literal><#></literal> <type>cube</type>
|
||||||
<entry>Taxicab (L-1 metric) distance between a and b.</entry>
|
<returnvalue>float8</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Computes the taxicab (L-1 metric) distance between the two cubes.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>a <=> b</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>float8</type></entry>
|
<type>cube</type> <literal><=></literal> <type>cube</type>
|
||||||
<entry>Chebyshev (L-inf metric) distance between a and b.</entry>
|
<returnvalue>float8</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
</tbody>
|
Computes the Chebyshev (L-inf metric) distance between the two cubes.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -232,12 +231,14 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The scalar ordering operators (<literal><</literal>, <literal>>=</literal>, etc)
|
In addition to the above operators, the usual comparison
|
||||||
do not make a lot of sense for any practical purpose but sorting. These
|
operators shown in <xref linkend="functions-comparison-op-table"/> are
|
||||||
|
available for type <type>cube</type>. These
|
||||||
operators first compare the first coordinates, and if those are equal,
|
operators first compare the first coordinates, and if those are equal,
|
||||||
compare the second coordinates, etc. They exist mainly to support the
|
compare the second coordinates, etc. They exist mainly to support the
|
||||||
b-tree index operator class for <type>cube</type>, which can be useful for
|
b-tree index operator class for <type>cube</type>, which can be useful for
|
||||||
example if you would like a UNIQUE constraint on a <type>cube</type> column.
|
example if you would like a UNIQUE constraint on a <type>cube</type> column.
|
||||||
|
Otherwise, this ordering is not of much practical use.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -281,195 +282,262 @@ SELECT c FROM test ORDER BY c ~> 3 DESC LIMIT 5;
|
|||||||
|
|
||||||
<table id="cube-functions-table">
|
<table id="cube-functions-table">
|
||||||
<title>Cube Functions</title>
|
<title>Cube Functions</title>
|
||||||
<tgroup cols="4">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Function</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Result</entry>
|
Function
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
<entry>Example</entry>
|
<para>
|
||||||
</row>
|
Description
|
||||||
</thead>
|
</para>
|
||||||
|
<para>
|
||||||
|
Example(s)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube(float8)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>cube</type></entry>
|
<function>cube</function> ( <type>float8</type> )
|
||||||
<entry>Makes a one dimensional cube with both coordinates the same.
|
<returnvalue>cube</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
<literal>cube(1) == '(1)'</literal>
|
Makes a one dimensional cube with both coordinates the same.
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
<literal>cube(1)</literal>
|
||||||
|
<returnvalue>(1)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube(float8, float8)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>cube</type></entry>
|
<function>cube</function> ( <type>float8</type>, <type>float8</type> )
|
||||||
<entry>Makes a one dimensional cube.
|
<returnvalue>cube</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
<literal>cube(1,2) == '(1),(2)'</literal>
|
Makes a one dimensional cube.
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
<literal>cube(1,2)</literal>
|
||||||
|
<returnvalue>(1),(2)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube(float8[])</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>cube</type></entry>
|
<function>cube</function> ( <type>float8[]</type> )
|
||||||
<entry>Makes a zero-volume cube using the coordinates
|
<returnvalue>cube</returnvalue>
|
||||||
defined by the array.
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
<entry>
|
Makes a zero-volume cube using the coordinates defined by the array.
|
||||||
<literal>cube(ARRAY[1,2]) == '(1,2)'</literal>
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
</row>
|
<literal>cube(ARRAY[1,2,3])</literal>
|
||||||
|
<returnvalue>(1, 2, 3)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube(float8[], float8[])</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>cube</type></entry>
|
<function>cube</function> ( <type>float8[]</type>, <type>float8[]</type> )
|
||||||
<entry>Makes a cube with upper right and lower left
|
<returnvalue>cube</returnvalue>
|
||||||
coordinates as defined by the two arrays, which must be of the
|
</para>
|
||||||
same length.
|
<para>
|
||||||
</entry>
|
Makes a cube with upper right and lower left coordinates as defined by
|
||||||
<entry>
|
the two arrays, which must be of the same length.
|
||||||
<literal>cube(ARRAY[1,2], ARRAY[3,4]) == '(1,2),(3,4)'
|
</para>
|
||||||
</literal>
|
<para>
|
||||||
</entry>
|
<literal>cube(ARRAY[1,2], ARRAY[3,4])</literal>
|
||||||
</row>
|
<returnvalue>(1, 2),(3, 4)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube(cube, float8)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>cube</type></entry>
|
<function>cube</function> ( <type>cube</type>, <type>float8</type> )
|
||||||
<entry>Makes a new cube by adding a dimension on to an existing cube,
|
<returnvalue>cube</returnvalue>
|
||||||
with the same values for both endpoints of the new coordinate. This
|
</para>
|
||||||
is useful for building cubes piece by piece from calculated values.
|
<para>
|
||||||
</entry>
|
Makes a new cube by adding a dimension on to an existing cube,
|
||||||
<entry>
|
with the same values for both endpoints of the new coordinate. This
|
||||||
<literal>cube('(1,2),(3,4)'::cube, 5) == '(1,2,5),(3,4,5)'</literal>
|
is useful for building cubes piece by piece from calculated values.
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
<literal>cube('(1,2),(3,4)'::cube, 5)</literal>
|
||||||
|
<returnvalue>(1, 2, 5),(3, 4, 5)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube(cube, float8, float8)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>cube</type></entry>
|
<function>cube</function> ( <type>cube</type>, <type>float8</type>, <type>float8</type> )
|
||||||
<entry>Makes a new cube by adding a dimension on to an existing
|
<returnvalue>cube</returnvalue>
|
||||||
cube. This is useful for building cubes piece by piece from calculated
|
</para>
|
||||||
values.
|
<para>
|
||||||
</entry>
|
Makes a new cube by adding a dimension on to an existing cube. This is
|
||||||
<entry>
|
useful for building cubes piece by piece from calculated values.
|
||||||
<literal>cube('(1,2),(3,4)'::cube, 5, 6) == '(1,2,5),(3,4,6)'</literal>
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
</row>
|
<literal>cube('(1,2),(3,4)'::cube, 5, 6)</literal>
|
||||||
|
<returnvalue>(1, 2, 5),(3, 4, 6)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube_dim(cube)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>integer</type></entry>
|
<function>cube_dim</function> ( <type>cube</type> )
|
||||||
<entry>Returns the number of dimensions of the cube.
|
<returnvalue>integer</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
<literal>cube_dim('(1,2),(3,4)') == '2'</literal>
|
Returns the number of dimensions of the cube.
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
<literal>cube_dim('(1,2),(3,4)')</literal>
|
||||||
|
<returnvalue>2</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube_ll_coord(cube, integer)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>float8</type></entry>
|
<function>cube_ll_coord</function> ( <type>cube</type>, <type>integer</type> )
|
||||||
<entry>Returns the <replaceable>n</replaceable>-th coordinate value for the lower
|
<returnvalue>float8</returnvalue>
|
||||||
left corner of the cube.
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
<entry>
|
Returns the <parameter>n</parameter>-th coordinate value for the lower
|
||||||
<literal>cube_ll_coord('(1,2),(3,4)', 2) == '2'</literal>
|
left corner of the cube.
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
<literal>cube_ll_coord('(1,2),(3,4)', 2)</literal>
|
||||||
|
<returnvalue>2</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube_ur_coord(cube, integer)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>float8</type></entry>
|
<function>cube_ur_coord</function> ( <type>cube</type>, <type>integer</type> )
|
||||||
<entry>Returns the <replaceable>n</replaceable>-th coordinate value for the
|
<returnvalue>float8</returnvalue>
|
||||||
upper right corner of the cube.
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
<entry>
|
Returns the <parameter>n</parameter>-th coordinate value for the
|
||||||
<literal>cube_ur_coord('(1,2),(3,4)', 2) == '4'</literal>
|
upper right corner of the cube.
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
<literal>cube_ur_coord('(1,2),(3,4)', 2)</literal>
|
||||||
|
<returnvalue>4</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube_is_point(cube)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<function>cube_is_point</function> ( <type>cube</type> )
|
||||||
<entry>Returns true if the cube is a point, that is,
|
<returnvalue>boolean</returnvalue>
|
||||||
the two defining corners are the same.</entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
</entry>
|
Returns true if the cube is a point, that is,
|
||||||
</row>
|
the two defining corners are the same.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>cube_is_point(cube(1,1))</literal>
|
||||||
|
<returnvalue>t</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube_distance(cube, cube)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>float8</type></entry>
|
<function>cube_distance</function> ( <type>cube</type>, <type>cube</type> )
|
||||||
<entry>Returns the distance between two cubes. If both
|
<returnvalue>float8</returnvalue>
|
||||||
cubes are points, this is the normal distance function.
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
<entry>
|
Returns the distance between two cubes. If both
|
||||||
</entry>
|
cubes are points, this is the normal distance function.
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>cube_distance('(1,2)', '(3,4)')</literal>
|
||||||
|
<returnvalue>2.8284271247461903</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube_subset(cube, integer[])</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>cube</type></entry>
|
<function>cube_subset</function> ( <type>cube</type>, <type>integer[]</type> )
|
||||||
<entry>Makes a new cube from an existing cube, using a list of
|
<returnvalue>cube</returnvalue>
|
||||||
dimension indexes from an array. Can be used to extract the endpoints
|
</para>
|
||||||
of a single dimension, or to drop dimensions, or to reorder them as
|
<para>
|
||||||
desired.
|
Makes a new cube from an existing cube, using a list of
|
||||||
</entry>
|
dimension indexes from an array. Can be used to extract the endpoints
|
||||||
<entry>
|
of a single dimension, or to drop dimensions, or to reorder them as
|
||||||
<literal>cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[2]) == '(3),(7)'</literal>
|
desired.
|
||||||
<literal>cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]) ==
|
</para>
|
||||||
'(5,3,1,1),(8,7,6,6)'</literal>
|
<para>
|
||||||
</entry>
|
<literal>cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[2])</literal>
|
||||||
</row>
|
<returnvalue>(3),(7)</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1])</literal>
|
||||||
|
<returnvalue>(5, 3, 1, 1),(8, 7, 6, 6)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube_union(cube, cube)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>cube</type></entry>
|
<function>cube_union</function> ( <type>cube</type>, <type>cube</type> )
|
||||||
<entry>Produces the union of two cubes.
|
<returnvalue>cube</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
</entry>
|
Produces the union of two cubes.
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>cube_union('(1,2)', '(3,4)')</literal>
|
||||||
|
<returnvalue>(1, 2),(3, 4)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube_inter(cube, cube)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>cube</type></entry>
|
<function>cube_inter</function> ( <type>cube</type>, <type>cube</type> )
|
||||||
<entry>Produces the intersection of two cubes.
|
<returnvalue>cube</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
</entry>
|
Produces the intersection of two cubes.
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>cube_inter('(1,2)', '(3,4)')</literal>
|
||||||
|
<returnvalue>(3, 4),(1, 2)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>cube_enlarge(c cube, r double, n integer)</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>cube</type></entry>
|
<function>cube_enlarge</function> ( <parameter>c</parameter> <type>cube</type>, <parameter>r</parameter> <type>double</type>, <parameter>n</parameter> <type>integer</type> )
|
||||||
<entry>Increases the size of the cube by the specified
|
<returnvalue>cube</returnvalue>
|
||||||
radius <replaceable>r</replaceable> in at least <replaceable>n</replaceable> dimensions.
|
</para>
|
||||||
If the radius is negative the cube is shrunk instead.
|
<para>
|
||||||
All defined dimensions are changed by the radius <replaceable>r</replaceable>.
|
Increases the size of the cube by the specified
|
||||||
Lower-left coordinates are decreased by <replaceable>r</replaceable> and
|
radius <parameter>r</parameter> in at least <parameter>n</parameter>
|
||||||
upper-right coordinates are increased by <replaceable>r</replaceable>. If a
|
dimensions. If the radius is negative the cube is shrunk instead.
|
||||||
lower-left coordinate is increased to more than the corresponding
|
All defined dimensions are changed by the
|
||||||
upper-right coordinate (this can only happen when <replaceable>r</replaceable>
|
radius <parameter>r</parameter>. Lower-left coordinates are decreased
|
||||||
< 0) than both coordinates are set to their average.
|
by <parameter>r</parameter> and upper-right coordinates are increased
|
||||||
If <replaceable>n</replaceable> is greater than the number of defined dimensions
|
by <parameter>r</parameter>. If a lower-left coordinate is increased
|
||||||
and the cube is being enlarged (<replaceable>r</replaceable> > 0), then extra
|
to more than the corresponding upper-right coordinate (this can only
|
||||||
dimensions are added to make <replaceable>n</replaceable> altogether;
|
happen when <parameter>r</parameter> < 0) than both coordinates are
|
||||||
0 is used as the initial value for the extra coordinates.
|
set to their average. If <parameter>n</parameter> is greater than the
|
||||||
This function is useful for creating bounding boxes around a point for
|
number of defined dimensions and the cube is being enlarged
|
||||||
searching for nearby points.
|
(<parameter>r</parameter> > 0), then extra dimensions are added to
|
||||||
</entry>
|
make <parameter>n</parameter> altogether; 0 is used as the initial
|
||||||
<entry>
|
value for the extra coordinates. This function is useful for creating
|
||||||
<literal>cube_enlarge('(1,2),(3,4)', 0.5, 3) ==
|
bounding boxes around a point for searching for nearby points.
|
||||||
'(0.5,1.5,-0.5),(3.5,4.5,0.5)'</literal>
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
</row>
|
<literal>cube_enlarge('(1,2),(3,4)', 0.5, 3)</literal>
|
||||||
</tbody>
|
<returnvalue>(0.5, 1.5, -0.5),(3.5, 4.5, 0.5)</returnvalue>
|
||||||
</tgroup>
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
@ -67,76 +67,120 @@
|
|||||||
|
|
||||||
<table id="earthdistance-cube-functions">
|
<table id="earthdistance-cube-functions">
|
||||||
<title>Cube-Based Earthdistance Functions</title>
|
<title>Cube-Based Earthdistance Functions</title>
|
||||||
<tgroup cols="3">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Function</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Returns</entry>
|
Function
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
</thead>
|
Description
|
||||||
<tbody>
|
</para></entry>
|
||||||
<row>
|
</row>
|
||||||
<entry><function>earth()</function><indexterm><primary>earth</primary></indexterm></entry>
|
</thead>
|
||||||
<entry><type>float8</type></entry>
|
|
||||||
<entry>Returns the assumed radius of the Earth.</entry>
|
<tbody>
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><function>sec_to_gc(float8)</function><indexterm><primary>sec_to_gc</primary></indexterm></entry>
|
<indexterm><primary>earth</primary></indexterm>
|
||||||
<entry><type>float8</type></entry>
|
<function>earth</function> ()
|
||||||
<entry>Converts the normal straight line
|
<returnvalue>float8</returnvalue>
|
||||||
(secant) distance between two points on the surface of the Earth
|
</para>
|
||||||
to the great circle distance between them.
|
<para>
|
||||||
</entry>
|
Returns the assumed radius of the Earth.
|
||||||
</row>
|
</para></entry>
|
||||||
<row>
|
</row>
|
||||||
<entry><function>gc_to_sec(float8)</function><indexterm><primary>gc_to_sec</primary></indexterm></entry>
|
|
||||||
<entry><type>float8</type></entry>
|
<row>
|
||||||
<entry>Converts the great circle distance between two points on the
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
surface of the Earth to the normal straight line (secant) distance
|
<indexterm><primary>sec_to_gc</primary></indexterm>
|
||||||
between them.
|
<function>sec_to_gc</function> ( <type>float8</type> )
|
||||||
</entry>
|
<returnvalue>float8</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
<row>
|
<para>
|
||||||
<entry><function>ll_to_earth(float8, float8)</function><indexterm><primary>ll_to_earth</primary></indexterm></entry>
|
Converts the normal straight line
|
||||||
<entry><type>earth</type></entry>
|
(secant) distance between two points on the surface of the Earth
|
||||||
<entry>Returns the location of a point on the surface of the Earth given
|
to the great circle distance between them.
|
||||||
its latitude (argument 1) and longitude (argument 2) in degrees.
|
</para></entry>
|
||||||
</entry>
|
</row>
|
||||||
</row>
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>latitude(earth)</function><indexterm><primary>latitude</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>float8</type></entry>
|
<indexterm><primary>gc_to_sec</primary></indexterm>
|
||||||
<entry>Returns the latitude in degrees of a point on the surface of the
|
<function>gc_to_sec</function> ( <type>float8</type> )
|
||||||
Earth.
|
<returnvalue>float8</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
<row>
|
Converts the great circle distance between two points on the
|
||||||
<entry><function>longitude(earth)</function><indexterm><primary>longitude</primary></indexterm></entry>
|
surface of the Earth to the normal straight line (secant) distance
|
||||||
<entry><type>float8</type></entry>
|
between them.
|
||||||
<entry>Returns the longitude in degrees of a point on the surface of the
|
</para></entry>
|
||||||
Earth.
|
</row>
|
||||||
</entry>
|
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><function>earth_distance(earth, earth)</function><indexterm><primary>earth_distance</primary></indexterm></entry>
|
<indexterm><primary>ll_to_earth</primary></indexterm>
|
||||||
<entry><type>float8</type></entry>
|
<function>ll_to_earth</function> ( <type>float8</type>, <type>float8</type> )
|
||||||
<entry>Returns the great circle distance between two points on the
|
<returnvalue>earth</returnvalue>
|
||||||
surface of the Earth.
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
</row>
|
Returns the location of a point on the surface of the Earth given
|
||||||
<row>
|
its latitude (argument 1) and longitude (argument 2) in degrees.
|
||||||
<entry><function>earth_box(earth, float8)</function><indexterm><primary>earth_box</primary></indexterm></entry>
|
</para></entry>
|
||||||
<entry><type>cube</type></entry>
|
</row>
|
||||||
<entry>Returns a box suitable for an indexed search using the cube
|
|
||||||
<literal>@></literal>
|
<row>
|
||||||
operator for points within a given great circle distance of a location.
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
Some points in this box are further than the specified great circle
|
<indexterm><primary>latitude</primary></indexterm>
|
||||||
distance from the location, so a second check using
|
<function>latitude</function> ( <type>earth</type> )
|
||||||
<function>earth_distance</function> should be included in the query.
|
<returnvalue>float8</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
</tbody>
|
Returns the latitude in degrees of a point on the surface of the
|
||||||
|
Earth.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>longitude</primary></indexterm>
|
||||||
|
<function>longitude</function> ( <type>earth</type> )
|
||||||
|
<returnvalue>float8</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the longitude in degrees of a point on the surface of the
|
||||||
|
Earth.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>earth_distance</primary></indexterm>
|
||||||
|
<function>earth_distance</function> ( <type>earth</type>, <type>earth</type> )
|
||||||
|
<returnvalue>float8</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the great circle distance between two points on the
|
||||||
|
surface of the Earth.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>earth_box</primary></indexterm>
|
||||||
|
<function>earth_box</function> ( <type>earth</type>, <type>float8</type> )
|
||||||
|
<returnvalue>cube</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns a box suitable for an indexed search using the <type>cube</type>
|
||||||
|
<literal>@></literal>
|
||||||
|
operator for points within a given great circle distance of a location.
|
||||||
|
Some points in this box are further than the specified great circle
|
||||||
|
distance from the location, so a second check using
|
||||||
|
<function>earth_distance</function> should be included in the query.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -161,23 +205,29 @@
|
|||||||
|
|
||||||
<table id="earthdistance-point-operators">
|
<table id="earthdistance-point-operators">
|
||||||
<title>Point-Based Earthdistance Operators</title>
|
<title>Point-Based Earthdistance Operators</title>
|
||||||
<tgroup cols="3">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Operator</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Returns</entry>
|
Operator
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
</thead>
|
Description
|
||||||
<tbody>
|
</para></entry>
|
||||||
<row>
|
</row>
|
||||||
<entry><type>point</type> <literal><@></literal> <type>point</type></entry>
|
</thead>
|
||||||
<entry><type>float8</type></entry>
|
<tbody>
|
||||||
<entry>Gives the distance in statute miles between
|
<row>
|
||||||
two points on the Earth's surface.
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
</entry>
|
<type>point</type> <literal><@></literal> <type>point</type>
|
||||||
</row>
|
<returnvalue>float8</returnvalue>
|
||||||
</tbody>
|
</para>
|
||||||
|
<para>
|
||||||
|
Computes the distance in statute miles between
|
||||||
|
two points on the Earth's surface.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -99,118 +99,223 @@ key => NULL
|
|||||||
|
|
||||||
<table id="hstore-op-table">
|
<table id="hstore-op-table">
|
||||||
<title><type>hstore</type> Operators</title>
|
<title><type>hstore</type> Operators</title>
|
||||||
|
<tgroup cols="1">
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
Operator
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Description
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Example(s)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tgroup cols="4">
|
<tbody>
|
||||||
<thead>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Operator</entry>
|
<type>hstore</type> <literal>-></literal> <type>text</type>
|
||||||
<entry>Description</entry>
|
<returnvalue>text</returnvalue>
|
||||||
<entry>Example</entry>
|
</para>
|
||||||
<entry>Result</entry>
|
<para>
|
||||||
</row>
|
Returns value associated with given key, or <literal>NULL</literal> if
|
||||||
</thead>
|
not present.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>x, b=>y'::hstore -> 'a'</literal>
|
||||||
|
<returnvalue>x</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<tbody>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>hstore</type> <literal>-></literal> <type>text</type></entry>
|
<type>hstore</type> <literal>-></literal> <type>text[]</type>
|
||||||
<entry>get value for key (<literal>NULL</literal> if not present)</entry>
|
<returnvalue>text[]</returnvalue>
|
||||||
<entry><literal>'a=>x, b=>y'::hstore -> 'a'</literal></entry>
|
</para>
|
||||||
<entry><literal>x</literal></entry>
|
<para>
|
||||||
</row>
|
Returns values associated with given keys, or <literal>NULL</literal>
|
||||||
|
if not present.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>x, b=>y, c=>z'::hstore -> ARRAY['c','a']</literal>
|
||||||
|
<returnvalue>{"z","x"}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>hstore</type> <literal>-></literal> <type>text[]</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>get values for keys (<literal>NULL</literal> if not present)</entry>
|
<type>hstore</type> <literal>||</literal> <type>hstore</type>
|
||||||
<entry><literal>'a=>x, b=>y, c=>z'::hstore -> ARRAY['c','a']</literal></entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry><literal>{"z","x"}</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Concatenates two <type>hstore</type>s.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>b, c=>d'::hstore || 'c=>x, d=>q'::hstore</literal>
|
||||||
|
<returnvalue>"a"=>"b", "c"=>"x", "d"=>"q"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>hstore</type> <literal>||</literal> <type>hstore</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>concatenate <type>hstore</type>s</entry>
|
<type>hstore</type> <literal>?</literal> <type>text</type>
|
||||||
<entry><literal>'a=>b, c=>d'::hstore || 'c=>x, d=>q'::hstore</literal></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry><literal>"a"=>"b", "c"=>"x", "d"=>"q"</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Does <type>hstore</type> contain key?
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>1'::hstore ? 'a'</literal>
|
||||||
|
<returnvalue>t</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>hstore</type> <literal>?</literal> <type>text</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>does <type>hstore</type> contain key?</entry>
|
<type>hstore</type> <literal>?&</literal> <type>text[]</type>
|
||||||
<entry><literal>'a=>1'::hstore ? 'a'</literal></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry><literal>t</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Does <type>hstore</type> contain all the specified keys?
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>1,b=>2'::hstore ?& ARRAY['a','b']</literal>
|
||||||
|
<returnvalue>t</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>hstore</type> <literal>?&</literal> <type>text[]</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>does <type>hstore</type> contain all specified keys?</entry>
|
<type>hstore</type> <literal>?|</literal> <type>text[]</type>
|
||||||
<entry><literal>'a=>1,b=>2'::hstore ?& ARRAY['a','b']</literal></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry><literal>t</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Does <type>hstore</type> contain any of the specified keys?
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>1,b=>2'::hstore ?| ARRAY['b','c']</literal>
|
||||||
|
<returnvalue>t</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>hstore</type> <literal>?|</literal> <type>text[]</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>does <type>hstore</type> contain any of the specified keys?</entry>
|
<type>hstore</type> <literal>@></literal> <type>hstore</type>
|
||||||
<entry><literal>'a=>1,b=>2'::hstore ?| ARRAY['b','c']</literal></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry><literal>t</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Does left operand contain right?
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>b, b=>1, c=>NULL'::hstore @> 'b=>1'</literal>
|
||||||
|
<returnvalue>t</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>hstore</type> <literal>@></literal> <type>hstore</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>does left operand contain right?</entry>
|
<type>hstore</type> <literal><@</literal> <type>hstore</type>
|
||||||
<entry><literal>'a=>b, b=>1, c=>NULL'::hstore @> 'b=>1'</literal></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry><literal>t</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Is left operand contained in right?
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>c'::hstore <@ 'a=>b, b=>1, c=>NULL'</literal>
|
||||||
|
<returnvalue>f</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>hstore</type> <literal><@</literal> <type>hstore</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>is left operand contained in right?</entry>
|
<type>hstore</type> <literal>-</literal> <type>text</type>
|
||||||
<entry><literal>'a=>c'::hstore <@ 'a=>b, b=>1, c=>NULL'</literal></entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry><literal>f</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Deletes key from left operand.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>1, b=>2, c=>3'::hstore - 'b'::text</literal>
|
||||||
|
<returnvalue>"a"=>"1", "c"=>"3"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>hstore</type> <literal>-</literal> <type>text</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>delete key from left operand</entry>
|
<type>hstore</type> <literal>-</literal> <type>text[]</type>
|
||||||
<entry><literal>'a=>1, b=>2, c=>3'::hstore - 'b'::text</literal></entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry><literal>"a"=>"1", "c"=>"3"</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Deletes keys from left operand.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>1, b=>2, c=>3'::hstore - ARRAY['a','b']</literal>
|
||||||
|
<returnvalue>"c"=>"3"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>hstore</type> <literal>-</literal> <type>text[]</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>delete keys from left operand</entry>
|
<type>hstore</type> <literal>-</literal> <type>hstore</type>
|
||||||
<entry><literal>'a=>1, b=>2, c=>3'::hstore - ARRAY['a','b']</literal></entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry><literal>"c"=>"3"</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Deletes pairs from left operand that match pairs in the right operand.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>'a=>1, b=>2, c=>3'::hstore - 'a=>4, b=>2'::hstore</literal>
|
||||||
|
<returnvalue>"a"=>"1", "c"=>"3"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>hstore</type> <literal>-</literal> <type>hstore</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>delete matching pairs from left operand</entry>
|
<type>anyelement</type> <literal>#=</literal> <type>hstore</type>
|
||||||
<entry><literal>'a=>1, b=>2, c=>3'::hstore - 'a=>4, b=>2'::hstore</literal></entry>
|
<returnvalue>anyelement</returnvalue>
|
||||||
<entry><literal>"a"=>"1", "c"=>"3"</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Replaces fields in the left operand (which must be a composite type)
|
||||||
|
with matching values from <type>hstore</type>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>ROW(1,3) #= 'f1=>11'::hstore</literal>
|
||||||
|
<returnvalue>(11,3)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>record</type> <literal>#=</literal> <type>hstore</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>replace fields in <type>record</type> with matching values from <type>hstore</type></entry>
|
<literal>%%</literal> <type>hstore</type>
|
||||||
<entry>see Examples section</entry>
|
<returnvalue>text[]</returnvalue>
|
||||||
<entry></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Converts <type>hstore</type> to an array of alternating keys and
|
||||||
|
values.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>%% 'a=>foo, b=>bar'::hstore</literal>
|
||||||
|
<returnvalue>{a,foo,b,bar}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>%%</literal> <type>hstore</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>convert <type>hstore</type> to array of alternating keys and values</entry>
|
<literal>%#</literal> <type>hstore</type>
|
||||||
<entry><literal>%% 'a=>foo, b=>bar'::hstore</literal></entry>
|
<returnvalue>text[]</returnvalue>
|
||||||
<entry><literal>{a,foo,b,bar}</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Converts <type>hstore</type> to a two-dimensional key/value array.
|
||||||
<row>
|
</para>
|
||||||
<entry><literal>%#</literal> <type>hstore</type></entry>
|
<para>
|
||||||
<entry>convert <type>hstore</type> to two-dimensional key/value array</entry>
|
<literal>%# 'a=>foo, b=>bar'::hstore</literal>
|
||||||
<entry><literal>%# 'a=>foo, b=>bar'::hstore</literal></entry>
|
<returnvalue>{{a,foo},{b,bar}}</returnvalue>
|
||||||
<entry><literal>{{a,foo},{b,bar}}</literal></entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
|
</tbody>
|
||||||
</tbody>
|
</tgroup>
|
||||||
</tgroup>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
@ -225,233 +330,389 @@ key => NULL
|
|||||||
|
|
||||||
<table id="hstore-func-table">
|
<table id="hstore-func-table">
|
||||||
<title><type>hstore</type> Functions</title>
|
<title><type>hstore</type> Functions</title>
|
||||||
|
<tgroup cols="1">
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
Function
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Description
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Example(s)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tgroup cols="5">
|
<tbody>
|
||||||
<thead>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Function</entry>
|
<indexterm><primary>hstore</primary></indexterm>
|
||||||
<entry>Return Type</entry>
|
<function>hstore</function> ( <type>record</type> )
|
||||||
<entry>Description</entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry>Example</entry>
|
</para>
|
||||||
<entry>Result</entry>
|
<para>
|
||||||
</row>
|
Constructs an <type>hstore</type> from a record or row.
|
||||||
</thead>
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore(ROW(1,2))</literal>
|
||||||
|
<returnvalue>"f1"=>"1", "f2"=>"2"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<tbody>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><function>hstore(record)</function><indexterm><primary>hstore</primary></indexterm></entry>
|
<function>hstore</function> ( <type>text[]</type> )
|
||||||
<entry><type>hstore</type></entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry>construct an <type>hstore</type> from a record or row</entry>
|
</para>
|
||||||
<entry><literal>hstore(ROW(1,2))</literal></entry>
|
<para>
|
||||||
<entry><literal>f1=>1,f2=>2</literal></entry>
|
Constructs an <type>hstore</type> from an array, which may be either
|
||||||
</row>
|
a key/value array, or a two-dimensional array.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore(ARRAY['a','1','b','2'])</literal>
|
||||||
|
<returnvalue>"a"=>"1", "b"=>"2"</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore(ARRAY[['c','3'],['d','4']])</literal>
|
||||||
|
<returnvalue>"c"=>"3", "d"=>"4"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>hstore(text[])</function></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>hstore</type></entry>
|
<function>hstore</function> ( <type>text[]</type>, <type>text[]</type> )
|
||||||
<entry>construct an <type>hstore</type> from an array, which may be either
|
<returnvalue>hstore</returnvalue>
|
||||||
a key/value array, or a two-dimensional array</entry>
|
</para>
|
||||||
<entry><literal>hstore(ARRAY['a','1','b','2']) || hstore(ARRAY[['c','3'],['d','4']])</literal></entry>
|
<para>
|
||||||
<entry><literal>a=>1, b=>2, c=>3, d=>4</literal></entry>
|
Constructs an <type>hstore</type> from separate key and value arrays.
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore(ARRAY['a','b'], ARRAY['1','2'])</literal>
|
||||||
|
<returnvalue>"a"=>"1", "b"=>"2"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>hstore(text[], text[])</function></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>hstore</type></entry>
|
<function>hstore</function> ( <type>text</type>, <type>text</type> )
|
||||||
<entry>construct an <type>hstore</type> from separate key and value arrays</entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry><literal>hstore(ARRAY['a','b'], ARRAY['1','2'])</literal></entry>
|
</para>
|
||||||
<entry><literal>"a"=>"1","b"=>"2"</literal></entry>
|
<para>
|
||||||
</row>
|
Makes a single-item <type>hstore</type>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore('a', 'b')</literal>
|
||||||
|
<returnvalue>"a"=>"b"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>hstore(text, text)</function></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>hstore</type></entry>
|
<indexterm><primary>akeys</primary></indexterm>
|
||||||
<entry>make single-item <type>hstore</type></entry>
|
<function>akeys</function> ( <type>hstore</type> )
|
||||||
<entry><literal>hstore('a', 'b')</literal></entry>
|
<returnvalue>text[]</returnvalue>
|
||||||
<entry><literal>"a"=>"b"</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Extracts an <type>hstore</type>'s keys as an array.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>akeys('a=>1,b=>2')</literal>
|
||||||
|
<returnvalue>{a,b}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>akeys(hstore)</function><indexterm><primary>akeys</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>text[]</type></entry>
|
<indexterm><primary>skeys</primary></indexterm>
|
||||||
<entry>get <type>hstore</type>'s keys as an array</entry>
|
<function>skeys</function> ( <type>hstore</type> )
|
||||||
<entry><literal>akeys('a=>1,b=>2')</literal></entry>
|
<returnvalue>setof text</returnvalue>
|
||||||
<entry><literal>{a,b}</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Extracts an <type>hstore</type>'s keys as a set.
|
||||||
<row>
|
</para>
|
||||||
<entry><function>skeys(hstore)</function><indexterm><primary>skeys</primary></indexterm></entry>
|
<para>
|
||||||
<entry><type>setof text</type></entry>
|
<literal>skeys('a=>1,b=>2')</literal>
|
||||||
<entry>get <type>hstore</type>'s keys as a set</entry>
|
<returnvalue></returnvalue>
|
||||||
<entry><literal>skeys('a=>1,b=>2')</literal></entry>
|
|
||||||
<entry>
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
a
|
a
|
||||||
b
|
b
|
||||||
</programlisting></entry>
|
</programlisting>
|
||||||
</row>
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>avals(hstore)</function><indexterm><primary>avals</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>text[]</type></entry>
|
<indexterm><primary>avals</primary></indexterm>
|
||||||
<entry>get <type>hstore</type>'s values as an array</entry>
|
<function>avals</function> ( <type>hstore</type> )
|
||||||
<entry><literal>avals('a=>1,b=>2')</literal></entry>
|
<returnvalue>text[]</returnvalue>
|
||||||
<entry><literal>{1,2}</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Extracts an <type>hstore</type>'s values as an array.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>avals('a=>1,b=>2')</literal>
|
||||||
|
<returnvalue>{1,2}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>svals(hstore)</function><indexterm><primary>svals</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>setof text</type></entry>
|
<indexterm><primary>svals</primary></indexterm>
|
||||||
<entry>get <type>hstore</type>'s values as a set</entry>
|
<function>svals</function> ( <type>hstore</type> )
|
||||||
<entry><literal>svals('a=>1,b=>2')</literal></entry>
|
<returnvalue>setof text</returnvalue>
|
||||||
<entry>
|
</para>
|
||||||
|
<para>
|
||||||
|
Extracts an <type>hstore</type>'s values as a set.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>svals('a=>1,b=>2')</literal>
|
||||||
|
<returnvalue></returnvalue>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
</programlisting></entry>
|
</programlisting>
|
||||||
</row>
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>hstore_to_array(hstore)</function><indexterm><primary>hstore_to_array</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>text[]</type></entry>
|
<indexterm><primary>hstore_to_array</primary></indexterm>
|
||||||
<entry>get <type>hstore</type>'s keys and values as an array of alternating
|
<function>hstore_to_array</function> ( <type>hstore</type> )
|
||||||
keys and values</entry>
|
<returnvalue>text[]</returnvalue>
|
||||||
<entry><literal>hstore_to_array('a=>1,b=>2')</literal></entry>
|
</para>
|
||||||
<entry><literal>{a,1,b,2}</literal></entry>
|
<para>
|
||||||
</row>
|
Extracts an <type>hstore</type>'s keys and values as an array of
|
||||||
|
alternating keys and values.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore_to_array('a=>1,b=>2')</literal>
|
||||||
|
<returnvalue>{a,1,b,2}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>hstore_to_matrix(hstore)</function><indexterm><primary>hstore_to_matrix</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>text[]</type></entry>
|
<indexterm><primary>hstore_to_matrix</primary></indexterm>
|
||||||
<entry>get <type>hstore</type>'s keys and values as a two-dimensional array</entry>
|
<function>hstore_to_matrix</function> ( <type>hstore</type> )
|
||||||
<entry><literal>hstore_to_matrix('a=>1,b=>2')</literal></entry>
|
<returnvalue>text[]</returnvalue>
|
||||||
<entry><literal>{{a,1},{b,2}}</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Extracts an <type>hstore</type>'s keys and values as a two-dimensional
|
||||||
|
array.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore_to_matrix('a=>1,b=>2')</literal>
|
||||||
|
<returnvalue>{{a,1},{b,2}}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>hstore_to_json(hstore)</function><indexterm><primary>hstore_to_json</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>json</type></entry>
|
<indexterm><primary>hstore_to_json</primary></indexterm>
|
||||||
<entry>get <type>hstore</type> as a <type>json</type> value, converting
|
<function>hstore_to_json</function> ( <type>hstore</type> )
|
||||||
all non-null values to JSON strings</entry>
|
<returnvalue>json</returnvalue>
|
||||||
<entry><literal>hstore_to_json('"a key"=>1, b=>t, c=>null, d=>12345, e=>012345, f=>1.234, g=>2.345e+4')</literal></entry>
|
</para>
|
||||||
<entry><literal>{"a key": "1", "b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4"}</literal></entry>
|
<para>
|
||||||
</row>
|
Converts an <type>hstore</type> to a <type>json</type> value,
|
||||||
|
converting all non-null values to JSON strings.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This function is used implicitly when an <type>hstore</type> value is
|
||||||
|
cast to <type>json</type>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore_to_json('"a key"=>1, b=>t, c=>null, d=>12345, e=>012345, f=>1.234, g=>2.345e+4')</literal>
|
||||||
|
<returnvalue>{"a key": "1", "b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4"}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>hstore_to_jsonb(hstore)</function><indexterm><primary>hstore_to_jsonb</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>jsonb</type></entry>
|
<indexterm><primary>hstore_to_jsonb</primary></indexterm>
|
||||||
<entry>get <type>hstore</type> as a <type>jsonb</type> value, converting
|
<function>hstore_to_jsonb</function> ( <type>hstore</type> )
|
||||||
all non-null values to JSON strings</entry>
|
<returnvalue>jsonb</returnvalue>
|
||||||
<entry><literal>hstore_to_jsonb('"a key"=>1, b=>t, c=>null, d=>12345, e=>012345, f=>1.234, g=>2.345e+4')</literal></entry>
|
</para>
|
||||||
<entry><literal>{"a key": "1", "b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4"}</literal></entry>
|
<para>
|
||||||
</row>
|
Converts an <type>hstore</type> to a <type>jsonb</type> value,
|
||||||
|
converting all non-null values to JSON strings.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This function is used implicitly when an <type>hstore</type> value is
|
||||||
|
cast to <type>jsonb</type>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore_to_jsonb('"a key"=>1, b=>t, c=>null, d=>12345, e=>012345, f=>1.234, g=>2.345e+4')</literal>
|
||||||
|
<returnvalue>{"a key": "1", "b": "t", "c": null, "d": "12345", "e": "012345", "f": "1.234", "g": "2.345e+4"}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>hstore_to_json_loose(hstore)</function><indexterm><primary>hstore_to_json_loose</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>json</type></entry>
|
<indexterm><primary>hstore_to_json_loose</primary></indexterm>
|
||||||
<entry>get <type>hstore</type> as a <type>json</type> value, but attempt to distinguish numerical and Boolean values so they are unquoted in the JSON</entry>
|
<function>hstore_to_json_loose</function> ( <type>hstore</type> )
|
||||||
<entry><literal>hstore_to_json_loose('"a key"=>1, b=>t, c=>null, d=>12345, e=>012345, f=>1.234, g=>2.345e+4')</literal></entry>
|
<returnvalue>json</returnvalue>
|
||||||
<entry><literal>{"a key": 1, "b": true, "c": null, "d": 12345, "e": "012345", "f": 1.234, "g": 2.345e+4}</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Converts an <type>hstore</type> to a <type>json</type> value, but
|
||||||
|
attempts to distinguish numerical and Boolean values so they are
|
||||||
|
unquoted in the JSON.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore_to_json_loose('"a key"=>1, b=>t, c=>null, d=>12345, e=>012345, f=>1.234, g=>2.345e+4')</literal>
|
||||||
|
<returnvalue>{"a key": 1, "b": true, "c": null, "d": 12345, "e": "012345", "f": 1.234, "g": 2.345e+4}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>hstore_to_jsonb_loose(hstore)</function><indexterm><primary>hstore_to_jsonb_loose</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>jsonb</type></entry>
|
<indexterm><primary>hstore_to_jsonb_loose</primary></indexterm>
|
||||||
<entry>get <type>hstore</type> as a <type>jsonb</type> value, but attempt to distinguish numerical and Boolean values so they are unquoted in the JSON</entry>
|
<function>hstore_to_jsonb_loose</function> ( <type>hstore</type> )
|
||||||
<entry><literal>hstore_to_jsonb_loose('"a key"=>1, b=>t, c=>null, d=>12345, e=>012345, f=>1.234, g=>2.345e+4')</literal></entry>
|
<returnvalue>jsonb</returnvalue>
|
||||||
<entry><literal>{"a key": 1, "b": true, "c": null, "d": 12345, "e": "012345", "f": 1.234, "g": 2.345e+4}</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Converts an <type>hstore</type> to a <type>jsonb</type> value, but
|
||||||
|
attempts to distinguish numerical and Boolean values so they are
|
||||||
|
unquoted in the JSON.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>hstore_to_jsonb_loose('"a key"=>1, b=>t, c=>null, d=>12345, e=>012345, f=>1.234, g=>2.345e+4')</literal>
|
||||||
|
<returnvalue>{"a key": 1, "b": true, "c": null, "d": 12345, "e": "012345", "f": 1.234, "g": 2.345e+4}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>slice(hstore, text[])</function><indexterm><primary>slice</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>hstore</type></entry>
|
<indexterm><primary>slice</primary></indexterm>
|
||||||
<entry>extract a subset of an <type>hstore</type></entry>
|
<function>slice</function> ( <type>hstore</type>, <type>text[]</type> )
|
||||||
<entry><literal>slice('a=>1,b=>2,c=>3'::hstore, ARRAY['b','c','x'])</literal></entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry><literal>"b"=>"2", "c"=>"3"</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Extracts a subset of an <type>hstore</type> containing only the
|
||||||
|
specified keys.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>slice('a=>1,b=>2,c=>3'::hstore, ARRAY['b','c','x'])</literal>
|
||||||
|
<returnvalue>"b"=>"2", "c"=>"3"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>each(hstore)</function><indexterm><primary>each</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>setof(key text, value text)</type></entry>
|
<indexterm><primary>each</primary></indexterm>
|
||||||
<entry>get <type>hstore</type>'s keys and values as a set</entry>
|
<function>each</function> ( <type>hstore</type> )
|
||||||
<entry><literal>select * from each('a=>1,b=>2')</literal></entry>
|
<returnvalue>setof record</returnvalue>
|
||||||
<entry>
|
( <parameter>key</parameter> <type>text</type>,
|
||||||
|
<parameter>value</parameter> <type>text</type> )
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Extracts an <type>hstore</type>'s keys and values as a set of records.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>select * from each('a=>1,b=>2')</literal>
|
||||||
|
<returnvalue></returnvalue>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
key | value
|
key | value
|
||||||
-----+-------
|
-----+-------
|
||||||
a | 1
|
a | 1
|
||||||
b | 2
|
b | 2
|
||||||
</programlisting></entry>
|
</programlisting>
|
||||||
</row>
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>exist(hstore,text)</function><indexterm><primary>exist</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<indexterm><primary>exist</primary></indexterm>
|
||||||
<entry>does <type>hstore</type> contain key?</entry>
|
<function>exist</function> ( <type>hstore</type>, <type>text</type> )
|
||||||
<entry><literal>exist('a=>1','a')</literal></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry><literal>t</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Does <type>hstore</type> contain key?
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>exist('a=>1','a')</literal>
|
||||||
|
<returnvalue>t</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>defined(hstore,text)</function><indexterm><primary>defined</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<indexterm><primary>defined</primary></indexterm>
|
||||||
<entry>does <type>hstore</type> contain non-<literal>NULL</literal> value for key?</entry>
|
<function>defined</function> ( <type>hstore</type>, <type>text</type> )
|
||||||
<entry><literal>defined('a=>NULL','a')</literal></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry><literal>f</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Does <type>hstore</type> contain a non-<literal>NULL</literal> value
|
||||||
|
for key?
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>defined('a=>NULL','a')</literal>
|
||||||
|
<returnvalue>f</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>delete(hstore,text)</function><indexterm><primary>delete</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>hstore</type></entry>
|
<indexterm><primary>delete</primary></indexterm>
|
||||||
<entry>delete pair with matching key</entry>
|
<function>delete</function> ( <type>hstore</type>, <type>text</type> )
|
||||||
<entry><literal>delete('a=>1,b=>2','b')</literal></entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry><literal>"a"=>"1"</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Deletes pair with matching key.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>delete('a=>1,b=>2','b')</literal>
|
||||||
|
<returnvalue>"a"=>"1"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>delete(hstore,text[])</function></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>hstore</type></entry>
|
<function>delete</function> ( <type>hstore</type>, <type>text[]</type> )
|
||||||
<entry>delete pairs with matching keys</entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry><literal>delete('a=>1,b=>2,c=>3',ARRAY['a','b'])</literal></entry>
|
</para>
|
||||||
<entry><literal>"c"=>"3"</literal></entry>
|
<para>
|
||||||
</row>
|
Deletes pairs with matching keys.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>delete('a=>1,b=>2,c=>3',ARRAY['a','b'])</literal>
|
||||||
|
<returnvalue>"c"=>"3"</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>delete(hstore,hstore)</function></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>hstore</type></entry>
|
<function>delete</function> ( <type>hstore</type>, <type>hstore</type> )
|
||||||
<entry>delete pairs matching those in the second argument</entry>
|
<returnvalue>hstore</returnvalue>
|
||||||
<entry><literal>delete('a=>1,b=>2','a=>4,b=>2'::hstore)</literal></entry>
|
</para>
|
||||||
<entry><literal>"a"=>"1"</literal></entry>
|
<para>
|
||||||
</row>
|
Deletes pairs matching those in the second argument.
|
||||||
|
</para>
|
||||||
<row>
|
<para>
|
||||||
<entry><function>populate_record(record,hstore)</function><indexterm><primary>populate_record</primary></indexterm></entry>
|
<literal>delete('a=>1,b=>2','a=>4,b=>2'::hstore)</literal>
|
||||||
<entry><type>record</type></entry>
|
<returnvalue>"a"=>"1"</returnvalue>
|
||||||
<entry>replace fields in <type>record</type> with matching values from <type>hstore</type></entry>
|
</para></entry>
|
||||||
<entry>see Examples section</entry>
|
</row>
|
||||||
<entry></entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>populate_record</primary></indexterm>
|
||||||
|
<function>populate_record</function> ( <type>anyelement</type>, <type>hstore</type> )
|
||||||
|
<returnvalue>anyelement</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Replaces fields in the left operand (which must be a composite type)
|
||||||
|
with matching values from <type>hstore</type>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>populate_record(ROW(1,2), 'f1=>42'::hstore)</literal>
|
||||||
|
<returnvalue>(42,2)</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<note>
|
|
||||||
<para>
|
|
||||||
The function <function>hstore_to_json</function> is used when
|
|
||||||
an <type>hstore</type> value is cast to <type>json</type>.
|
|
||||||
Likewise, <function>hstore_to_jsonb</function> is used when
|
|
||||||
an <type>hstore</type> value is cast to <type>jsonb</type>.
|
|
||||||
</para>
|
|
||||||
</note>
|
|
||||||
|
|
||||||
<note>
|
|
||||||
<para>
|
|
||||||
The function <function>populate_record</function> is actually declared
|
|
||||||
with <type>anyelement</type>, not <type>record</type>, as its first argument,
|
|
||||||
but it will reject non-record types with a run-time error.
|
|
||||||
</para>
|
|
||||||
</note>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
@ -41,186 +41,325 @@
|
|||||||
|
|
||||||
<table id="intarray-func-table">
|
<table id="intarray-func-table">
|
||||||
<title><filename>intarray</filename> Functions</title>
|
<title><filename>intarray</filename> Functions</title>
|
||||||
|
<tgroup cols="1">
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
Function
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Description
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Example(s)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tgroup cols="5">
|
<tbody>
|
||||||
<thead>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Function</entry>
|
<indexterm><primary>icount</primary></indexterm>
|
||||||
<entry>Return Type</entry>
|
<function>icount</function> ( <type>integer[]</type> )
|
||||||
<entry>Description</entry>
|
<returnvalue>integer</returnvalue>
|
||||||
<entry>Example</entry>
|
</para>
|
||||||
<entry>Result</entry>
|
<para>
|
||||||
</row>
|
Returns the number of elements in the array.
|
||||||
</thead>
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>icount('{1,2,3}'::integer[])</literal>
|
||||||
|
<returnvalue>3</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<tbody>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><function>icount(int[])</function><indexterm><primary>icount</primary></indexterm></entry>
|
<indexterm><primary>sort</primary></indexterm>
|
||||||
<entry><type>int</type></entry>
|
<function>sort</function> ( <type>integer[]</type>, <parameter>dir</parameter> <type>text</type> )
|
||||||
<entry>number of elements in array</entry>
|
<returnvalue>integer[]</returnvalue>
|
||||||
<entry><literal>icount('{1,2,3}'::int[])</literal></entry>
|
</para>
|
||||||
<entry><literal>3</literal></entry>
|
<para>
|
||||||
</row>
|
Sorts the array in either ascending or descending order.
|
||||||
|
<parameter>dir</parameter> must be <literal>asc</literal>
|
||||||
|
or <literal>desc</literal>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>sort('{1,3,2}'::integer[], 'desc')</literal>
|
||||||
|
<returnvalue>{3,2,1}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>sort(int[], text dir)</function><indexterm><primary>sort</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>int[]</type></entry>
|
<function>sort</function> ( <type>integer[]</type> )
|
||||||
<entry>sort array — <parameter>dir</parameter> must be <literal>asc</literal> or <literal>desc</literal></entry>
|
<returnvalue>integer[]</returnvalue>
|
||||||
<entry><literal>sort('{1,2,3}'::int[], 'desc')</literal></entry>
|
</para>
|
||||||
<entry><literal>{3,2,1}</literal></entry>
|
<para role="func_signature">
|
||||||
</row>
|
<indexterm><primary>sort_asc</primary></indexterm>
|
||||||
|
<function>sort_asc</function> ( <type>integer[]</type> )
|
||||||
|
<returnvalue>integer[]</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Sorts in ascending order.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>sort(array[11,77,44])</literal>
|
||||||
|
<returnvalue>{11,44,77}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>sort(int[])</function></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>int[]</type></entry>
|
<indexterm><primary>sort_desc</primary></indexterm>
|
||||||
<entry>sort in ascending order</entry>
|
<function>sort_desc</function> ( <type>integer[]</type> )
|
||||||
<entry><literal>sort(array[11,77,44])</literal></entry>
|
<returnvalue>integer[]</returnvalue>
|
||||||
<entry><literal>{11,44,77}</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Sorts in descending order.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>sort_desc(array[11,77,44])</literal>
|
||||||
|
<returnvalue>{77,44,11}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>sort_asc(int[])</function><indexterm><primary>sort_asc</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>int[]</type></entry>
|
<indexterm><primary>uniq</primary></indexterm>
|
||||||
<entry>sort in ascending order</entry>
|
<function>uniq</function> ( <type>integer[]</type> )
|
||||||
<entry><literal></literal></entry>
|
<returnvalue>integer[]</returnvalue>
|
||||||
<entry><literal></literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Removes adjacent duplicates.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>uniq(sort('{1,2,3,2,1}'::integer[]))</literal>
|
||||||
|
<returnvalue>{1,2,3}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>sort_desc(int[])</function><indexterm><primary>sort_desc</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>int[]</type></entry>
|
<indexterm><primary>idx</primary></indexterm>
|
||||||
<entry>sort in descending order</entry>
|
<function>idx</function> ( <type>integer[]</type>, <parameter>item</parameter> <type>integer</type> )
|
||||||
<entry><literal></literal></entry>
|
<returnvalue>integer</returnvalue>
|
||||||
<entry><literal></literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Returns index of the first array element
|
||||||
|
matching <parameter>item</parameter>, or 0 if no match.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>idx(array[11,22,33,22,11], 22)</literal>
|
||||||
|
<returnvalue>2</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>uniq(int[])</function><indexterm><primary>uniq</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>int[]</type></entry>
|
<indexterm><primary>subarray</primary></indexterm>
|
||||||
<entry>remove adjacent duplicates</entry>
|
<function>subarray</function> ( <type>integer[]</type>, <parameter>start</parameter> <type>integer</type>, <parameter>len</parameter> <type>integer</type> )
|
||||||
<entry><literal>uniq(sort('{1,2,3,2,1}'::int[]))</literal></entry>
|
<returnvalue>integer[]</returnvalue>
|
||||||
<entry><literal>{1,2,3}</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Extracts the portion of the array starting at
|
||||||
|
position <parameter>start</parameter>, with <parameter>len</parameter>
|
||||||
|
elements.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>subarray('{1,2,3,2,1}'::integer[], 2, 3)</literal>
|
||||||
|
<returnvalue>{2,3,2}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>idx(int[], int item)</function><indexterm><primary>idx</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>int</type></entry>
|
<function>subarray</function> ( <type>integer[]</type>, <parameter>start</parameter> <type>integer</type> )
|
||||||
<entry>index of first element matching <parameter>item</parameter> (0 if none)</entry>
|
<returnvalue>integer[]</returnvalue>
|
||||||
<entry><literal>idx(array[11,22,33,22,11], 22)</literal></entry>
|
</para>
|
||||||
<entry><literal>2</literal></entry>
|
<para>
|
||||||
</row>
|
Extracts the portion of the array starting at
|
||||||
|
position <parameter>start</parameter>.
|
||||||
<row>
|
</para>
|
||||||
<entry><function>subarray(int[], int start, int len)</function><indexterm><primary>subarray</primary></indexterm></entry>
|
<para>
|
||||||
<entry><type>int[]</type></entry>
|
<literal>subarray('{1,2,3,2,1}'::integer[], 2)</literal>
|
||||||
<entry>portion of array starting at position <parameter>start</parameter>, <parameter>len</parameter> elements</entry>
|
<returnvalue>{2,3,2,1}</returnvalue>
|
||||||
<entry><literal>subarray('{1,2,3,2,1}'::int[], 2, 3)</literal></entry>
|
</para></entry>
|
||||||
<entry><literal>{2,3,2}</literal></entry>
|
</row>
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><function>subarray(int[], int start)</function></entry>
|
|
||||||
<entry><type>int[]</type></entry>
|
|
||||||
<entry>portion of array starting at position <parameter>start</parameter></entry>
|
|
||||||
<entry><literal>subarray('{1,2,3,2,1}'::int[], 2)</literal></entry>
|
|
||||||
<entry><literal>{2,3,2,1}</literal></entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><function>intset(int)</function><indexterm><primary>intset</primary></indexterm></entry>
|
|
||||||
<entry><type>int[]</type></entry>
|
|
||||||
<entry>make single-element array</entry>
|
|
||||||
<entry><literal>intset(42)</literal></entry>
|
|
||||||
<entry><literal>{42}</literal></entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>intset</primary></indexterm>
|
||||||
|
<function>intset</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>integer[]</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Makes a single-element array.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>intset(42)</literal>
|
||||||
|
<returnvalue>{42}</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="intarray-op-table">
|
<table id="intarray-op-table">
|
||||||
<title><filename>intarray</filename> Operators</title>
|
<title><filename>intarray</filename> Operators</title>
|
||||||
|
<tgroup cols="1">
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
Operator
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tgroup cols="3">
|
<tbody>
|
||||||
<thead>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Operator</entry>
|
<type>integer[]</type> <literal>&&</literal> <type>integer[]</type>
|
||||||
<entry>Returns</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
</thead>
|
Do arrays overlap (have at least one element in common)?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<tbody>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><literal>int[] && int[]</literal></entry>
|
<type>integer[]</type> <literal>@></literal> <type>integer[]</type>
|
||||||
<entry><type>boolean</type></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry>overlap — <literal>true</literal> if arrays have at least one common element</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
<row>
|
Does left array contain right array?
|
||||||
<entry><literal>int[] @> int[]</literal></entry>
|
</para></entry>
|
||||||
<entry><type>boolean</type></entry>
|
</row>
|
||||||
<entry>contains — <literal>true</literal> if left array contains right array</entry>
|
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><literal>int[] <@ int[]</literal></entry>
|
<type>integer[]</type> <literal><@</literal> <type>integer[]</type>
|
||||||
<entry><type>boolean</type></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry>contained — <literal>true</literal> if left array is contained in right array</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
<row>
|
Is left array contained in right array?
|
||||||
<entry><literal># int[]</literal></entry>
|
</para></entry>
|
||||||
<entry><type>int</type></entry>
|
</row>
|
||||||
<entry>number of elements in array</entry>
|
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><literal>int[] # int</literal></entry>
|
<type></type> <literal>#</literal> <type>integer[]</type>
|
||||||
<entry><type>int</type></entry>
|
<returnvalue>integer</returnvalue>
|
||||||
<entry>index (same as <function>idx</function> function)</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
<row>
|
Returns the number of elements in the array.
|
||||||
<entry><literal>int[] + int</literal></entry>
|
</para></entry>
|
||||||
<entry><type>int[]</type></entry>
|
</row>
|
||||||
<entry>push element onto array (add it to end of array)</entry>
|
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><literal>int[] + int[] </literal></entry>
|
<type>integer[]</type> <literal>#</literal> <type>integer</type>
|
||||||
<entry><type>int[]</type></entry>
|
<returnvalue>integer</returnvalue>
|
||||||
<entry>array concatenation (right array added to the end of left one)</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
<row>
|
Returns index of the first array element
|
||||||
<entry><literal>int[] - int</literal></entry>
|
matching the right argument, or 0 if no match.
|
||||||
<entry><type>int[]</type></entry>
|
(Same as <function>idx</function> function.)
|
||||||
<entry>remove entries matching right argument from array</entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<entry><literal>int[] - int[]</literal></entry>
|
<row>
|
||||||
<entry><type>int[]</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>remove elements of right array from left</entry>
|
<type>integer[]</type> <literal>+</literal> <type>integer</type>
|
||||||
</row>
|
<returnvalue>integer[]</returnvalue>
|
||||||
<row>
|
</para>
|
||||||
<entry><literal>int[] | int</literal></entry>
|
<para>
|
||||||
<entry><type>int[]</type></entry>
|
Adds element to end of array.
|
||||||
<entry>union of arguments</entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<entry><literal>int[] | int[]</literal></entry>
|
<row>
|
||||||
<entry><type>int[]</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>union of arrays</entry>
|
<type>integer[]</type> <literal>+</literal> <type>integer[]</type>
|
||||||
</row>
|
<returnvalue>integer[]</returnvalue>
|
||||||
<row>
|
</para>
|
||||||
<entry><literal>int[] & int[]</literal></entry>
|
<para>
|
||||||
<entry><type>int[]</type></entry>
|
Concatenates the arrays.
|
||||||
<entry>intersection of arrays</entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<entry><literal>int[] @@ query_int</literal></entry>
|
<row>
|
||||||
<entry><type>boolean</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><literal>true</literal> if array satisfies query (see below)</entry>
|
<type>integer[]</type> <literal>-</literal> <type>integer</type>
|
||||||
</row>
|
<returnvalue>integer[]</returnvalue>
|
||||||
<row>
|
</para>
|
||||||
<entry><literal>query_int ~~ int[]</literal></entry>
|
<para>
|
||||||
<entry><type>boolean</type></entry>
|
Removes entries matching the right argument from the array.
|
||||||
<entry><literal>true</literal> if array satisfies query (commutator of <literal>@@</literal>)</entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<type>integer[]</type> <literal>-</literal> <type>integer[]</type>
|
||||||
|
<returnvalue>integer[]</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Removes elements of the right array from the left array.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<type>integer[]</type> <literal>|</literal> <type>integer</type>
|
||||||
|
<returnvalue>integer[]</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Computes the union of the arguments.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<type>integer[]</type> <literal>|</literal> <type>integer[]</type>
|
||||||
|
<returnvalue>integer[]</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Computes the union of the arguments.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<type>integer[]</type> <literal>&</literal> <type>integer[]</type>
|
||||||
|
<returnvalue>integer[]</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Computes the intersection of the arguments.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<type>integer[]</type> <literal>@@</literal> <type>query_int</type>
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Does array satisfy query? (see below)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<type>query_int</type> <literal>~~</literal> <type>integer[]</type>
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Does array satisfy query? (commutator of <literal>@@</literal>)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
@ -274,7 +413,7 @@
|
|||||||
The implementation uses an RD-tree data structure with
|
The implementation uses an RD-tree data structure with
|
||||||
built-in lossy compression.
|
built-in lossy compression.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<literal>gist__int_ops</literal> approximates an integer set as an array of
|
<literal>gist__int_ops</literal> approximates an integer set as an array of
|
||||||
integer ranges. Its optional integer parameter <literal>numranges</literal>
|
integer ranges. Its optional integer parameter <literal>numranges</literal>
|
||||||
@ -284,7 +423,7 @@
|
|||||||
keys leads to a more precise search (scanning a smaller fraction of the index and
|
keys leads to a more precise search (scanning a smaller fraction of the index and
|
||||||
fewer heap pages), at the cost of a larger index.
|
fewer heap pages), at the cost of a larger index.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<literal>gist__intbig_ops</literal> approximates an integer set as a bitmap
|
<literal>gist__intbig_ops</literal> approximates an integer set as a bitmap
|
||||||
signature. Its optional integer parameter <literal>siglen</literal>
|
signature. Its optional integer parameter <literal>siglen</literal>
|
||||||
|
@ -38,6 +38,8 @@
|
|||||||
<table id="isn-datatypes">
|
<table id="isn-datatypes">
|
||||||
<title><filename>isn</filename> Data Types</title>
|
<title><filename>isn</filename> Data Types</title>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
|
<colspec colname="col1" colwidth="1*"/>
|
||||||
|
<colspec colname="col2" colwidth="2*"/>
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Data Type</entry>
|
<entry>Data Type</entry>
|
||||||
@ -235,38 +237,63 @@
|
|||||||
|
|
||||||
<table id="isn-functions">
|
<table id="isn-functions">
|
||||||
<title><filename>isn</filename> Functions</title>
|
<title><filename>isn</filename> Functions</title>
|
||||||
<tgroup cols="3">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Function</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Returns</entry>
|
Function
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
</thead>
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><function>isn_weak(boolean)</function><indexterm><primary>isn_weak</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<indexterm><primary>isn_weak</primary></indexterm>
|
||||||
<entry>Sets the weak input mode (returns new setting)</entry>
|
<function>isn_weak</function> ( <type>boolean</type> )
|
||||||
</row>
|
<returnvalue>boolean</returnvalue>
|
||||||
<row>
|
</para>
|
||||||
<entry><function>isn_weak()</function></entry>
|
<para>
|
||||||
<entry><type>boolean</type></entry>
|
Sets the weak input mode, and returns new setting.
|
||||||
<entry>Gets the current status of the weak mode</entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<entry><function>make_valid(isn)</function><indexterm><primary>make_valid</primary></indexterm></entry>
|
<row>
|
||||||
<entry><type>isn</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Validates an invalid number (clears the invalid flag)</entry>
|
<function>isn_weak</function> ()
|
||||||
</row>
|
<returnvalue>boolean</returnvalue>
|
||||||
<row>
|
</para>
|
||||||
<entry><function>is_valid(isn)</function><indexterm><primary>is_valid</primary></indexterm></entry>
|
<para>
|
||||||
<entry><type>boolean</type></entry>
|
Returns the current status of the weak mode.
|
||||||
<entry>Checks for the presence of the invalid flag</entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
|
||||||
</tgroup>
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>make_valid</primary></indexterm>
|
||||||
|
<function>make_valid</function> ( <type>isn</type> )
|
||||||
|
<returnvalue>isn</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Validates an invalid number (clears the invalid flag).
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>is_valid</primary></indexterm>
|
||||||
|
<function>is_valid</function> ( <type>isn</type> )
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Checks for the presence of the invalid flag.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -542,69 +542,82 @@ int lo_unlink(PGconn *conn, Oid lobjId);
|
|||||||
listed in <xref linkend="lo-funcs-table"/>.
|
listed in <xref linkend="lo-funcs-table"/>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table id="lo-funcs-table">
|
<table id="lo-funcs-table">
|
||||||
<title>SQL-Oriented Large Object Functions</title>
|
<title>SQL-Oriented Large Object Functions</title>
|
||||||
<tgroup cols="5">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Function</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Return Type</entry>
|
Function
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
<entry>Example</entry>
|
<para>
|
||||||
<entry>Result</entry>
|
Description
|
||||||
</row>
|
</para>
|
||||||
</thead>
|
<para>
|
||||||
|
Example(s)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary>lo_from_bytea</primary>
|
<primary>lo_from_bytea</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
<literal><function>lo_from_bytea(<parameter>loid</parameter> <type>oid</type>, <parameter>string</parameter> <type>bytea</type>)</function></literal>
|
<function>lo_from_bytea</function> ( <parameter>loid</parameter> <type>oid</type>, <parameter>data</parameter> <type>bytea</type> )
|
||||||
</entry>
|
<returnvalue>oid</returnvalue>
|
||||||
<entry><type>oid</type></entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
Create a large object and store data there, returning its OID.
|
Creates a large object and stores <parameter>data</parameter> in it.
|
||||||
Pass <literal>0</literal> to have the system choose an OID.
|
If <parameter>loid</parameter> is zero then the system will choose a
|
||||||
</entry>
|
free OID, otherwise that OID is used (with an error if some large
|
||||||
<entry><literal>lo_from_bytea(0, '\xffffff00')</literal></entry>
|
object already has that OID). On success, the large object's OID is
|
||||||
<entry><literal>24528</literal></entry>
|
returned.
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>lo_from_bytea(0, '\xffffff00')</literal>
|
||||||
|
<returnvalue>24528</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary>lo_put</primary>
|
<primary>lo_put</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
<literal><function>lo_put(<parameter>loid</parameter> <type>oid</type>, <parameter>offset</parameter> <type>bigint</type>, <parameter>str</parameter> <type>bytea</type>)</function></literal>
|
<function>lo_put</function> ( <parameter>loid</parameter> <type>oid</type>, <parameter>offset</parameter> <type>bigint</type>, <parameter>data</parameter> <type>bytea</type> )
|
||||||
</entry>
|
<returnvalue>void</returnvalue>
|
||||||
<entry><type>void</type></entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
Write data at the given offset.
|
Writes <parameter>data</parameter> starting at the given offset within
|
||||||
</entry>
|
the large object; the large object is enlarged if necessary.
|
||||||
<entry><literal>lo_put(24528, 1, '\xaa')</literal></entry>
|
</para>
|
||||||
<entry></entry>
|
<para>
|
||||||
</row>
|
<literal>lo_put(24528, 1, '\xaa')</literal>
|
||||||
|
<returnvalue></returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary>lo_get</primary>
|
<primary>lo_get</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
<literal><function>lo_get(<parameter>loid</parameter> <type>oid</type> <optional>, <parameter>from</parameter> <type>bigint</type>, <parameter>for</parameter> <type>int</type></optional>)</function></literal>
|
<function>lo_get</function> ( <parameter>loid</parameter> <type>oid</type> <optional>, <parameter>offset</parameter> <type>bigint</type>, <parameter>length</parameter> <type>integer</type> </optional> )
|
||||||
</entry>
|
<returnvalue>bytea</returnvalue>
|
||||||
<entry><type>bytea</type></entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
Extract contents or a substring thereof.
|
Extracts the large object's contents, or a substring thereof.
|
||||||
</entry>
|
</para>
|
||||||
<entry><literal>lo_get(24528, 0, 3)</literal></entry>
|
<para>
|
||||||
<entry><literal>\xffaaff</literal></entry>
|
<literal>lo_get(24528, 0, 3)</literal>
|
||||||
</row>
|
<returnvalue>\xffaaff</returnvalue>
|
||||||
|
</para></entry>
|
||||||
</tbody>
|
</row>
|
||||||
</tgroup>
|
</tbody>
|
||||||
</table>
|
</tgroup>
|
||||||
|
</table>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
There are additional server-side functions corresponding to each of the
|
There are additional server-side functions corresponding to each of the
|
||||||
|
@ -201,169 +201,221 @@ Europe & Russia*@ & !Transportation
|
|||||||
|
|
||||||
<table id="ltree-op-table">
|
<table id="ltree-op-table">
|
||||||
<title><type>ltree</type> Operators</title>
|
<title><type>ltree</type> Operators</title>
|
||||||
|
<tgroup cols="1">
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
Operator
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tgroup cols="3">
|
<tbody>
|
||||||
<thead>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Operator</entry>
|
<type>ltree</type> <literal>@></literal> <type>ltree</type>
|
||||||
<entry>Returns</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
</thead>
|
Is left argument an ancestor of right (or equal)?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<tbody>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>ltree</type> <literal>@></literal> <type>ltree</type></entry>
|
<type>ltree</type> <literal><@</literal> <type>ltree</type>
|
||||||
<entry><type>boolean</type></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry>is left argument an ancestor of right (or equal)?</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Is left argument a descendant of right (or equal)?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltree</type> <literal><@</literal> <type>ltree</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree</type> <literal>~</literal> <type>lquery</type>
|
||||||
<entry>is left argument a descendant of right (or equal)?</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para role="func_signature">
|
||||||
|
<type>lquery</type> <literal>~</literal> <type>ltree</type>
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Does <type>ltree</type> match <type>lquery</type>?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltree</type> <literal>~</literal> <type>lquery</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree</type> <literal>?</literal> <type>lquery[]</type>
|
||||||
<entry>does <type>ltree</type> match <type>lquery</type>?</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para role="func_signature">
|
||||||
|
<type>lquery[]</type> <literal>?</literal> <type>ltree</type>
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Does <type>ltree</type> match any <type>lquery</type> in array?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>lquery</type> <literal>~</literal> <type>ltree</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree</type> <literal>@</literal> <type>ltxtquery</type>
|
||||||
<entry>does <type>ltree</type> match <type>lquery</type>?</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para role="func_signature">
|
||||||
|
<type>ltxtquery</type> <literal>@</literal> <type>ltree</type>
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Does <type>ltree</type> match <type>ltxtquery</type>?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltree</type> <literal>?</literal> <type>lquery[]</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree</type> <literal>||</literal> <type>ltree</type>
|
||||||
<entry>does <type>ltree</type> match any <type>lquery</type> in array?</entry>
|
<returnvalue>ltree</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Concatenates <type>ltree</type> paths.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>lquery[]</type> <literal>?</literal> <type>ltree</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree</type> <literal>||</literal> <type>text</type>
|
||||||
<entry>does <type>ltree</type> match any <type>lquery</type> in array?</entry>
|
<returnvalue>ltree</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para role="func_signature">
|
||||||
|
<type>text</type> <literal>||</literal> <type>ltree</type>
|
||||||
|
<returnvalue>ltree</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Converts text to <type>ltree</type> and concatenates.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltree</type> <literal>@</literal> <type>ltxtquery</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree[]</type> <literal>@></literal> <type>ltree</type>
|
||||||
<entry>does <type>ltree</type> match <type>ltxtquery</type>?</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para role="func_signature">
|
||||||
|
<type>ltree</type> <literal><@</literal> <type>ltree[]</type>
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Does array contain an ancestor of <type>ltree</type>?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltxtquery</type> <literal>@</literal> <type>ltree</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree[]</type> <literal><@</literal> <type>ltree</type>
|
||||||
<entry>does <type>ltree</type> match <type>ltxtquery</type>?</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para role="func_signature">
|
||||||
|
<type>ltree</type> <literal>@></literal> <type>ltree[]</type>
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Does array contain a descendant of <type>ltree</type>?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltree</type> <literal>||</literal> <type>ltree</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>ltree</type></entry>
|
<type>ltree[]</type> <literal>~</literal> <type>lquery</type>
|
||||||
<entry>concatenate <type>ltree</type> paths</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para role="func_signature">
|
||||||
|
<type>lquery</type> <literal>~</literal> <type>ltree[]</type>
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Does array contain any path matching <type>lquery</type>?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltree</type> <literal>||</literal> <type>text</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>ltree</type></entry>
|
<type>ltree[]</type> <literal>?</literal> <type>lquery[]</type>
|
||||||
<entry>convert text to <type>ltree</type> and concatenate</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para role="func_signature">
|
||||||
|
<type>lquery[]</type> <literal>?</literal> <type>ltree[]</type>
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Does <type>ltree</type> array contain any path matching
|
||||||
|
any <type>lquery</type>?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>text</type> <literal>||</literal> <type>ltree</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>ltree</type></entry>
|
<type>ltree[]</type> <literal>@</literal> <type>ltxtquery</type>
|
||||||
<entry>convert text to <type>ltree</type> and concatenate</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para role="func_signature">
|
||||||
|
<type>ltxtquery</type> <literal>@</literal> <type>ltree[]</type>
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Does array contain any path matching <type>ltxtquery</type>?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltree[]</type> <literal>@></literal> <type>ltree</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree[]</type> <literal>?@></literal> <type>ltree</type>
|
||||||
<entry>does array contain an ancestor of <type>ltree</type>?</entry>
|
<returnvalue>ltree</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns first array entry that is an ancestor of <type>ltree</type>,
|
||||||
|
or <literal>NULL</literal> if none.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltree</type> <literal><@</literal> <type>ltree[]</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree[]</type> <literal>?<@</literal> <type>ltree</type>
|
||||||
<entry>does array contain an ancestor of <type>ltree</type>?</entry>
|
<returnvalue>ltree</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns first array entry that is a descendant of <type>ltree</type>,
|
||||||
|
or <literal>NULL</literal> if none.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltree[]</type> <literal><@</literal> <type>ltree</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree[]</type> <literal>?~</literal> <type>lquery</type>
|
||||||
<entry>does array contain a descendant of <type>ltree</type>?</entry>
|
<returnvalue>ltree</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns first array entry that matches <type>lquery</type>,
|
||||||
|
or <literal>NULL</literal> if none.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><type>ltree</type> <literal>@></literal> <type>ltree[]</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>ltree[]</type> <literal>?@</literal> <type>ltxtquery</type>
|
||||||
<entry>does array contain a descendant of <type>ltree</type>?</entry>
|
<returnvalue>ltree</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
<row>
|
Returns first array entry that matches <type>ltxtquery</type>,
|
||||||
<entry><type>ltree[]</type> <literal>~</literal> <type>lquery</type></entry>
|
or <literal>NULL</literal> if none.
|
||||||
<entry><type>boolean</type></entry>
|
</para></entry>
|
||||||
<entry>does array contain any path matching <type>lquery</type>?</entry>
|
</row>
|
||||||
</row>
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
<row>
|
|
||||||
<entry><type>lquery</type> <literal>~</literal> <type>ltree[]</type></entry>
|
|
||||||
<entry><type>boolean</type></entry>
|
|
||||||
<entry>does array contain any path matching <type>lquery</type>?</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><type>ltree[]</type> <literal>?</literal> <type>lquery[]</type></entry>
|
|
||||||
<entry><type>boolean</type></entry>
|
|
||||||
<entry>does <type>ltree</type> array contain any path matching any <type>lquery</type>?</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><type>lquery[]</type> <literal>?</literal> <type>ltree[]</type></entry>
|
|
||||||
<entry><type>boolean</type></entry>
|
|
||||||
<entry>does <type>ltree</type> array contain any path matching any <type>lquery</type>?</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><type>ltree[]</type> <literal>@</literal> <type>ltxtquery</type></entry>
|
|
||||||
<entry><type>boolean</type></entry>
|
|
||||||
<entry>does array contain any path matching <type>ltxtquery</type>?</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><type>ltxtquery</type> <literal>@</literal> <type>ltree[]</type></entry>
|
|
||||||
<entry><type>boolean</type></entry>
|
|
||||||
<entry>does array contain any path matching <type>ltxtquery</type>?</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><type>ltree[]</type> <literal>?@></literal> <type>ltree</type></entry>
|
|
||||||
<entry><type>ltree</type></entry>
|
|
||||||
<entry>first array entry that is an ancestor of <type>ltree</type>; NULL if none</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><type>ltree[]</type> <literal>?<@</literal> <type>ltree</type></entry>
|
|
||||||
<entry><type>ltree</type></entry>
|
|
||||||
<entry>first array entry that is a descendant of <type>ltree</type>; NULL if none</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><type>ltree[]</type> <literal>?~</literal> <type>lquery</type></entry>
|
|
||||||
<entry><type>ltree</type></entry>
|
|
||||||
<entry>first array entry that matches <type>lquery</type>; NULL if none</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><type>ltree[]</type> <literal>?@</literal> <type>ltxtquery</type></entry>
|
|
||||||
<entry><type>ltree</type></entry>
|
|
||||||
<entry>first array entry that matches <type>ltxtquery</type>; NULL if none</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</tgroup>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -380,114 +432,178 @@ Europe & Russia*@ & !Transportation
|
|||||||
|
|
||||||
<table id="ltree-func-table">
|
<table id="ltree-func-table">
|
||||||
<title><type>ltree</type> Functions</title>
|
<title><type>ltree</type> Functions</title>
|
||||||
|
<tgroup cols="1">
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
Function
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Description
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Example(s)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tgroup cols="5">
|
<tbody>
|
||||||
<thead>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Function</entry>
|
<indexterm><primary>subltree</primary></indexterm>
|
||||||
<entry>Return Type</entry>
|
<function>subltree</function> ( <type>ltree</type>, <parameter>start</parameter> <type>integer</type>, <parameter>end</parameter> <type>integer</type> )
|
||||||
<entry>Description</entry>
|
<returnvalue>ltree</returnvalue>
|
||||||
<entry>Example</entry>
|
</para>
|
||||||
<entry>Result</entry>
|
<para>
|
||||||
</row>
|
Returns subpath of <type>ltree</type> from
|
||||||
</thead>
|
position <parameter>start</parameter> to
|
||||||
|
position <parameter>end</parameter>-1 (counting from 0).
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>subltree('Top.Child1.Child2',1,2)</literal>
|
||||||
|
<returnvalue>Child1</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<tbody>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><function>subltree(ltree, int start, int end)</function><indexterm><primary>subltree</primary></indexterm></entry>
|
<indexterm><primary>subpath</primary></indexterm>
|
||||||
<entry><type>ltree</type></entry>
|
<function>subpath</function> ( <type>ltree</type>, <parameter>offset</parameter> <type>integer</type>, <parameter>len</parameter> <type>integer</type> )
|
||||||
<entry>subpath of <type>ltree</type> from position <parameter>start</parameter> to
|
<returnvalue>ltree</returnvalue>
|
||||||
position <parameter>end</parameter>-1 (counting from 0)</entry>
|
</para>
|
||||||
<entry><literal>subltree('Top.Child1.Child2',1,2)</literal></entry>
|
<para>
|
||||||
<entry><literal>Child1</literal></entry>
|
Returns subpath of <type>ltree</type> starting at
|
||||||
</row>
|
position <parameter>offset</parameter>, with
|
||||||
|
length <parameter>len</parameter>. If <parameter>offset</parameter>
|
||||||
|
is negative, subpath starts that far from the end of the path.
|
||||||
|
If <parameter>len</parameter> is negative, leaves that many labels off
|
||||||
|
the end of the path.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>subpath('Top.Child1.Child2',0,2)</literal>
|
||||||
|
<returnvalue>Top.Child1</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>subpath(ltree, int offset, int len)</function><indexterm><primary>subpath</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>ltree</type></entry>
|
<function>subpath</function> ( <type>ltree</type>, <parameter>offset</parameter> <type>integer</type> )
|
||||||
<entry>subpath of <type>ltree</type> starting at position
|
<returnvalue>ltree</returnvalue>
|
||||||
<parameter>offset</parameter>, length <parameter>len</parameter>.
|
</para>
|
||||||
If <parameter>offset</parameter> is negative, subpath starts that far from the
|
<para>
|
||||||
end of the path. If <parameter>len</parameter> is negative, leaves that many
|
Returns subpath of <type>ltree</type> starting at
|
||||||
labels off the end of the path.</entry>
|
position <parameter>offset</parameter>, extending to end of path.
|
||||||
<entry><literal>subpath('Top.Child1.Child2',0,2)</literal></entry>
|
If <parameter>offset</parameter> is negative, subpath starts that far
|
||||||
<entry><literal>Top.Child1</literal></entry>
|
from the end of the path.
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>subpath('Top.Child1.Child2',1)</literal>
|
||||||
|
<returnvalue>Child1.Child2</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>subpath(ltree, int offset)</function></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>ltree</type></entry>
|
<indexterm><primary>nlevel</primary></indexterm>
|
||||||
<entry>subpath of <type>ltree</type> starting at position
|
<function>nlevel</function> ( <type>ltree</type> )
|
||||||
<parameter>offset</parameter>, extending to end of path.
|
<returnvalue>integer</returnvalue>
|
||||||
If <parameter>offset</parameter> is negative, subpath starts that far from the
|
</para>
|
||||||
end of the path.</entry>
|
<para>
|
||||||
<entry><literal>subpath('Top.Child1.Child2',1)</literal></entry>
|
Returns number of labels in path.
|
||||||
<entry><literal>Child1.Child2</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
<literal>nlevel('Top.Child1.Child2')</literal>
|
||||||
|
<returnvalue>3</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>nlevel(ltree)</function><indexterm><primary>nlevel</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>integer</type></entry>
|
<indexterm><primary>index</primary></indexterm>
|
||||||
<entry>number of labels in path</entry>
|
<function>index</function> ( <parameter>a</parameter> <type>ltree</type>, <parameter>b</parameter> <type>ltree</type> )
|
||||||
<entry><literal>nlevel('Top.Child1.Child2')</literal></entry>
|
<returnvalue>integer</returnvalue>
|
||||||
<entry><literal>3</literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Returns position of first occurrence of <parameter>b</parameter> in
|
||||||
|
<parameter>a</parameter>, or -1 if not found.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6')</literal>
|
||||||
|
<returnvalue>6</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>index(ltree a, ltree b)</function><indexterm><primary>index</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>integer</type></entry>
|
<function>index</function> ( <parameter>a</parameter> <type>ltree</type>, <parameter>b</parameter> <type>ltree</type>, <parameter>offset</parameter> <type>integer</type> )
|
||||||
<entry>position of first occurrence of <parameter>b</parameter> in
|
<returnvalue>integer</returnvalue>
|
||||||
<parameter>a</parameter>; -1 if not found</entry>
|
</para>
|
||||||
<entry><literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6')</literal></entry>
|
<para>
|
||||||
<entry><literal>6</literal></entry>
|
Returns position of first occurrence of <parameter>b</parameter>
|
||||||
</row>
|
in <parameter>a</parameter>, or -1 if not found. The search starts at
|
||||||
|
position <parameter>offset</parameter>;
|
||||||
|
negative <parameter>offset</parameter> means
|
||||||
|
start <parameter>-offset</parameter> labels from the end of the path.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-4)</literal>
|
||||||
|
<returnvalue>9</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>index(ltree a, ltree b, int offset)</function></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>integer</type></entry>
|
<indexterm><primary>text2ltree</primary></indexterm>
|
||||||
<entry>position of first occurrence of <parameter>b</parameter> in
|
<function>text2ltree</function> ( <type>text</type> )
|
||||||
<parameter>a</parameter>, searching starting at <parameter>offset</parameter>;
|
<returnvalue>ltree</returnvalue>
|
||||||
negative <parameter>offset</parameter> means start <parameter>-offset</parameter>
|
</para>
|
||||||
labels from the end of the path</entry>
|
<para>
|
||||||
<entry><literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-4)</literal></entry>
|
Casts <type>text</type> to <type>ltree</type>.
|
||||||
<entry><literal>9</literal></entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>text2ltree(text)</function><indexterm><primary>text2ltree</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>ltree</type></entry>
|
<indexterm><primary>ltree2text</primary></indexterm>
|
||||||
<entry>cast <type>text</type> to <type>ltree</type></entry>
|
<function>ltree2text</function> ( <type>ltree</type> )
|
||||||
<entry><literal></literal></entry>
|
<returnvalue>text</returnvalue>
|
||||||
<entry><literal></literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Casts <type>ltree</type> to <type>text</type>.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>ltree2text(ltree)</function><indexterm><primary>ltree2text</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>text</type></entry>
|
<indexterm><primary>lca</primary></indexterm>
|
||||||
<entry>cast <type>ltree</type> to <type>text</type></entry>
|
<function>lca</function> ( <type>ltree</type> <optional>, <type>ltree</type> <optional>, ... </optional></optional> )
|
||||||
<entry><literal></literal></entry>
|
<returnvalue>ltree</returnvalue>
|
||||||
<entry><literal></literal></entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Computes longest common ancestor of paths
|
||||||
|
(up to 8 arguments are supported).
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<literal>lca('1.2.3','1.2.3.4.5.6')</literal>
|
||||||
|
<returnvalue>1.2</returnvalue>
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><function>lca(ltree, ltree, ...)</function><indexterm><primary>lca</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>ltree</type></entry>
|
<function>lca</function> ( <type>ltree[]</type> )
|
||||||
<entry>longest common ancestor of paths
|
<returnvalue>ltree</returnvalue>
|
||||||
(up to 8 arguments supported)</entry>
|
</para>
|
||||||
<entry><literal>lca('1.2.3','1.2.3.4.5.6')</literal></entry>
|
<para>
|
||||||
<entry><literal>1.2</literal></entry>
|
Computes longest common ancestor of paths in array.
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
<row>
|
<literal>lca(array['1.2.3'::ltree,'1.2.3.4'])</literal>
|
||||||
<entry><function>lca(ltree[])</function></entry>
|
<returnvalue>1.2</returnvalue>
|
||||||
<entry><type>ltree</type></entry>
|
</para></entry>
|
||||||
<entry>longest common ancestor of paths in array</entry>
|
</row>
|
||||||
<entry><literal>lca(array['1.2.3'::ltree,'1.2.3.4'])</literal></entry>
|
</tbody>
|
||||||
<entry><literal>1.2</literal></entry>
|
</tgroup>
|
||||||
</row>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</tgroup>
|
|
||||||
</table>
|
</table>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
@ -3375,122 +3375,179 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
|
|||||||
linkend="monitoring-stats-funcs-table"/>.
|
linkend="monitoring-stats-funcs-table"/>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table id="monitoring-stats-funcs-table">
|
<table id="monitoring-stats-funcs-table">
|
||||||
<title>Additional Statistics Functions</title>
|
<title>Additional Statistics Functions</title>
|
||||||
|
<tgroup cols="1">
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
Function
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tgroup cols="3">
|
<tbody>
|
||||||
<thead>
|
<row>
|
||||||
<row>
|
|
||||||
<entry>Function</entry>
|
|
||||||
<entry>Return Type</entry>
|
|
||||||
<entry>Description</entry>
|
|
||||||
</row>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<!-- See also the entry for this in func.sgml -->
|
<!-- See also the entry for this in func.sgml -->
|
||||||
<entry><literal><function>pg_backend_pid()</function></literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>integer</type></entry>
|
<function>pg_backend_pid</function> ()
|
||||||
<entry>
|
<returnvalue>integer</returnvalue>
|
||||||
Process ID of the server process handling the current session
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
</row>
|
Returns the process ID of the server process attached to the current
|
||||||
|
session.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_get_activity</function>(<type>integer</type>)</literal><indexterm><primary>pg_stat_get_activity</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>setof record</type></entry>
|
<indexterm>
|
||||||
<entry>
|
<primary>pg_stat_get_activity</primary>
|
||||||
Returns a record of information about the backend with the specified PID, or
|
</indexterm>
|
||||||
one record for each active backend in the system if <symbol>NULL</symbol> is
|
<function>pg_stat_get_activity</function> ( <type>integer</type> )
|
||||||
specified. The fields returned are a subset of those in the
|
<returnvalue>setof record</returnvalue>
|
||||||
<structname>pg_stat_activity</structname> view.
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
</row>
|
Returns a record of information about the backend with the specified
|
||||||
|
process ID, or one record for each active backend in the system
|
||||||
|
if <literal>NULL</literal> is specified. The fields returned are a
|
||||||
|
subset of those in the <structname>pg_stat_activity</structname> view.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_get_snapshot_timestamp()</function></literal><indexterm><primary>pg_stat_get_snapshot_timestamp</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>timestamp with time zone</type></entry>
|
<indexterm>
|
||||||
<entry>
|
<primary>pg_stat_get_snapshot_timestamp</primary>
|
||||||
Returns the timestamp of the current statistics snapshot
|
</indexterm>
|
||||||
</entry>
|
<function>pg_stat_get_snapshot_timestamp</function> ()
|
||||||
</row>
|
<returnvalue>timestamp with time zone</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the timestamp of the current statistics snapshot.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_clear_snapshot()</function></literal><indexterm><primary>pg_stat_clear_snapshot</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>void</type></entry>
|
<indexterm>
|
||||||
<entry>
|
<primary>pg_stat_clear_snapshot</primary>
|
||||||
Discard the current statistics snapshot
|
</indexterm>
|
||||||
</entry>
|
<function>pg_stat_clear_snapshot</function> ()
|
||||||
</row>
|
<returnvalue>void</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Discards the current statistics snapshot.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_reset()</function></literal><indexterm><primary>pg_stat_reset</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>void</type></entry>
|
<indexterm>
|
||||||
<entry>
|
<primary>pg_stat_reset</primary>
|
||||||
Reset all statistics counters for the current database to zero
|
</indexterm>
|
||||||
(requires superuser privileges by default, but EXECUTE for this
|
<function>pg_stat_reset</function> ()
|
||||||
function can be granted to others.)
|
<returnvalue>void</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Resets all statistics counters for the current database to zero.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This function is restricted to superusers by default, but other users
|
||||||
|
can be granted EXECUTE to run the function.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_reset_shared</function>(text)</literal><indexterm><primary>pg_stat_reset_shared</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>void</type></entry>
|
<indexterm>
|
||||||
<entry>
|
<primary>pg_stat_reset_shared</primary>
|
||||||
Reset some cluster-wide statistics counters to zero, depending on the
|
</indexterm>
|
||||||
argument (requires superuser privileges by default, but EXECUTE for
|
<function>pg_stat_reset_shared</function> ( <type>text</type> )
|
||||||
this function can be granted to others).
|
<returnvalue>void</returnvalue>
|
||||||
Calling <literal>pg_stat_reset_shared('bgwriter')</literal> will zero all the
|
</para>
|
||||||
counters shown in the <structname>pg_stat_bgwriter</structname> view.
|
<para>
|
||||||
Calling <literal>pg_stat_reset_shared('archiver')</literal> will zero all the
|
Resets some cluster-wide statistics counters to zero, depending on the
|
||||||
counters shown in the <structname>pg_stat_archiver</structname> view.
|
argument. The argument can be <literal>bgwriter</literal> to reset
|
||||||
</entry>
|
all the counters shown in
|
||||||
</row>
|
the <structname>pg_stat_bgwriter</structname>
|
||||||
|
view,or <literal>archiver</literal> to reset all the counters shown in
|
||||||
|
the <structname>pg_stat_archiver</structname> view.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This function is restricted to superusers by default, but other users
|
||||||
|
can be granted EXECUTE to run the function.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_reset_single_table_counters</function>(oid)</literal><indexterm><primary>pg_stat_reset_single_table_counters</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>void</type></entry>
|
<indexterm>
|
||||||
<entry>
|
<primary>pg_stat_reset_single_table_counters</primary>
|
||||||
Reset statistics for a single table or index in the current database to
|
</indexterm>
|
||||||
zero (requires superuser privileges by default, but EXECUTE for this
|
<function>pg_stat_reset_single_table_counters</function> ( <type>oid</type> )
|
||||||
function can be granted to others)
|
<returnvalue>void</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Resets statistics for a single table or index in the current database
|
||||||
|
to zero.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This function is restricted to superusers by default, but other users
|
||||||
|
can be granted EXECUTE to run the function.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_reset_single_function_counters</function>(oid)</literal><indexterm><primary>pg_stat_reset_single_function_counters</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>void</type></entry>
|
<indexterm>
|
||||||
<entry>
|
<primary>pg_stat_reset_single_function_counters</primary>
|
||||||
Reset statistics for a single function in the current database to
|
</indexterm>
|
||||||
zero (requires superuser privileges by default, but EXECUTE for this
|
<function>pg_stat_reset_single_function_counters</function> ( <type>oid</type> )
|
||||||
function can be granted to others)
|
<returnvalue>void</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Resets statistics for a single function in the current database to
|
||||||
|
zero.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This function is restricted to superusers by default, but other users
|
||||||
|
can be granted EXECUTE to run the function.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_reset_slru</function>(text)</literal><indexterm><primary>pg_stat_reset_slru</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>void</type></entry>
|
<indexterm>
|
||||||
<entry>
|
<primary>pg_stat_reset_slru</primary>
|
||||||
Reset statistics either for a single SLRU or all SLRUs in the cluster
|
</indexterm>
|
||||||
to zero (requires superuser privileges by default, but EXECUTE for this
|
<function>pg_stat_reset_slru</function> ( <type>text</type> )
|
||||||
function can be granted to others).
|
<returnvalue>void</returnvalue>
|
||||||
Calling <literal>pg_stat_reset_slru(NULL)</literal> will zero all the
|
</para>
|
||||||
counters shown in the <structname>pg_stat_slru</structname> view for
|
<para>
|
||||||
all SLRU caches.
|
Resets statistics to zero for a single SLRU cache, or for all SLRUs in
|
||||||
Calling <literal>pg_stat_reset_slru(name)</literal> with names from a
|
the cluster. If the argument is NULL, all counters shown in
|
||||||
predefined list (<literal>async</literal>, <literal>clog</literal>,
|
the <structname>pg_stat_slru</structname> view for all SLRU caches are
|
||||||
<literal>commit_timestamp</literal>, <literal>multixact_offset</literal>,
|
reset. The argument can be one of <literal>async</literal>,
|
||||||
<literal>multixact_member</literal>, <literal>oldserxid</literal>,
|
<literal>clog</literal>, <literal>commit_timestamp</literal>,
|
||||||
<literal>subtrans</literal> and <literal>other</literal>) resets counters
|
<literal>multixact_offset</literal>,
|
||||||
for only that entry. Names not included in this list are treated as
|
<literal>multixact_member</literal>, <literal>oldserxid</literal>, or
|
||||||
<literal>other</literal>.
|
<literal>subtrans</literal> to reset the counters for only that entry.
|
||||||
</entry>
|
If the argument is <literal>other</literal> (or indeed, any
|
||||||
</row>
|
unrecognized name), then the counters for all other SLRU caches, such
|
||||||
</tbody>
|
as extension-defined caches, are reset.
|
||||||
</tgroup>
|
</para>
|
||||||
</table>
|
<para>
|
||||||
|
This function is restricted to superusers by default, but other users
|
||||||
|
can be granted EXECUTE to run the function.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</table>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<function>pg_stat_get_activity</function>, the underlying function of
|
<function>pg_stat_get_activity</function>, the underlying function of
|
||||||
@ -3514,100 +3571,182 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table id="monitoring-stats-backend-funcs-table">
|
<table id="monitoring-stats-backend-funcs-table">
|
||||||
<title>Per-Backend Statistics Functions</title>
|
<title>Per-Backend Statistics Functions</title>
|
||||||
|
<tgroup cols="1">
|
||||||
<tgroup cols="3">
|
<thead>
|
||||||
<thead>
|
|
||||||
<row>
|
|
||||||
<entry>Function</entry>
|
|
||||||
<entry>Return Type</entry>
|
|
||||||
<entry>Description</entry>
|
|
||||||
</row>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal><function>pg_stat_get_backend_idset()</function></literal></entry>
|
|
||||||
<entry><type>setof integer</type></entry>
|
|
||||||
<entry>Set of currently active backend ID numbers (from 1 to the
|
|
||||||
number of active backends)</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal><function>pg_stat_get_backend_activity(integer)</function></literal></entry>
|
|
||||||
<entry><type>text</type></entry>
|
|
||||||
<entry>Text of this backend's most recent query</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal><function>pg_stat_get_backend_activity_start(integer)</function></literal></entry>
|
|
||||||
<entry><type>timestamp with time zone</type></entry>
|
|
||||||
<entry>Time when the most recent query was started</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal><function>pg_stat_get_backend_client_addr(integer)</function></literal></entry>
|
|
||||||
<entry><type>inet</type></entry>
|
|
||||||
<entry>IP address of the client connected to this backend</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal><function>pg_stat_get_backend_client_port(integer)</function></literal></entry>
|
|
||||||
<entry><type>integer</type></entry>
|
|
||||||
<entry>TCP port number that the client is using for communication</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal><function>pg_stat_get_backend_dbid(integer)</function></literal></entry>
|
|
||||||
<entry><type>oid</type></entry>
|
|
||||||
<entry>OID of the database this backend is connected to</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal><function>pg_stat_get_backend_pid(integer)</function></literal></entry>
|
|
||||||
<entry><type>integer</type></entry>
|
|
||||||
<entry>Process ID of this backend</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal><function>pg_stat_get_backend_start(integer)</function></literal></entry>
|
|
||||||
<entry><type>timestamp with time zone</type></entry>
|
|
||||||
<entry>Time when this process was started</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal><function>pg_stat_get_backend_userid(integer)</function></literal></entry>
|
|
||||||
<entry><type>oid</type></entry>
|
|
||||||
<entry>OID of the user logged into this backend</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_get_backend_wait_event_type(integer)</function></literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>text</type></entry>
|
Function
|
||||||
<entry>Wait event type name if backend is currently waiting, otherwise NULL.
|
</para>
|
||||||
See <xref linkend="wait-event-table"/> for details.
|
<para>
|
||||||
</entry>
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm>
|
||||||
|
<primary>pg_stat_get_backend_idset</primary>
|
||||||
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_idset</function> ()
|
||||||
|
<returnvalue>setof integer</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the set of currently active backend ID numbers (from 1 to the
|
||||||
|
number of active backends).
|
||||||
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_get_backend_wait_event(integer)</function></literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>text</type></entry>
|
<indexterm>
|
||||||
<entry>Wait event name if backend is currently waiting, otherwise NULL.
|
<primary>pg_stat_get_backend_activity</primary>
|
||||||
See <xref linkend="wait-event-table"/> for details.
|
</indexterm>
|
||||||
</entry>
|
<function>pg_stat_get_backend_activity</function> ( <type>integer</type> )
|
||||||
</row>
|
<returnvalue>text</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the text of this backend's most recent query.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal><function>pg_stat_get_backend_xact_start(integer)</function></literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>timestamp with time zone</type></entry>
|
<indexterm>
|
||||||
<entry>Time when the current transaction was started</entry>
|
<primary>pg_stat_get_backend_activity_start</primary>
|
||||||
</row>
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_activity_start</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>timestamp with time zone</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the time when the backend's most recent query was started.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
</tbody>
|
<row>
|
||||||
</tgroup>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
</table>
|
<indexterm>
|
||||||
|
<primary>pg_stat_get_backend_client_addr</primary>
|
||||||
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_client_addr</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>inet</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the IP address of the client connected to this backend.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm>
|
||||||
|
<primary>pg_stat_get_backend_client_port</primary>
|
||||||
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_client_port</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>integer</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the TCP port number that the client is using for communication.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm>
|
||||||
|
<primary>pg_stat_get_backend_dbid</primary>
|
||||||
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_dbid</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>oid</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the OID of the database this backend is connected to.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm>
|
||||||
|
<primary>pg_stat_get_backend_pid</primary>
|
||||||
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_pid</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>integer</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the process ID of this backend.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm>
|
||||||
|
<primary>pg_stat_get_backend_start</primary>
|
||||||
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_start</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>timestamp with time zone</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the time when this process was started.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm>
|
||||||
|
<primary>pg_stat_get_backend_userid</primary>
|
||||||
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_userid</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>oid</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the OID of the user logged into this backend.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm>
|
||||||
|
<primary>pg_stat_get_backend_wait_event_type</primary>
|
||||||
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_wait_event_type</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>text</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the wait event type name if this backend is currently waiting,
|
||||||
|
otherwise NULL. See <xref linkend="wait-event-table"/> for details.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm>
|
||||||
|
<primary>pg_stat_get_backend_wait_event</primary>
|
||||||
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_wait_event</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>text</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the wait event name if this backend is currently waiting,
|
||||||
|
otherwise NULL. See <xref linkend="wait-event-table"/> for details.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm>
|
||||||
|
<primary>pg_stat_get_backend_xact_start</primary>
|
||||||
|
</indexterm>
|
||||||
|
<function>pg_stat_get_backend_xact_start</function> ( <type>integer</type> )
|
||||||
|
<returnvalue>timestamp with time zone</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the time when the backend's current transaction was started.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</table>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
@ -3834,7 +3973,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
|
|||||||
<row>
|
<row>
|
||||||
<entry><literal>finalizing analyze</literal></entry>
|
<entry><literal>finalizing analyze</literal></entry>
|
||||||
<entry>
|
<entry>
|
||||||
The command is updating pg_class. When this phase is completed,
|
The command is updating pg_class. When this phase is completed,
|
||||||
<command>ANALYZE</command> will end.
|
<command>ANALYZE</command> will end.
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
@ -70,83 +70,106 @@
|
|||||||
|
|
||||||
<table id="pgtrgm-func-table">
|
<table id="pgtrgm-func-table">
|
||||||
<title><filename>pg_trgm</filename> Functions</title>
|
<title><filename>pg_trgm</filename> Functions</title>
|
||||||
<tgroup cols="3">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Function</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Returns</entry>
|
Function
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
</thead>
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><function>similarity(text, text)</function><indexterm><primary>similarity</primary></indexterm></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>real</type></entry>
|
<indexterm><primary>similarity</primary></indexterm>
|
||||||
<entry>
|
<function>similarity</function> ( <type>text</type>, <type>text</type> )
|
||||||
Returns a number that indicates how similar the two arguments are.
|
<returnvalue>real</returnvalue>
|
||||||
The range of the result is zero (indicating that the two strings are
|
</para>
|
||||||
completely dissimilar) to one (indicating that the two strings are
|
<para>
|
||||||
identical).
|
Returns a number that indicates how similar the two arguments are.
|
||||||
</entry>
|
The range of the result is zero (indicating that the two strings are
|
||||||
</row>
|
completely dissimilar) to one (indicating that the two strings are
|
||||||
<row>
|
identical).
|
||||||
<entry><function>show_trgm(text)</function><indexterm><primary>show_trgm</primary></indexterm></entry>
|
</para></entry>
|
||||||
<entry><type>text[]</type></entry>
|
</row>
|
||||||
<entry>
|
|
||||||
Returns an array of all the trigrams in the given string.
|
<row>
|
||||||
(In practice this is seldom useful except for debugging.)
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
</entry>
|
<indexterm><primary>show_trgm</primary></indexterm>
|
||||||
</row>
|
<function>show_trgm</function> ( <type>text</type> )
|
||||||
<row>
|
<returnvalue>text[]</returnvalue>
|
||||||
<entry>
|
</para>
|
||||||
<function>word_similarity(text, text)</function>
|
<para>
|
||||||
<indexterm><primary>word_similarity</primary></indexterm>
|
Returns an array of all the trigrams in the given string.
|
||||||
</entry>
|
(In practice this is seldom useful except for debugging.)
|
||||||
<entry><type>real</type></entry>
|
</para></entry>
|
||||||
<entry>
|
</row>
|
||||||
Returns a number that indicates the greatest similarity between
|
|
||||||
the set of trigrams in the first string and any continuous extent
|
<row>
|
||||||
of an ordered set of trigrams in the second string. For details, see
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
the explanation below.
|
<indexterm><primary>word_similarity</primary></indexterm>
|
||||||
</entry>
|
<function>word_similarity</function> ( <type>text</type>, <type>text</type> )
|
||||||
</row>
|
<returnvalue>real</returnvalue>
|
||||||
<row>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
<function>strict_word_similarity(text, text)</function>
|
Returns a number that indicates the greatest similarity between
|
||||||
<indexterm><primary>strict_word_similarity</primary></indexterm>
|
the set of trigrams in the first string and any continuous extent
|
||||||
</entry>
|
of an ordered set of trigrams in the second string. For details, see
|
||||||
<entry><type>real</type></entry>
|
the explanation below.
|
||||||
<entry>
|
</para></entry>
|
||||||
Same as <function>word_similarity(text, text)</function>, but forces
|
</row>
|
||||||
extent boundaries to match word boundaries. Since we don't have
|
|
||||||
cross-word trigrams, this function actually returns greatest similarity
|
<row>
|
||||||
between first string and any continuous extent of words of the second
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
string.
|
<indexterm><primary>strict_word_similarity</primary></indexterm>
|
||||||
</entry>
|
<function>strict_word_similarity</function> ( <type>text</type>, <type>text</type> )
|
||||||
</row>
|
<returnvalue>real</returnvalue>
|
||||||
<row>
|
</para>
|
||||||
<entry><function>show_limit()</function><indexterm><primary>show_limit</primary></indexterm></entry>
|
<para>
|
||||||
<entry><type>real</type></entry>
|
Same as <function>word_similarity</function>, but forces
|
||||||
<entry>
|
extent boundaries to match word boundaries. Since we don't have
|
||||||
Returns the current similarity threshold used by the <literal>%</literal>
|
cross-word trigrams, this function actually returns greatest similarity
|
||||||
operator. This sets the minimum similarity between
|
between first string and any continuous extent of words of the second
|
||||||
two words for them to be considered similar enough to
|
string.
|
||||||
be misspellings of each other, for example
|
</para></entry>
|
||||||
(<emphasis>deprecated</emphasis>).
|
</row>
|
||||||
</entry>
|
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><function>set_limit(real)</function><indexterm><primary>set_limit</primary></indexterm></entry>
|
<indexterm><primary>show_limit</primary></indexterm>
|
||||||
<entry><type>real</type></entry>
|
<function>show_limit</function> ()
|
||||||
<entry>
|
<returnvalue>real</returnvalue>
|
||||||
Sets the current similarity threshold that is used by the <literal>%</literal>
|
</para>
|
||||||
operator. The threshold must be between 0 and 1 (default is 0.3).
|
<para>
|
||||||
Returns the same value passed in (<emphasis>deprecated</emphasis>).
|
Returns the current similarity threshold used by the <literal>%</literal>
|
||||||
</entry>
|
operator. This sets the minimum similarity between
|
||||||
</row>
|
two words for them to be considered similar enough to
|
||||||
</tbody>
|
be misspellings of each other, for example.
|
||||||
</tgroup>
|
(<emphasis>Deprecated</emphasis>; instead use <command>SHOW</command>
|
||||||
|
<varname>pg_trgm.similarity_threshold</varname>.)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>set_limit</primary></indexterm>
|
||||||
|
<function>set_limit</function> ( <type>real</type> )
|
||||||
|
<returnvalue>real</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Sets the current similarity threshold that is used by the <literal>%</literal>
|
||||||
|
operator. The threshold must be between 0 and 1 (default is 0.3).
|
||||||
|
Returns the same value passed in.
|
||||||
|
(<emphasis>Deprecated</emphasis>; instead use <command>SET</command>
|
||||||
|
<varname>pg_trgm.similarity_threshold</varname>.)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -178,9 +201,9 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
At the same time, <function>strict_word_similarity(text, text)</function>
|
At the same time, <function>strict_word_similarity</function>
|
||||||
selects an extent of words in the second string. In the example above,
|
selects an extent of words in the second string. In the example above,
|
||||||
<function>strict_word_similarity(text, text)</function> would select the
|
<function>strict_word_similarity</function> would select the
|
||||||
extent of a single word <literal>'words'</literal>, whose set of trigrams is
|
extent of a single word <literal>'words'</literal>, whose set of trigrams is
|
||||||
<literal>{" w"," wo","wor","ord","rds","ds "}</literal>.
|
<literal>{" w"," wo","wor","ord","rds","ds "}</literal>.
|
||||||
|
|
||||||
@ -194,117 +217,141 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Thus, the <function>strict_word_similarity(text, text)</function> function
|
Thus, the <function>strict_word_similarity</function> function
|
||||||
is useful for finding the similarity to whole words, while
|
is useful for finding the similarity to whole words, while
|
||||||
<function>word_similarity(text, text)</function> is more suitable for
|
<function>word_similarity</function> is more suitable for
|
||||||
finding the similarity for parts of words.
|
finding the similarity for parts of words.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table id="pgtrgm-op-table">
|
<table id="pgtrgm-op-table">
|
||||||
<title><filename>pg_trgm</filename> Operators</title>
|
<title><filename>pg_trgm</filename> Operators</title>
|
||||||
<tgroup cols="3">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Operator</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Returns</entry>
|
Operator
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
</thead>
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><type>text</type> <literal>%</literal> <type>text</type></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>boolean</type></entry>
|
<type>text</type> <literal>%</literal> <type>text</type>
|
||||||
<entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
Returns <literal>true</literal> if its arguments have a similarity that is
|
</para>
|
||||||
greater than the current similarity threshold set by
|
<para>
|
||||||
<varname>pg_trgm.similarity_threshold</varname>.
|
Returns <literal>true</literal> if its arguments have a similarity
|
||||||
</entry>
|
that is greater than the current similarity threshold set by
|
||||||
</row>
|
<varname>pg_trgm.similarity_threshold</varname>.
|
||||||
<row>
|
</para></entry>
|
||||||
<entry><type>text</type> <literal><%</literal> <type>text</type></entry>
|
</row>
|
||||||
<entry><type>boolean</type></entry>
|
|
||||||
<entry>
|
<row>
|
||||||
Returns <literal>true</literal> if the similarity between the trigram
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
set in the first argument and a continuous extent of an ordered trigram
|
<type>text</type> <literal><%</literal> <type>text</type>
|
||||||
set in the second argument is greater than the current word similarity
|
<returnvalue>boolean</returnvalue>
|
||||||
threshold set by <varname>pg_trgm.word_similarity_threshold</varname>
|
</para>
|
||||||
parameter.
|
<para>
|
||||||
</entry>
|
Returns <literal>true</literal> if the similarity between the trigram
|
||||||
</row>
|
set in the first argument and a continuous extent of an ordered trigram
|
||||||
<row>
|
set in the second argument is greater than the current word similarity
|
||||||
<entry><type>text</type> <literal>%></literal> <type>text</type></entry>
|
threshold set by <varname>pg_trgm.word_similarity_threshold</varname>
|
||||||
<entry><type>boolean</type></entry>
|
parameter.
|
||||||
<entry>
|
</para></entry>
|
||||||
Commutator of the <literal><%</literal> operator.
|
</row>
|
||||||
</entry>
|
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry><type>text</type> <literal><<%</literal> <type>text</type></entry>
|
<type>text</type> <literal>%></literal> <type>text</type>
|
||||||
<entry><type>boolean</type></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry>
|
</para>
|
||||||
Returns <literal>true</literal> if its second argument has a continuous
|
<para>
|
||||||
extent of an ordered trigram set that matches word boundaries,
|
Commutator of the <literal><%</literal> operator.
|
||||||
and its similarity to the trigram set of the first argument is greater
|
</para></entry>
|
||||||
than the current strict word similarity threshold set by the
|
</row>
|
||||||
<varname>pg_trgm.strict_word_similarity_threshold</varname> parameter.
|
|
||||||
</entry>
|
<row>
|
||||||
</row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<row>
|
<type>text</type> <literal><<%</literal> <type>text</type>
|
||||||
<entry><type>text</type> <literal>%>></literal> <type>text</type></entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry><type>boolean</type></entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
Commutator of the <literal><<%</literal> operator.
|
Returns <literal>true</literal> if its second argument has a continuous
|
||||||
</entry>
|
extent of an ordered trigram set that matches word boundaries,
|
||||||
</row>
|
and its similarity to the trigram set of the first argument is greater
|
||||||
<row>
|
than the current strict word similarity threshold set by the
|
||||||
<entry><type>text</type> <literal><-></literal> <type>text</type></entry>
|
<varname>pg_trgm.strict_word_similarity_threshold</varname> parameter.
|
||||||
<entry><type>real</type></entry>
|
</para></entry>
|
||||||
<entry>
|
</row>
|
||||||
Returns the <quote>distance</quote> between the arguments, that is
|
|
||||||
one minus the <function>similarity()</function> value.
|
<row>
|
||||||
</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
</row>
|
<type>text</type> <literal>%>></literal> <type>text</type>
|
||||||
<row>
|
<returnvalue>boolean</returnvalue>
|
||||||
<entry>
|
</para>
|
||||||
<type>text</type> <literal><<-></literal> <type>text</type>
|
<para>
|
||||||
</entry>
|
Commutator of the <literal><<%</literal> operator.
|
||||||
<entry><type>real</type></entry>
|
</para></entry>
|
||||||
<entry>
|
</row>
|
||||||
Returns the <quote>distance</quote> between the arguments, that is
|
|
||||||
one minus the <function>word_similarity()</function> value.
|
<row>
|
||||||
</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
</row>
|
<type>text</type> <literal><-></literal> <type>text</type>
|
||||||
<row>
|
<returnvalue>real</returnvalue>
|
||||||
<entry>
|
</para>
|
||||||
<type>text</type> <literal><->></literal> <type>text</type>
|
<para>
|
||||||
</entry>
|
Returns the <quote>distance</quote> between the arguments, that is
|
||||||
<entry><type>real</type></entry>
|
one minus the <function>similarity()</function> value.
|
||||||
<entry>
|
</para></entry>
|
||||||
Commutator of the <literal><<-></literal> operator.
|
</row>
|
||||||
</entry>
|
|
||||||
</row>
|
<row>
|
||||||
<row>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>
|
<type>text</type> <literal><<-></literal> <type>text</type>
|
||||||
<type>text</type> <literal><<<-></literal> <type>text</type>
|
<returnvalue>real</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
<entry><type>real</type></entry>
|
<para>
|
||||||
<entry>
|
Returns the <quote>distance</quote> between the arguments, that is
|
||||||
Returns the <quote>distance</quote> between the arguments, that is
|
one minus the <function>word_similarity()</function> value.
|
||||||
one minus the <function>strict_word_similarity()</function> value.
|
</para></entry>
|
||||||
</entry>
|
</row>
|
||||||
</row>
|
|
||||||
<row>
|
<row>
|
||||||
<entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<type>text</type> <literal><->>></literal> <type>text</type>
|
<type>text</type> <literal><->></literal> <type>text</type>
|
||||||
</entry>
|
<returnvalue>real</returnvalue>
|
||||||
<entry><type>real</type></entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
Commutator of the <literal><<<-></literal> operator.
|
Commutator of the <literal><<-></literal> operator.
|
||||||
</entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
|
||||||
</tgroup>
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<type>text</type> <literal><<<-></literal> <type>text</type>
|
||||||
|
<returnvalue>real</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns the <quote>distance</quote> between the arguments, that is
|
||||||
|
one minus the <function>strict_word_similarity()</function> value.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<type>text</type> <literal><->>></literal> <type>text</type>
|
||||||
|
<returnvalue>real</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Commutator of the <literal><<<-></literal> operator.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -141,6 +141,8 @@ test=> select '6.25 .. 6.50'::seg as "pH";
|
|||||||
<table id="seg-input-examples">
|
<table id="seg-input-examples">
|
||||||
<title>Examples of Valid <type>seg</type> Input</title>
|
<title>Examples of Valid <type>seg</type> Input</title>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
|
<colspec colname="col1" colwidth="1*"/>
|
||||||
|
<colspec colname="col2" colwidth="2*"/>
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>5.0</literal></entry>
|
<entry><literal>5.0</literal></entry>
|
||||||
@ -248,65 +250,106 @@ test=> select '6.25 .. 6.50'::seg as "pH";
|
|||||||
|
|
||||||
<table id="seg-gist-operators">
|
<table id="seg-gist-operators">
|
||||||
<title>Seg GiST Operators</title>
|
<title>Seg GiST Operators</title>
|
||||||
<tgroup cols="2">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Operator</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Description</entry>
|
Operator
|
||||||
</row>
|
</para>
|
||||||
</thead>
|
<para>
|
||||||
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>[a, b] << [c, d]</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>[a, b] is entirely to the left of [c, d]. That is, [a,
|
<type>seg</type> <literal><<</literal> <type>seg</type>
|
||||||
b] << [c, d] is true if b < c and false otherwise.</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Is the first <type>seg</type> entirely to the left of the second?
|
||||||
|
[a, b] << [c, d] is true if b < c.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>[a, b] >> [c, d]</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>[a, b] is entirely to the right of [c, d]. That is, [a,
|
<type>seg</type> <literal>>></literal> <type>seg</type>
|
||||||
b] >> [c, d] is true if a > d and false otherwise.</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Is the first <type>seg</type> entirely to the right of the second?
|
||||||
|
[a, b] >> [c, d] is true if a > d.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>[a, b] &< [c, d]</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Overlaps or is left of — This might be better read
|
<type>seg</type> <literal>&<</literal> <type>seg</type>
|
||||||
as <quote>does not extend to right of</quote>. It is true when
|
<returnvalue>boolean</returnvalue>
|
||||||
b <= d.</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Does the first <type>seg</type> not extend to the right of the
|
||||||
|
second?
|
||||||
|
[a, b] &< [c, d] is true if b <= d.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>[a, b] &> [c, d]</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Overlaps or is right of — This might be better read
|
<type>seg</type> <literal>&></literal> <type>seg</type>
|
||||||
as <quote>does not extend to left of</quote>. It is true when
|
<returnvalue>boolean</returnvalue>
|
||||||
a >= c.</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
|
Does the first <type>seg</type> not extend to the left of the
|
||||||
|
second?
|
||||||
|
[a, b] &> [c, d] is true if a >= c.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>[a, b] = [c, d]</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Same as — The segments [a, b] and [c, d] are
|
<type>seg</type> <literal>=</literal> <type>seg</type>
|
||||||
identical, that is, a = c and b = d.</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Are the two <type>seg</type>s equal?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>[a, b] && [c, d]</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>The segments [a, b] and [c, d] overlap.</entry>
|
<type>seg</type> <literal>&&</literal> <type>seg</type>
|
||||||
</row>
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Do the two <type>seg</type>s overlap?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>[a, b] @> [c, d]</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>The segment [a, b] contains the segment [c, d], that is,
|
<type>seg</type> <literal>@></literal> <type>seg</type>
|
||||||
a <= c and b >= d.</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
|
<para>
|
||||||
|
Does the first <type>seg</type> contain the second?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>[a, b] <@ [c, d]</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>The segment [a, b] is contained in [c, d], that is, a
|
<type>seg</type> <literal><@</literal> <type>seg</type>
|
||||||
>= c and b <= d.</entry>
|
<returnvalue>boolean</returnvalue>
|
||||||
</row>
|
</para>
|
||||||
</tbody>
|
<para>
|
||||||
</tgroup>
|
Is the first <type>seg</type> contained in the second?
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -318,33 +361,10 @@ test=> select '6.25 .. 6.50'::seg as "pH";
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The standard B-tree operators are also provided, for example
|
In addition to the above operators, the usual comparison
|
||||||
|
operators shown in <xref linkend="functions-comparison-op-table"/> are
|
||||||
<informaltable>
|
available for type <type>seg</type>. These operators
|
||||||
<tgroup cols="2">
|
first compare (a) to (c),
|
||||||
<thead>
|
|
||||||
<row>
|
|
||||||
<entry>Operator</entry>
|
|
||||||
<entry>Description</entry>
|
|
||||||
</row>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<row>
|
|
||||||
<entry><literal>[a, b] < [c, d]</literal></entry>
|
|
||||||
<entry>Less than</entry>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<entry><literal>[a, b] > [c, d]</literal></entry>
|
|
||||||
<entry>Greater than</entry>
|
|
||||||
</row>
|
|
||||||
</tbody>
|
|
||||||
</tgroup>
|
|
||||||
</informaltable>
|
|
||||||
|
|
||||||
These operators do not make a lot of sense for any practical
|
|
||||||
purpose but sorting. These operators first compare (a) to (c),
|
|
||||||
and if these are equal, compare (b) to (d). That results in
|
and if these are equal, compare (b) to (d). That results in
|
||||||
reasonably good sorting in most cases, which is useful if
|
reasonably good sorting in most cases, which is useful if
|
||||||
you want to use ORDER BY with this type.
|
you want to use ORDER BY with this type.
|
||||||
|
@ -605,7 +605,7 @@ regression=# select sepgsql_getcon();
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
regression=# SELECT sepgsql_setcon('unconfined_u:unconfined_r:unconfined_t:s0-s0:c1.c4');
|
regression=# SELECT sepgsql_setcon('unconfined_u:unconfined_r:unconfined_t:s0-s0:c1.c4');
|
||||||
sepgsql_setcon
|
sepgsql_setcon
|
||||||
----------------
|
----------------
|
||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
@ -659,45 +659,77 @@ ERROR: SELinux: security policy violation
|
|||||||
|
|
||||||
<table id="sepgsql-functions-table">
|
<table id="sepgsql-functions-table">
|
||||||
<title>Sepgsql Functions</title>
|
<title>Sepgsql Functions</title>
|
||||||
<tgroup cols="2">
|
<tgroup cols="1">
|
||||||
<tbody>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>sepgsql_getcon() returns text</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>
|
Function
|
||||||
Returns the client domain, the current security label of the client.
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
</row>
|
Description
|
||||||
<row>
|
</para></entry>
|
||||||
<entry><literal>sepgsql_setcon(text) returns bool</literal></entry>
|
</row>
|
||||||
<entry>
|
</thead>
|
||||||
Switches the client domain of the current session to the new domain,
|
|
||||||
if allowed by the security policy.
|
<tbody>
|
||||||
It also accepts <literal>NULL</literal> input as a request to transition
|
<row>
|
||||||
to the client's original domain.
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
</entry>
|
<function>sepgsql_getcon</function> ()
|
||||||
</row>
|
<returnvalue>text</returnvalue>
|
||||||
<row>
|
</para>
|
||||||
<entry><literal>sepgsql_mcstrans_in(text) returns text</literal></entry>
|
<para>
|
||||||
<entry>Translates the given qualified MLS/MCS range into raw format if
|
Returns the client domain, the current security label of the client.
|
||||||
the mcstrans daemon is running.
|
</para></entry>
|
||||||
</entry>
|
</row>
|
||||||
</row>
|
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>sepgsql_mcstrans_out(text) returns text</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Translates the given raw MLS/MCS range into qualified format if
|
<function>sepgsql_setcon</function> ( <type>text</type> )
|
||||||
the mcstrans daemon is running.
|
<returnvalue>boolean</returnvalue>
|
||||||
</entry>
|
</para>
|
||||||
</row>
|
<para>
|
||||||
<row>
|
Switches the client domain of the current session to the new domain,
|
||||||
<entry><literal>sepgsql_restorecon(text) returns bool</literal></entry>
|
if allowed by the security policy.
|
||||||
<entry>
|
It also accepts <literal>NULL</literal> input as a request to transition
|
||||||
Sets up initial security labels for all objects within the
|
to the client's original domain.
|
||||||
current database. The argument may be NULL, or the name of a specfile
|
</para></entry>
|
||||||
to be used as alternative of the system default.
|
</row>
|
||||||
</entry>
|
|
||||||
</row>
|
<row>
|
||||||
</tbody>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
</tgroup>
|
<function>sepgsql_mcstrans_in</function> ( <type>text</type> )
|
||||||
|
<returnvalue>text</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Translates the given qualified MLS/MCS range into raw format if
|
||||||
|
the mcstrans daemon is running.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>sepgsql_mcstrans_out</function> ( <type>text</type> )
|
||||||
|
<returnvalue>text</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Translates the given raw MLS/MCS range into qualified format if
|
||||||
|
the mcstrans daemon is running.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>sepgsql_restorecon</function> ( <type>text</type> )
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Sets up initial security labels for all objects within the
|
||||||
|
current database. The argument may be <literal>NULL</literal>, or the
|
||||||
|
name of a specfile to be used as alternative of the system default.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
@ -24,83 +24,99 @@
|
|||||||
<title>Functions Provided</title>
|
<title>Functions Provided</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<xref linkend="tablefunc-functions"/> shows the functions provided
|
<xref linkend="tablefunc-functions"/> summarizes the functions provided
|
||||||
by the <filename>tablefunc</filename> module.
|
by the <filename>tablefunc</filename> module.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table id="tablefunc-functions">
|
<table id="tablefunc-functions">
|
||||||
<title><filename>tablefunc</filename> Functions</title>
|
<title><filename>tablefunc</filename> Functions</title>
|
||||||
<tgroup cols="3">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Function</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Returns</entry>
|
Function
|
||||||
<entry>Description</entry>
|
|
||||||
</row>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<row>
|
|
||||||
<entry><function>normal_rand(int numvals, float8 mean, float8 stddev)</function></entry>
|
|
||||||
<entry><type>setof float8</type></entry>
|
|
||||||
<entry>
|
|
||||||
Produces a set of normally distributed random values
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><function>crosstab(text sql)</function></entry>
|
|
||||||
<entry><type>setof record</type></entry>
|
|
||||||
<entry>
|
|
||||||
Produces a <quote>pivot table</quote> containing
|
|
||||||
row names plus <replaceable>N</replaceable> value columns, where
|
|
||||||
<replaceable>N</replaceable> is determined by the row type specified in the calling
|
|
||||||
query
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><function>crosstab<replaceable>N</replaceable>(text sql)</function></entry>
|
|
||||||
<entry><type>setof table_crosstab_<replaceable>N</replaceable></type></entry>
|
|
||||||
<entry>
|
|
||||||
Produces a <quote>pivot table</quote> containing
|
|
||||||
row names plus <replaceable>N</replaceable> value columns.
|
|
||||||
<function>crosstab2</function>, <function>crosstab3</function>, and
|
|
||||||
<function>crosstab4</function> are predefined, but you can create additional
|
|
||||||
<function>crosstab<replaceable>N</replaceable></function> functions as described below
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><function>crosstab(text source_sql, text category_sql)</function></entry>
|
|
||||||
<entry><type>setof record</type></entry>
|
|
||||||
<entry>
|
|
||||||
Produces a <quote>pivot table</quote>
|
|
||||||
with the value columns specified by a second query
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><function>crosstab(text sql, int N)</function></entry>
|
|
||||||
<entry><type>setof record</type></entry>
|
|
||||||
<entry>
|
|
||||||
<para>Obsolete version of <function>crosstab(text)</function>.
|
|
||||||
The parameter <replaceable>N</replaceable> is now ignored, since the number of
|
|
||||||
value columns is always determined by the calling query
|
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
<para>
|
||||||
</row>
|
Description
|
||||||
<row>
|
</para></entry>
|
||||||
<entry>
|
</row>
|
||||||
<function>
|
</thead>
|
||||||
connectby(text relname, text keyid_fld, text parent_keyid_fld
|
|
||||||
[, text orderby_fld ], text start_with, int max_depth
|
<tbody>
|
||||||
[, text branch_delim ])
|
<row>
|
||||||
</function>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<indexterm><primary>connectby</primary></indexterm>
|
<function>normal_rand</function> ( <parameter>numvals</parameter> <type>integer</type>, <parameter>mean</parameter> <type>float8</type>, <parameter>stddev</parameter> <type>float8</type> )
|
||||||
</entry>
|
<returnvalue>setof float8</returnvalue>
|
||||||
<entry><type>setof record</type></entry>
|
</para>
|
||||||
<entry>
|
<para>
|
||||||
Produces a representation of a hierarchical tree structure
|
Produces a set of normally distributed random values.
|
||||||
</entry>
|
</para></entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
|
||||||
</tgroup>
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>crosstab</function> ( <parameter>sql</parameter> <type>text</type> )
|
||||||
|
<returnvalue>setof record</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Produces a <quote>pivot table</quote> containing
|
||||||
|
row names plus <replaceable>N</replaceable> value columns, where
|
||||||
|
<replaceable>N</replaceable> is determined by the row type specified
|
||||||
|
in the calling query.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>crosstab<replaceable>N</replaceable></function> ( <parameter>sql</parameter> <type>text</type> )
|
||||||
|
<returnvalue>setof table_crosstab_<replaceable>N</replaceable></returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Produces a <quote>pivot table</quote> containing
|
||||||
|
row names plus <replaceable>N</replaceable> value columns.
|
||||||
|
<function>crosstab2</function>, <function>crosstab3</function>, and
|
||||||
|
<function>crosstab4</function> are predefined, but you can create additional
|
||||||
|
<function>crosstab<replaceable>N</replaceable></function> functions as described below.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>crosstab</function> ( <parameter>source_sql</parameter> <type>text</type>, <parameter>category_sql</parameter> <type>text</type> )
|
||||||
|
<returnvalue>setof record</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Produces a <quote>pivot table</quote>
|
||||||
|
with the value columns specified by a second query.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>crosstab</function> ( <parameter>sql</parameter> <type>text</type>, <parameter>N</parameter> <type>integer</type> )
|
||||||
|
<returnvalue>setof record</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Obsolete version of <function>crosstab(text)</function>.
|
||||||
|
The parameter <parameter>N</parameter> is now ignored, since the
|
||||||
|
number of value columns is always determined by the calling query.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>connectby</primary></indexterm>
|
||||||
|
<function>connectby</function> ( <parameter>relname</parameter> <type>text</type>, <parameter>keyid_fld</parameter> <type>text</type>, <parameter>parent_keyid_fld</parameter> <type>text</type>
|
||||||
|
<optional>, <parameter>orderby_fld</parameter> <type>text</type> </optional>, <parameter>start_with</parameter> <type>text</type>, <parameter>max_depth</parameter> <type>integer</type>
|
||||||
|
<optional>, <parameter>branch_delim</parameter> <type>text</type> </optional> )
|
||||||
|
<returnvalue>setof record</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Produces a representation of a hierarchical tree structure.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<sect3>
|
<sect3>
|
||||||
|
@ -37,46 +37,59 @@
|
|||||||
|
|
||||||
<table id="uuid-ossp-functions">
|
<table id="uuid-ossp-functions">
|
||||||
<title>Functions for UUID Generation</title>
|
<title>Functions for UUID Generation</title>
|
||||||
<tgroup cols="2">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Function</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Description</entry>
|
Function
|
||||||
</row>
|
</para>
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<row>
|
|
||||||
<entry><function>uuid_generate_v1()</function><indexterm><primary>uuid_generate_v1</primary></indexterm></entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
This function generates a version 1 UUID. This involves the MAC
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>uuid_generate_v1</primary></indexterm>
|
||||||
|
<function>uuid_generate_v1</function> ()
|
||||||
|
<returnvalue>uuid</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Generates a version 1 UUID. This involves the MAC
|
||||||
address of the computer and a time stamp. Note that UUIDs of this
|
address of the computer and a time stamp. Note that UUIDs of this
|
||||||
kind reveal the identity of the computer that created the identifier
|
kind reveal the identity of the computer that created the identifier
|
||||||
and the time at which it did so, which might make it unsuitable for
|
and the time at which it did so, which might make it unsuitable for
|
||||||
certain security-sensitive applications.
|
certain security-sensitive applications.
|
||||||
</para>
|
</para></entry>
|
||||||
</entry>
|
</row>
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><function>uuid_generate_v1mc()</function><indexterm><primary>uuid_generate_v1mc</primary></indexterm></entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
|
||||||
This function generates a version 1 UUID but uses a random multicast
|
|
||||||
MAC address instead of the real MAC address of the computer.
|
|
||||||
</para>
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><function>uuid_generate_v3(namespace uuid, name text)</function><indexterm><primary>uuid_generate_v3</primary></indexterm></entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
|
||||||
This function generates a version 3 UUID in the given namespace using
|
|
||||||
the specified input name. The namespace should be one of the special
|
|
||||||
constants produced by the <function>uuid_ns_*()</function> functions shown
|
|
||||||
in <xref linkend="uuid-ossp-constants"/>. (It could be any UUID in theory.) The name is an identifier
|
|
||||||
in the selected namespace.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>uuid_generate_v1mc</primary></indexterm>
|
||||||
|
<function>uuid_generate_v1mc</function> ()
|
||||||
|
<returnvalue>uuid</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Generates a version 1 UUID, but uses a random multicast
|
||||||
|
MAC address instead of the real MAC address of the computer.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<indexterm><primary>uuid_generate_v3</primary></indexterm>
|
||||||
|
<function>uuid_generate_v3</function> ( <parameter>namespace</parameter> <type>uuid</type>, <parameter>name</parameter> <type>text</type> )
|
||||||
|
<returnvalue>uuid</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Generates a version 3 UUID in the given namespace using
|
||||||
|
the specified input name. The namespace should be one of the special
|
||||||
|
constants produced by the <function>uuid_ns_*()</function> functions
|
||||||
|
shown in <xref linkend="uuid-ossp-constants"/>. (It could be any UUID
|
||||||
|
in theory.) The name is an identifier in the selected namespace.
|
||||||
|
</para>
|
||||||
<para>
|
<para>
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -88,82 +101,106 @@ SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org');
|
|||||||
derived from the generated UUID.
|
derived from the generated UUID.
|
||||||
The generation of UUIDs by this method has no random or
|
The generation of UUIDs by this method has no random or
|
||||||
environment-dependent element and is therefore reproducible.
|
environment-dependent element and is therefore reproducible.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>uuid_generate_v4</function> ()
|
||||||
|
<returnvalue>uuid</returnvalue>
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><literal>uuid_generate_v4()</literal></entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
This function generates a version 4 UUID, which is derived entirely
|
Generates a version 4 UUID, which is derived entirely
|
||||||
from random numbers.
|
from random numbers.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>uuid_generate_v5</function> ( <parameter>namespace</parameter> <type>uuid</type>, <parameter>name</parameter> <type>text</type> )
|
||||||
|
<returnvalue>uuid</returnvalue>
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><literal>uuid_generate_v5(namespace uuid, name text)</literal></entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
This function generates a version 5 UUID, which works like a version 3
|
Generates a version 5 UUID, which works like a version 3
|
||||||
UUID except that SHA-1 is used as a hashing method. Version 5 should
|
UUID except that SHA-1 is used as a hashing method. Version 5 should
|
||||||
be preferred over version 3 because SHA-1 is thought to be more secure
|
be preferred over version 3 because SHA-1 is thought to be more secure
|
||||||
than MD5.
|
than MD5.
|
||||||
</para>
|
</para></entry>
|
||||||
</entry>
|
</row>
|
||||||
</row>
|
</tbody>
|
||||||
</tbody>
|
</tgroup>
|
||||||
</tgroup>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="uuid-ossp-constants">
|
<table id="uuid-ossp-constants">
|
||||||
<title>Functions Returning UUID Constants</title>
|
<title>Functions Returning UUID Constants</title>
|
||||||
<tgroup cols="2">
|
<tgroup cols="1">
|
||||||
<tbody>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry><literal>uuid_nil()</literal></entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>
|
Function
|
||||||
<para>
|
|
||||||
A <quote>nil</quote> UUID constant, which does not occur as a real UUID.
|
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><literal>uuid_ns_dns()</literal></entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
Constant designating the DNS namespace for UUIDs.
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>uuid_nil</function> ()
|
||||||
|
<returnvalue>uuid</returnvalue>
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><literal>uuid_ns_url()</literal></entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
Constant designating the URL namespace for UUIDs.
|
Returns a <quote>nil</quote> UUID constant, which does not occur as a
|
||||||
|
real UUID.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>uuid_ns_dns</function> ()
|
||||||
|
<returnvalue>uuid</returnvalue>
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><literal>uuid_ns_oid()</literal></entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
Constant designating the ISO object identifier (OID) namespace for
|
Returns a constant designating the DNS namespace for UUIDs.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>uuid_ns_url</function> ()
|
||||||
|
<returnvalue>uuid</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns a constant designating the URL namespace for UUIDs.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>uuid_ns_oid</function> ()
|
||||||
|
<returnvalue>uuid</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Returns a constant designating the ISO object identifier (OID) namespace for
|
||||||
UUIDs. (This pertains to ASN.1 OIDs, which are unrelated to the OIDs
|
UUIDs. (This pertains to ASN.1 OIDs, which are unrelated to the OIDs
|
||||||
used in <productname>PostgreSQL</productname>.)
|
used in <productname>PostgreSQL</productname>.)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>uuid_ns_x500</function> ()
|
||||||
|
<returnvalue>uuid</returnvalue>
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry><literal>uuid_ns_x500()</literal></entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
Constant designating the X.500 distinguished name (DN) namespace for
|
Returns a constant designating the X.500 distinguished name (DN)
|
||||||
UUIDs.
|
namespace for UUIDs.
|
||||||
</para>
|
</para></entry>
|
||||||
</entry>
|
</row>
|
||||||
</row>
|
</tbody>
|
||||||
</tbody>
|
</tgroup>
|
||||||
</tgroup>
|
|
||||||
</table>
|
</table>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
|
@ -36,161 +36,135 @@
|
|||||||
<para>
|
<para>
|
||||||
<xref linkend="xml2-functions-table"/> shows the functions provided by this module.
|
<xref linkend="xml2-functions-table"/> shows the functions provided by this module.
|
||||||
These functions provide straightforward XML parsing and XPath queries.
|
These functions provide straightforward XML parsing and XPath queries.
|
||||||
All arguments are of type <type>text</type>, so for brevity that is not shown.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<table id="xml2-functions-table">
|
<table id="xml2-functions-table">
|
||||||
<title>Functions</title>
|
<title><filename>xml2</filename> Functions</title>
|
||||||
<tgroup cols="3">
|
<tgroup cols="1">
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Function</entry>
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
<entry>Returns</entry>
|
Function
|
||||||
<entry>Description</entry>
|
</para>
|
||||||
</row>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<row>
|
|
||||||
<entry>
|
|
||||||
<function>
|
|
||||||
xml_valid(document)
|
|
||||||
</function>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<type>bool</type>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
This parses the document text in its parameter and returns true if the
|
Description
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>xml_valid</function> ( <parameter>document</parameter> <type>text</type> )
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Parses the given document and returns true if the
|
||||||
document is well-formed XML. (Note: this is an alias for the standard
|
document is well-formed XML. (Note: this is an alias for the standard
|
||||||
PostgreSQL function <function>xml_is_well_formed()</function>. The
|
PostgreSQL function <function>xml_is_well_formed()</function>. The
|
||||||
name <function>xml_valid()</function> is technically incorrect since validity
|
name <function>xml_valid()</function> is technically incorrect since validity
|
||||||
and well-formedness have different meanings in XML.)
|
and well-formedness have different meanings in XML.)
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>xpath_string</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type> )
|
||||||
|
<returnvalue>text</returnvalue>
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>
|
|
||||||
<function>
|
|
||||||
xpath_string(document, query)
|
|
||||||
</function>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<type>text</type>
|
|
||||||
</entry>
|
|
||||||
<entry morerows="2">
|
|
||||||
<para>
|
<para>
|
||||||
These functions evaluate the XPath query on the supplied document, and
|
Evaluates the XPath query on the supplied document, and
|
||||||
cast the result to the specified type.
|
casts the result to <type>text</type>.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>xpath_number</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type> )
|
||||||
|
<returnvalue>real</returnvalue>
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>
|
|
||||||
<function>
|
|
||||||
xpath_number(document, query)
|
|
||||||
</function>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<type>float4</type>
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>
|
|
||||||
<function>
|
|
||||||
xpath_bool(document, query)
|
|
||||||
</function>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<type>bool</type>
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>
|
|
||||||
<function>
|
|
||||||
xpath_nodeset(document, query, toptag, itemtag)
|
|
||||||
</function>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<type>text</type>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
This evaluates query on document and wraps the result in XML tags. If
|
Evaluates the XPath query on the supplied document, and
|
||||||
the result is multivalued, the output will look like:
|
casts the result to <type>real</type>.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>xpath_bool</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type> )
|
||||||
|
<returnvalue>boolean</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Evaluates the XPath query on the supplied document, and
|
||||||
|
casts the result to <type>boolean</type>.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>xpath_nodeset</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type>, <parameter>toptag</parameter> <type>text</type>, <parameter>itemtag</parameter> <type>text</type> )
|
||||||
|
<returnvalue>text</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Evaluates the query on the document and wraps the result in XML
|
||||||
|
tags. If the result is multivalued, the output will look like:
|
||||||
<synopsis>
|
<synopsis>
|
||||||
<toptag>
|
<toptag>
|
||||||
<itemtag>Value 1 which could be an XML fragment</itemtag>
|
<itemtag>Value 1 which could be an XML fragment</itemtag>
|
||||||
<itemtag>Value 2....</itemtag>
|
<itemtag>Value 2....</itemtag>
|
||||||
</toptag>
|
</toptag>
|
||||||
</synopsis>
|
</synopsis>
|
||||||
If either <literal>toptag</literal> or <literal>itemtag</literal> is an empty string, the relevant tag is omitted.
|
If either <parameter>toptag</parameter>
|
||||||
|
or <parameter>itemtag</parameter> is an empty string, the relevant tag
|
||||||
|
is omitted.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>xpath_nodeset</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type>, <parameter>itemtag</parameter> <type>text</type> )
|
||||||
|
<returnvalue>text</returnvalue>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Like <function>xpath_nodeset(document, query, toptag, itemtag)</function> but result omits <parameter>toptag</parameter>.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>xpath_nodeset</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type> )
|
||||||
|
<returnvalue>text</returnvalue>
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>
|
|
||||||
<function>
|
|
||||||
xpath_nodeset(document, query)
|
|
||||||
</function>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<type>text</type>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
Like <function>xpath_nodeset(document, query, toptag, itemtag)</function> but result omits both tags.
|
Like <function>xpath_nodeset(document, query, toptag, itemtag)</function> but result omits both tags.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>xpath_list</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type>, <parameter>separator</parameter> <type>text</type> )
|
||||||
|
<returnvalue>text</returnvalue>
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>
|
|
||||||
<function>
|
|
||||||
xpath_nodeset(document, query, itemtag)
|
|
||||||
</function>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<type>text</type>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
Like <function>xpath_nodeset(document, query, toptag, itemtag)</function> but result omits <literal>toptag</literal>.
|
Evaluates the query on the document and returns multiple values
|
||||||
|
separated by the specified separator, for example <literal>Value
|
||||||
|
1,Value 2,Value 3</literal> if <parameter>separator</parameter>
|
||||||
|
is <literal>,</literal>.
|
||||||
|
</para></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry role="func_table_entry"><para role="func_signature">
|
||||||
|
<function>xpath_list</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type> )
|
||||||
|
<returnvalue>text</returnvalue>
|
||||||
</para>
|
</para>
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<entry>
|
|
||||||
<function>
|
|
||||||
xpath_list(document, query, separator)
|
|
||||||
</function>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<type>text</type>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<para>
|
<para>
|
||||||
This function returns multiple values separated by the specified
|
This is a wrapper for the above function that uses <literal>,</literal>
|
||||||
separator, for example <literal>Value 1,Value 2,Value 3</literal> if
|
as the separator.
|
||||||
separator is <literal>,</literal>.
|
</para></entry>
|
||||||
</para>
|
</row>
|
||||||
</entry>
|
</tbody>
|
||||||
</row>
|
</tgroup>
|
||||||
<row>
|
|
||||||
<entry>
|
|
||||||
<function>
|
|
||||||
xpath_list(document, query)
|
|
||||||
</function>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
<type>text</type>
|
|
||||||
</entry>
|
|
||||||
<entry>
|
|
||||||
This is a wrapper for the above function that uses <literal>,</literal>
|
|
||||||
as the separator.
|
|
||||||
</entry>
|
|
||||||
</row>
|
|
||||||
</tbody>
|
|
||||||
</tgroup>
|
|
||||||
</table>
|
</table>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
@ -217,6 +191,8 @@ xpath_table(text key, text document, text relation, text xpaths, text criteria)
|
|||||||
<table id="xml2-xpath-table-parameters">
|
<table id="xml2-xpath-table-parameters">
|
||||||
<title><function>xpath_table</function> Parameters</title>
|
<title><function>xpath_table</function> Parameters</title>
|
||||||
<tgroup cols="2">
|
<tgroup cols="2">
|
||||||
|
<colspec colname="col1" colwidth="1*"/>
|
||||||
|
<colspec colname="col2" colwidth="2*"/>
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Parameter</entry>
|
<entry>Parameter</entry>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user