Commit b2fd8ebe authored by Tom Lane's avatar Tom Lane

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.
parent c265ed9b
......@@ -29,49 +29,69 @@
<table id="functions-adminpack-table">
<title><filename>adminpack</filename> Functions</title>
<tgroup cols="3">
<thead>
<row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><function>pg_catalog.pg_file_write(filename text, data text, append boolean)</function></entry>
<entry><type>bigint</type></entry>
<entry>
Write, or append to, a text file
</entry>
</row>
<row>
<entry><function>pg_catalog.pg_file_sync(filename text)</function></entry>
<entry><type>void</type></entry>
<entry>
Flush a file or directory to disk
</entry>
</row>
<row>
<entry><function>pg_catalog.pg_file_rename(oldname text, newname text <optional>, archivename text</optional>)</function></entry>
<entry><type>boolean</type></entry>
<entry>
Rename a file
</entry>
</row>
<row>
<entry><function>pg_catalog.pg_file_unlink(filename text)</function></entry>
<entry><type>boolean</type></entry>
<entry>
Remove a file
</entry>
</row>
<row>
<entry><function>pg_catalog.pg_logdir_ls()</function></entry>
<entry><type>setof record</type></entry>
<entry>
List the log files in the <varname>log_directory</varname> directory
</entry>
</row>
</tbody>
<tgroup cols="1">
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Function
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<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> )
<returnvalue>bigint</returnvalue>
</para>
<para>
Writes, or appends to, a text file.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>pg_catalog.pg_file_sync</function> ( <parameter>filename</parameter> <type>text</type> )
<returnvalue>void</returnvalue>
</para>
<para>
Flushes a file or directory to disk.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<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> )
<returnvalue>boolean</returnvalue>
</para>
<para>
Renames a file.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>pg_catalog.pg_file_unlink</function> ( <parameter>filename</parameter> <type>text</type> )
<returnvalue>boolean</returnvalue>
</para>
<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>
</table>
......
This diff is collapsed.
......@@ -67,76 +67,120 @@
<table id="earthdistance-cube-functions">
<title>Cube-Based Earthdistance Functions</title>
<tgroup cols="3">
<thead>
<row>
<entry>Function</entry>
<entry>Returns</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><function>earth()</function><indexterm><primary>earth</primary></indexterm></entry>
<entry><type>float8</type></entry>
<entry>Returns the assumed radius of the Earth.</entry>
</row>
<row>
<entry><function>sec_to_gc(float8)</function><indexterm><primary>sec_to_gc</primary></indexterm></entry>
<entry><type>float8</type></entry>
<entry>Converts the normal straight line
(secant) distance between two points on the surface of the Earth
to the great circle distance between them.
</entry>
</row>
<row>
<entry><function>gc_to_sec(float8)</function><indexterm><primary>gc_to_sec</primary></indexterm></entry>
<entry><type>float8</type></entry>
<entry>Converts the great circle distance between two points on the
surface of the Earth to the normal straight line (secant) distance
between them.
</entry>
</row>
<row>
<entry><function>ll_to_earth(float8, float8)</function><indexterm><primary>ll_to_earth</primary></indexterm></entry>
<entry><type>earth</type></entry>
<entry>Returns the location of a point on the surface of the Earth given
its latitude (argument 1) and longitude (argument 2) in degrees.
</entry>
</row>
<row>
<entry><function>latitude(earth)</function><indexterm><primary>latitude</primary></indexterm></entry>
<entry><type>float8</type></entry>
<entry>Returns the latitude in degrees of a point on the surface of the
Earth.
</entry>
</row>
<row>
<entry><function>longitude(earth)</function><indexterm><primary>longitude</primary></indexterm></entry>
<entry><type>float8</type></entry>
<entry>Returns the longitude in degrees of a point on the surface of the
Earth.
</entry>
</row>
<row>
<entry><function>earth_distance(earth, earth)</function><indexterm><primary>earth_distance</primary></indexterm></entry>
<entry><type>float8</type></entry>
<entry>Returns the great circle distance between two points on the
surface of the Earth.
</entry>
</row>
<row>
<entry><function>earth_box(earth, float8)</function><indexterm><primary>earth_box</primary></indexterm></entry>
<entry><type>cube</type></entry>
<entry>Returns a box suitable for an indexed search using the cube
<literal>@&gt;</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.
</entry>
</row>
</tbody>
<tgroup cols="1">
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Function
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm><primary>earth</primary></indexterm>
<function>earth</function> ()
<returnvalue>float8</returnvalue>
</para>
<para>
Returns the assumed radius of the Earth.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm><primary>sec_to_gc</primary></indexterm>
<function>sec_to_gc</function> ( <type>float8</type> )
<returnvalue>float8</returnvalue>
</para>
<para>
Converts the normal straight line
(secant) distance between two points on the surface of the Earth
to the great circle distance between them.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm><primary>gc_to_sec</primary></indexterm>
<function>gc_to_sec</function> ( <type>float8</type> )
<returnvalue>float8</returnvalue>
</para>
<para>
Converts the great circle distance between two points on the
surface of the Earth to the normal straight line (secant) distance
between them.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm><primary>ll_to_earth</primary></indexterm>
<function>ll_to_earth</function> ( <type>float8</type>, <type>float8</type> )
<returnvalue>earth</returnvalue>
</para>
<para>
Returns the location of a point on the surface of the Earth given
its latitude (argument 1) and longitude (argument 2) in degrees.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm><primary>latitude</primary></indexterm>
<function>latitude</function> ( <type>earth</type> )
<returnvalue>float8</returnvalue>
</para>
<para>
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>@&gt;</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>
</table>
......@@ -161,23 +205,29 @@
<table id="earthdistance-point-operators">
<title>Point-Based Earthdistance Operators</title>
<tgroup cols="3">
<thead>
<row>
<entry>Operator</entry>
<entry>Returns</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><type>point</type> <literal>&lt;@&gt;</literal> <type>point</type></entry>
<entry><type>float8</type></entry>
<entry>Gives the distance in statute miles between
two points on the Earth's surface.
</entry>
</row>
</tbody>
<tgroup cols="1">
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Operator
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>point</type> <literal>&lt;@&gt;</literal> <type>point</type>
<returnvalue>float8</returnvalue>
</para>
<para>
Computes the distance in statute miles between
two points on the Earth's surface.
</para></entry>
</row>
</tbody>
</tgroup>
</table>
......
This diff is collapsed.
This diff is collapsed.
......@@ -38,6 +38,8 @@
<table id="isn-datatypes">
<title><filename>isn</filename> Data Types</title>
<tgroup cols="2">
<colspec colname="col1" colwidth="1*"/>
<colspec colname="col2" colwidth="2*"/>
<thead>
<row>
<entry>Data Type</entry>
......@@ -235,38 +237,63 @@
<table id="isn-functions">
<title><filename>isn</filename> Functions</title>
<tgroup cols="3">
<thead>
<row>
<entry>Function</entry>
<entry>Returns</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><function>isn_weak(boolean)</function><indexterm><primary>isn_weak</primary></indexterm></entry>
<entry><type>boolean</type></entry>
<entry>Sets the weak input mode (returns new setting)</entry>
</row>
<row>
<entry><function>isn_weak()</function></entry>
<entry><type>boolean</type></entry>
<entry>Gets the current status of the weak mode</entry>
</row>
<row>
<entry><function>make_valid(isn)</function><indexterm><primary>make_valid</primary></indexterm></entry>
<entry><type>isn</type></entry>
<entry>Validates an invalid number (clears the invalid flag)</entry>
</row>
<row>
<entry><function>is_valid(isn)</function><indexterm><primary>is_valid</primary></indexterm></entry>
<entry><type>boolean</type></entry>
<entry>Checks for the presence of the invalid flag</entry>
</row>
</tbody>
</tgroup>
<tgroup cols="1">
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Function
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm><primary>isn_weak</primary></indexterm>
<function>isn_weak</function> ( <type>boolean</type> )
<returnvalue>boolean</returnvalue>
</para>
<para>
Sets the weak input mode, and returns new setting.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>isn_weak</function> ()
<returnvalue>boolean</returnvalue>
</para>
<para>
Returns the current status of the weak mode.
</para></entry>
</row>
<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>
<para>
......
......@@ -542,69 +542,82 @@ int lo_unlink(PGconn *conn, Oid lobjId);
listed in <xref linkend="lo-funcs-table"/>.
</para>
<table id="lo-funcs-table">
<title>SQL-Oriented Large Object Functions</title>
<tgroup cols="5">
<thead>
<row>
<entry>Function</entry>
<entry>Return Type</entry>
<entry>Description</entry>
<entry>Example</entry>
<entry>Result</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<indexterm>
<primary>lo_from_bytea</primary>
</indexterm>
<literal><function>lo_from_bytea(<parameter>loid</parameter> <type>oid</type>, <parameter>string</parameter> <type>bytea</type>)</function></literal>
</entry>
<entry><type>oid</type></entry>
<entry>
Create a large object and store data there, returning its OID.
Pass <literal>0</literal> to have the system choose an OID.
</entry>
<entry><literal>lo_from_bytea(0, '\xffffff00')</literal></entry>
<entry><literal>24528</literal></entry>
</row>
<row>
<entry>
<indexterm>
<primary>lo_put</primary>
</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>
</entry>
<entry><type>void</type></entry>
<entry>
Write data at the given offset.
</entry>
<entry><literal>lo_put(24528, 1, '\xaa')</literal></entry>
<entry></entry>
</row>
<row>
<entry>
<indexterm>
<primary>lo_get</primary>
</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>
</entry>
<entry><type>bytea</type></entry>
<entry>
Extract contents or a substring thereof.
</entry>
<entry><literal>lo_get(24528, 0, 3)</literal></entry>
<entry><literal>\xffaaff</literal></entry>
</row>
</tbody>
</tgroup>
</table>
<table id="lo-funcs-table">
<title>SQL-Oriented Large Object 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>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>lo_from_bytea</primary>
</indexterm>
<function>lo_from_bytea</function> ( <parameter>loid</parameter> <type>oid</type>, <parameter>data</parameter> <type>bytea</type> )
<returnvalue>oid</returnvalue>
</para>
<para>
Creates a large object and stores <parameter>data</parameter> in it.
If <parameter>loid</parameter> is zero then the system will choose a
free OID, otherwise that OID is used (with an error if some large
object already has that OID). On success, the large object's OID is
returned.
</para>
<para>
<literal>lo_from_bytea(0, '\xffffff00')</literal>
<returnvalue>24528</returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>lo_put</primary>
</indexterm>
<function>lo_put</function> ( <parameter>loid</parameter> <type>oid</type>, <parameter>offset</parameter> <type>bigint</type>, <parameter>data</parameter> <type>bytea</type> )
<returnvalue>void</returnvalue>
</para>
<para>
Writes <parameter>data</parameter> starting at the given offset within
the large object; the large object is enlarged if necessary.
</para>
<para>
<literal>lo_put(24528, 1, '\xaa')</literal>
<returnvalue></returnvalue>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>lo_get</primary>
</indexterm>
<function>lo_get</function> ( <parameter>loid</parameter> <type>oid</type> <optional>, <parameter>offset</parameter> <type>bigint</type>, <parameter>length</parameter> <type>integer</type> </optional> )
<returnvalue>bytea</returnvalue>
</para>
<para>
Extracts the large object's contents, or a substring thereof.
</para>
<para>
<literal>lo_get(24528, 0, 3)</literal>
<returnvalue>\xffaaff</returnvalue>
</para></entry>
</row>
</tbody>
</tgroup>
</table>
<para>
There are additional server-side functions corresponding to each of the
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -141,6 +141,8 @@ test=&gt; select '6.25 .. 6.50'::seg as "pH";
<table id="seg-input-examples">
<title>Examples of Valid <type>seg</type> Input</title>
<tgroup cols="2">
<colspec colname="col1" colwidth="1*"/>
<colspec colname="col2" colwidth="2*"/>
<tbody>
<row>
<entry><literal>5.0</literal></entry>
......@@ -248,65 +250,106 @@ test=&gt; select '6.25 .. 6.50'::seg as "pH";
<table id="seg-gist-operators">
<title>Seg GiST Operators</title>
<tgroup cols="2">
<thead>
<row>
<entry>Operator</entry>
<entry>Description</entry>
</row>
</thead>
<tgroup cols="1">
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Operator
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>[a, b] &lt;&lt; [c, d]</literal></entry>
<entry>[a, b] is entirely to the left of [c, d]. That is, [a,
b] &lt;&lt; [c, d] is true if b &lt; c and false otherwise.</entry>
</row>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>seg</type> <literal>&lt;&lt;</literal> <type>seg</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Is the first <type>seg</type> entirely to the left of the second?
[a, b] &lt;&lt; [c, d] is true if b &lt; c.
</para></entry>
</row>
<row>
<entry><literal>[a, b] &gt;&gt; [c, d]</literal></entry>
<entry>[a, b] is entirely to the right of [c, d]. That is, [a,
b] &gt;&gt; [c, d] is true if a &gt; d and false otherwise.</entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>seg</type> <literal>&gt;&gt;</literal> <type>seg</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Is the first <type>seg</type> entirely to the right of the second?
[a, b] &gt;&gt; [c, d] is true if a &gt; d.
</para></entry>
</row>
<row>
<entry><literal>[a, b] &amp;&lt; [c, d]</literal></entry>
<entry>Overlaps or is left of &mdash; This might be better read
as <quote>does not extend to right of</quote>. It is true when
b &lt;= d.</entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>seg</type> <literal>&amp;&lt;</literal> <type>seg</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Does the first <type>seg</type> not extend to the right of the
second?
[a, b] &amp;&lt; [c, d] is true if b &lt;= d.
</para></entry>
</row>
<row>
<entry><literal>[a, b] &amp;&gt; [c, d]</literal></entry>
<entry>Overlaps or is right of &mdash; This might be better read
as <quote>does not extend to left of</quote>. It is true when
a &gt;= c.</entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>seg</type> <literal>&amp;&gt;</literal> <type>seg</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Does the first <type>seg</type> not extend to the left of the
second?
[a, b] &amp;&gt; [c, d] is true if a &gt;= c.
</para></entry>
</row>
<row>
<entry><literal>[a, b] = [c, d]</literal></entry>
<entry>Same as &mdash; The segments [a, b] and [c, d] are
identical, that is, a = c and b = d.</entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>seg</type> <literal>=</literal> <type>seg</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Are the two <type>seg</type>s equal?
</para></entry>
</row>
<row>
<entry><literal>[a, b] &amp;&amp; [c, d]</literal></entry>
<entry>The segments [a, b] and [c, d] overlap.</entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>seg</type> <literal>&amp;&amp;</literal> <type>seg</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Do the two <type>seg</type>s overlap?
</para></entry>
</row>
<row>
<entry><literal>[a, b] @&gt; [c, d]</literal></entry>
<entry>The segment [a, b] contains the segment [c, d], that is,
a &lt;= c and b &gt;= d.</entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>seg</type> <literal>@&gt;</literal> <type>seg</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Does the first <type>seg</type> contain the second?
</para></entry>
</row>
<row>
<entry><literal>[a, b] &lt;@ [c, d]</literal></entry>
<entry>The segment [a, b] is contained in [c, d], that is, a
&gt;= c and b &lt;= d.</entry>
</row>
</tbody>
</tgroup>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>seg</type> <literal>&lt;@</literal> <type>seg</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Is the first <type>seg</type> contained in the second?
</para></entry>
</row>
</tbody>
</tgroup>
</table>
<para>
......@@ -318,33 +361,10 @@ test=&gt; select '6.25 .. 6.50'::seg as "pH";
</para>
<para>
The standard B-tree operators are also provided, for example
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Operator</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>[a, b] &lt; [c, d]</literal></entry>
<entry>Less than</entry>
</row>
<row>
<entry><literal>[a, b] &gt; [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),
In addition to the above operators, the usual comparison
operators shown in <xref linkend="functions-comparison-op-table"/> are
available for type <type>seg</type>. These operators
first compare (a) to (c),
and if these are equal, compare (b) to (d). That results in
reasonably good sorting in most cases, which is useful if
you want to use ORDER BY with this type.
......
......@@ -605,7 +605,7 @@ regression=# select sepgsql_getcon();
(1 row)
regression=# SELECT sepgsql_setcon('unconfined_u:unconfined_r:unconfined_t:s0-s0:c1.c4');
sepgsql_setcon
sepgsql_setcon
----------------
t
(1 row)
......@@ -659,45 +659,77 @@ ERROR: SELinux: security policy violation
<table id="sepgsql-functions-table">
<title>Sepgsql Functions</title>
<tgroup cols="2">
<tbody>
<row>
<entry><literal>sepgsql_getcon() returns text</literal></entry>
<entry>
Returns the client domain, the current security label of the client.
</entry>
</row>
<row>
<entry><literal>sepgsql_setcon(text) returns bool</literal></entry>
<entry>
Switches the client domain of the current session to the new domain,
if allowed by the security policy.
It also accepts <literal>NULL</literal> input as a request to transition
to the client's original domain.
</entry>
</row>
<row>
<entry><literal>sepgsql_mcstrans_in(text) returns text</literal></entry>
<entry>Translates the given qualified MLS/MCS range into raw format if
the mcstrans daemon is running.
</entry>
</row>
<row>
<entry><literal>sepgsql_mcstrans_out(text) returns text</literal></entry>
<entry>Translates the given raw MLS/MCS range into qualified format if
the mcstrans daemon is running.
</entry>
</row>
<row>
<entry><literal>sepgsql_restorecon(text) returns bool</literal></entry>
<entry>
Sets up initial security labels for all objects within the
current database. The argument may be NULL, or the name of a specfile
to be used as alternative of the system default.
</entry>
</row>
</tbody>
</tgroup>
<tgroup cols="1">
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Function
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>sepgsql_getcon</function> ()
<returnvalue>text</returnvalue>
</para>
<para>
Returns the client domain, the current security label of the client.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>sepgsql_setcon</function> ( <type>text</type> )
<returnvalue>boolean</returnvalue>
</para>
<para>
Switches the client domain of the current session to the new domain,
if allowed by the security policy.
It also accepts <literal>NULL</literal> input as a request to transition
to the client's original domain.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<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>
</sect2>
......
......@@ -24,83 +24,99 @@
<title>Functions Provided</title>
<para>
<xref linkend="tablefunc-functions"/> shows the functions provided
<xref linkend="tablefunc-functions"/> summarizes the functions provided
by the <filename>tablefunc</filename> module.
</para>
<table id="tablefunc-functions">
<title><filename>tablefunc</filename> Functions</title>
<tgroup cols="3">
<thead>
<row>
<entry>Function</entry>
<entry>Returns</entry>
<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
<tgroup cols="1">
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Function
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>normal_rand</function> ( <parameter>numvals</parameter> <type>integer</type>, <parameter>mean</parameter> <type>float8</type>, <parameter>stddev</parameter> <type>float8</type> )
<returnvalue>setof float8</returnvalue>
</para>
</entry>
</row>
<row>
<entry>
<function>
connectby(text relname, text keyid_fld, text parent_keyid_fld
[, text orderby_fld ], text start_with, int max_depth
[, text branch_delim ])
</function>
<indexterm><primary>connectby</primary></indexterm>
</entry>
<entry><type>setof record</type></entry>
<entry>
Produces a representation of a hierarchical tree structure
</entry>
</row>
</tbody>
</tgroup>
<para>
Produces a set of normally distributed random values.
</para></entry>
</row>
<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>
<sect3>
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment