Backpatch to 9.3.
Idea from Craig Ringer
<refpurpose>opens a persistent connection to a remote database</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_connect</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_connect(text connstr) returns text
<refpurpose>opens a persistent connection to a remote database, insecurely</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_connect_u</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_connect_u(text connstr) returns text
<refpurpose>closes a persistent connection to a remote database</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_disconnect</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_disconnect() returns text
<refpurpose>executes a query in a remote database</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink(text connname, text sql [, bool fail_on_error]) returns setof record
<refpurpose>executes a command in a remote database</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_exec</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_exec(text connname, text sql [, bool fail_on_error]) returns text
<refpurpose>opens a cursor in a remote database</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_open</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_open(text cursorname, text sql [, bool fail_on_error]) returns text
<refpurpose>returns rows from an open cursor in a remote database</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_fetch</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_fetch(text cursorname, int howmany [, bool fail_on_error]) returns setof record
<refpurpose>closes a cursor in a remote database</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_close</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_close(text cursorname [, bool fail_on_error]) returns text
<refpurpose>returns the names of all open named dblink connections</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_get_connections</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_get_connections() returns text[]
<refpurpose>gets last error message on the named connection</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_error_message</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_error_message(text connname) returns text
<refpurpose>sends an async query to a remote database</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_send_query</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_send_query(text connname, text sql) returns int
<refpurpose>checks if connection is busy with an async query</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_is_busy</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_is_busy(text connname) returns int
<refpurpose>retrieve async notifications on a connection</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_get_notify</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_get_notify() returns setof (notify_name text, be_pid int, extra text)
<refpurpose>gets an async query result</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_get_result</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_get_result(text connname [, bool fail_on_error]) returns setof record
<refpurpose>cancels any active query on the named connection</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_cancel_query</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_cancel_query(text connname) returns text
</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_get_pkey</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_get_pkey(text relname) returns setof dblink_pkey_results
</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_build_sql_insert</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_build_sql_insert(text relname,
</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_build_sql_delete</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_build_sql_delete(text relname,
</refpurpose>
</refnamediv>
+ <indexterm>
+ <primary>dblink_build_sql_update</primary>
+ </indexterm>
+
<refsynopsisdiv>
<synopsis>
dblink_build_sql_update(text relname,
</thead>
<tbody>
<row>
- <entry><function>earth()</function></entry>
+ <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></entry>
+ <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
</entry>
</row>
<row>
- <entry><function>gc_to_sec(float8)</function></entry>
+ <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
</entry>
</row>
<row>
- <entry><function>ll_to_earth(float8, float8)</function></entry>
+ <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></entry>
+ <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></entry>
+ <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></entry>
+ <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></entry>
+ <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>@></>
for working with Soundex codes:
</para>
+ <indexterm>
+ <primary>soundex</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>difference</primary>
+ </indexterm>
+
<synopsis>
soundex(text) returns text
difference(text, text) returns int
This function calculates the Levenshtein distance between two strings:
</para>
+ <indexterm>
+ <primary>levenshtein</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>levenshtein_less_equal</primary>
+ </indexterm>
+
<synopsis>
levenshtein(text source, text target, int ins_cost, int del_cost, int sub_cost) returns int
levenshtein(text source, text target) returns int
This function calculates the metaphone code of an input string:
</para>
+ <indexterm>
+ <primary>metaphone</primary>
+ </indexterm>
+
<synopsis>
metaphone(text source, int max_output_length) returns text
</synopsis>
These functions compute the primary and alternate codes:
</para>
+ <indexterm>
+ <primary>dmetaphone</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>dmetaphone_alt</primary>
+ </indexterm>
+
<synopsis>
dmetaphone(text source) returns text
dmetaphone_alt(text source) returns text
<tbody>
<row>
- <entry><function>hstore(record)</function></entry>
+ <entry><function>hstore(record)</function><indexterm><primary>hstore</primary></indexterm></entry>
<entry><type>hstore</type></entry>
<entry>construct an <type>hstore</> from a record or row</entry>
<entry><literal>hstore(ROW(1,2))</literal></entry>
</row>
<row>
- <entry><function>akeys(hstore)</function></entry>
+ <entry><function>akeys(hstore)</function><indexterm><primary>akeys</primary></indexterm></entry>
<entry><type>text[]</type></entry>
<entry>get <type>hstore</>'s keys as an array</entry>
<entry><literal>akeys('a=>1,b=>2')</literal></entry>
</row>
<row>
- <entry><function>skeys(hstore)</function></entry>
+ <entry><function>skeys(hstore)</function><indexterm><primary>skeys</primary></indexterm></entry>
<entry><type>setof text</type></entry>
<entry>get <type>hstore</>'s keys as a set</entry>
<entry><literal>skeys('a=>1,b=>2')</literal></entry>
</row>
<row>
- <entry><function>avals(hstore)</function></entry>
+ <entry><function>avals(hstore)</function><indexterm><primary>avals</primary></indexterm></entry>
<entry><type>text[]</type></entry>
<entry>get <type>hstore</>'s values as an array</entry>
<entry><literal>avals('a=>1,b=>2')</literal></entry>
</row>
<row>
- <entry><function>svals(hstore)</function></entry>
+ <entry><function>svals(hstore)</function><indexterm><primary>svals</primary></indexterm></entry>
<entry><type>setof text</type></entry>
<entry>get <type>hstore</>'s values as a set</entry>
<entry><literal>svals('a=>1,b=>2')</literal></entry>
</row>
<row>
- <entry><function>hstore_to_array(hstore)</function></entry>
+ <entry><function>hstore_to_array(hstore)</function><indexterm><primary>hstore_to_array</primary></indexterm></entry>
<entry><type>text[]</type></entry>
<entry>get <type>hstore</>'s keys and values as an array of alternating
keys and values</entry>
</row>
<row>
- <entry><function>hstore_to_matrix(hstore)</function></entry>
+ <entry><function>hstore_to_matrix(hstore)</function><indexterm><primary>hstore_to_matrix</primary></indexterm></entry>
<entry><type>text[]</type></entry>
<entry>get <type>hstore</>'s keys and values as a two-dimensional array</entry>
<entry><literal>hstore_to_matrix('a=>1,b=>2')</literal></entry>
</row>
<row>
- <entry><function>hstore_to_json(hstore)</function></entry>
+ <entry><function>hstore_to_json(hstore)</function><indexterm><primary>hstore_to_json</primary></indexterm></entry>
<entry><type>json</type></entry>
<entry>get <type>hstore</type> as a <type>json</type> value</entry>
<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>
</row>
<row>
- <entry><function>hstore_to_json_loose(hstore)</function></entry>
+ <entry><function>hstore_to_json_loose(hstore)</function><indexterm><primary>hstore_to_json_loose</primary></indexterm></entry>
<entry><type>json</type></entry>
<entry>get <type>hstore</type> as a <type>json</type> value, but attempting to distinguish numerical and Boolean values so they are unquoted in the JSON</entry>
<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>
</row>
<row>
- <entry><function>slice(hstore, text[])</function></entry>
+ <entry><function>slice(hstore, text[])</function><indexterm><primary>slice</primary></indexterm></entry>
<entry><type>hstore</type></entry>
<entry>extract a subset of an <type>hstore</></entry>
<entry><literal>slice('a=>1,b=>2,c=>3'::hstore, ARRAY['b','c','x'])</literal></entry>
</row>
<row>
- <entry><function>each(hstore)</function></entry>
+ <entry><function>each(hstore)</function><indexterm><primary>each</primary></indexterm></entry>
<entry><type>setof(key text, value text)</type></entry>
<entry>get <type>hstore</>'s keys and values as a set</entry>
<entry><literal>select * from each('a=>1,b=>2')</literal></entry>
</row>
<row>
- <entry><function>exist(hstore,text)</function></entry>
+ <entry><function>exist(hstore,text)</function><indexterm><primary>exist</primary></indexterm></entry>
<entry><type>boolean</type></entry>
<entry>does <type>hstore</> contain key?</entry>
<entry><literal>exist('a=>1','a')</literal></entry>
</row>
<row>
- <entry><function>defined(hstore,text)</function></entry>
+ <entry><function>defined(hstore,text)</function><indexterm><primary>defined</primary></indexterm></entry>
<entry><type>boolean</type></entry>
<entry>does <type>hstore</> contain non-<literal>NULL</> value for key?</entry>
<entry><literal>defined('a=>NULL','a')</literal></entry>
</row>
<row>
- <entry><function>delete(hstore,text)</function></entry>
+ <entry><function>delete(hstore,text)</function><indexterm><primary>delete</primary></indexterm></entry>
<entry><type>hstore</type></entry>
<entry>delete pair with matching key</entry>
<entry><literal>delete('a=>1,b=>2','b')</literal></entry>
</row>
<row>
- <entry><function>populate_record(record,hstore)</function></entry>
+ <entry><function>populate_record(record,hstore)</function><indexterm><primary>populate_record</primary></indexterm></entry>
<entry><type>record</type></entry>
<entry>replace fields in <type>record</> with matching values from <type>hstore</></entry>
<entry>see Examples section</entry>
<sect2>
<title>Functions</title>
+ <indexterm>
+ <primary>int_array_aggregate</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>array_agg</primary>
+ </indexterm>
+
<para>
The aggregator is an aggregate function
<function>int_array_aggregate(integer)</>
which does the same thing for any array type.
</para>
+ <indexterm>
+ <primary>int_array_enum</primary>
+ </indexterm>
+
<para>
The enumerator is a function
<function>int_array_enum(integer[])</>
<tbody>
<row>
- <entry><function>icount(int[])</function></entry>
+ <entry><function>icount(int[])</function><indexterm><primary>icount</primary></indexterm></entry>
<entry><type>int</type></entry>
<entry>number of elements in array</entry>
<entry><literal>icount('{1,2,3}'::int[])</literal></entry>
</row>
<row>
- <entry><function>sort(int[], text dir)</function></entry>
+ <entry><function>sort(int[], text dir)</function><indexterm><primary>sort</primary></indexterm></entry>
<entry><type>int[]</type></entry>
<entry>sort array — <parameter>dir</> must be <literal>asc</> or <literal>desc</></entry>
<entry><literal>sort('{1,2,3}'::int[], 'desc')</literal></entry>
</row>
<row>
- <entry><function>sort_asc(int[])</function></entry>
+ <entry><function>sort_asc(int[])</function><indexterm><primary>sort_asc</primary></indexterm></entry>
<entry><type>int[]</type></entry>
<entry>sort in ascending order</entry>
<entry><literal></literal></entry>
</row>
<row>
- <entry><function>sort_desc(int[])</function></entry>
+ <entry><function>sort_desc(int[])</function><indexterm><primary>sort_desc</primary></indexterm></entry>
<entry><type>int[]</type></entry>
<entry>sort in descending order</entry>
<entry><literal></literal></entry>
</row>
<row>
- <entry><function>uniq(int[])</function></entry>
+ <entry><function>uniq(int[])</function><indexterm><primary>uniq</primary></indexterm></entry>
<entry><type>int[]</type></entry>
<entry>remove adjacent duplicates</entry>
<entry><literal>uniq(sort('{1,2,3,2,1}'::int[]))</literal></entry>
</row>
<row>
- <entry><function>idx(int[], int item)</function></entry>
+ <entry><function>idx(int[], int item)</function><indexterm><primary>idx</primary></indexterm></entry>
<entry><type>int</type></entry>
<entry>index of first element matching <parameter>item</> (0 if none)</entry>
<entry><literal>idx(array[11,22,33,22,11], 22)</literal></entry>
</row>
<row>
- <entry><function>subarray(int[], int start, int len)</function></entry>
+ <entry><function>subarray(int[], int start, int len)</function><indexterm><primary>subarray</primary></indexterm></entry>
<entry><type>int[]</type></entry>
<entry>portion of array starting at position <parameter>start</>, <parameter>len</> elements</entry>
<entry><literal>subarray('{1,2,3,2,1}'::int[], 2, 3)</literal></entry>
</row>
<row>
- <entry><function>intset(int)</function></entry>
+ <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>
<tbody>
<row>
- <entry><function>isn_weak(boolean)</function></entry>
+ <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>
<entry>Gets the current status of the weak mode</entry>
</row>
<row>
- <entry><function>make_valid(isn)</function></entry>
+ <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></entry>
+ <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>
<row>
- <entry><function>subltree(ltree, int start, int end)</function></entry>
+ <entry><function>subltree(ltree, int start, int end)</function><indexterm><primary>subltree</primary></indexterm></entry>
<entry><type>ltree</type></entry>
<entry>subpath of <type>ltree</> from position <parameter>start</> to
position <parameter>end</>-1 (counting from 0)</entry>
</row>
<row>
- <entry><function>subpath(ltree, int offset, int len)</function></entry>
+ <entry><function>subpath(ltree, int offset, int len)</function><indexterm><primary>subpath</primary></indexterm></entry>
<entry><type>ltree</type></entry>
<entry>subpath of <type>ltree</> starting at position
<parameter>offset</>, length <parameter>len</>.
</row>
<row>
- <entry><function>nlevel(ltree)</function></entry>
+ <entry><function>nlevel(ltree)</function><indexterm><primary>nlevel</primary></indexterm></entry>
<entry><type>integer</type></entry>
<entry>number of labels in path</entry>
<entry><literal>nlevel('Top.Child1.Child2')</literal></entry>
</row>
<row>
- <entry><function>index(ltree a, ltree b)</function></entry>
+ <entry><function>index(ltree a, ltree b)</function><indexterm><primary>index</primary></indexterm></entry>
<entry><type>integer</type></entry>
<entry>position of first occurrence of <parameter>b</> in
<parameter>a</>; -1 if not found</entry>
</row>
<row>
- <entry><function>text2ltree(text)</function></entry>
+ <entry><function>text2ltree(text)</function><indexterm><primary>text2ltree</primary></indexterm></entry>
<entry><type>ltree</type></entry>
<entry>cast <type>text</> to <type>ltree</></entry>
<entry><literal></literal></entry>
</row>
<row>
- <entry><function>ltree2text(ltree)</function></entry>
+ <entry><function>ltree2text(ltree)</function><indexterm><primary>ltree2text</primary></indexterm></entry>
<entry><type>text</type></entry>
<entry>cast <type>ltree</> to <type>text</></entry>
<entry><literal></literal></entry>
</row>
<row>
- <entry><function>lca(ltree, ltree, ...)</function></entry>
+ <entry><function>lca(ltree, ltree, ...)</function><indexterm><primary>lca</primary></indexterm></entry>
<entry><type>ltree</type></entry>
<entry>lowest common ancestor, i.e., longest common prefix of paths
(up to 8 arguments supported)</entry>
<variablelist>
<varlistentry>
+ <indexterm>
+ <primary>get_raw_page</primary>
+ </indexterm>
<term>
<function>get_raw_page(relname text, fork text, blkno int) returns bytea</function>
</term>
</varlistentry>
<varlistentry>
+ <indexterm>
+ <primary>page_header</primary>
+ </indexterm>
<term>
<function>page_header(page bytea) returns record</function>
</term>
</varlistentry>
<varlistentry>
+ <indexterm>
+ <primary>heap_page_items</primary>
+ </indexterm>
<term>
<function>heap_page_items(page bytea) returns setof record</function>
</term>
</varlistentry>
<varlistentry>
+ <indexterm>
+ <primary>bt_metap</primary>
+ </indexterm>
<term>
<function>bt_metap(relname text) returns record</function>
</term>
</varlistentry>
<varlistentry>
+ <indexterm>
+ <primary>bt_page_stats</primary>
+ </indexterm>
<term>
<function>bt_page_stats(relname text, blkno int) returns record</function>
</term>
</varlistentry>
<varlistentry>
+ <indexterm>
+ <primary>bt_page_items</primary>
+ </indexterm>
<term>
<function>bt_page_items(relname text, blkno int) returns setof record</function>
</term>
</varlistentry>
<varlistentry>
+ <indexterm>
+ <primary>fsm_page_contents</primary>
+ </indexterm>
<term>
<function>fsm_page_contents(page bytea) returns text</function>
</term>
examining what's happening in the shared buffer cache in real time.
</para>
+ <indexterm>
+ <primary>pg_buffercache_pages</primary>
+ </indexterm>
+
<para>
The module provides a C function <function>pg_buffercache_pages</function>
that returns a set of records, plus a view
<sect3>
<title><function>digest()</function></title>
+ <indexterm>
+ <primary>digest</primary>
+ </indexterm>
+
<synopsis>
digest(data text, type text) returns bytea
digest(data bytea, type text) returns bytea
<sect3>
<title><function>hmac()</function></title>
+ <indexterm>
+ <primary>hmac</primary>
+ </indexterm>
+
<synopsis>
hmac(data text, key text, type text) returns bytea
hmac(data bytea, key text, type text) returns bytea
<sect3>
<title><function>crypt()</></title>
+ <indexterm>
+ <primary>crypt</primary>
+ </indexterm>
+
<synopsis>
crypt(password text, salt text) returns text
</synopsis>
<sect3>
<title><function>gen_salt()</></title>
+ <indexterm>
+ <primary>gen_salt</primary>
+ </indexterm>
+
<synopsis>
gen_salt(type text [, iter_count integer ]) returns text
</synopsis>
<sect3>
<title><function>pgp_sym_encrypt()</function></title>
+ <indexterm>
+ <primary>pgp_sym_encrypt</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>pgp_sym_encrypt_bytea</primary>
+ </indexterm>
+
<synopsis>
pgp_sym_encrypt(data text, psw text [, options text ]) returns bytea
pgp_sym_encrypt_bytea(data bytea, psw text [, options text ]) returns bytea
<sect3>
<title><function>pgp_sym_decrypt()</function></title>
+ <indexterm>
+ <primary>pgp_sym_decrypt</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>pgp_sym_decrypt_bytea</primary>
+ </indexterm>
+
<synopsis>
pgp_sym_decrypt(msg bytea, psw text [, options text ]) returns text
pgp_sym_decrypt_bytea(msg bytea, psw text [, options text ]) returns bytea
<sect3>
<title><function>pgp_pub_encrypt()</function></title>
+ <indexterm>
+ <primary>pgp_pub_encrypt</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>pgp_pub_encrypt_bytea</primary>
+ </indexterm>
+
<synopsis>
pgp_pub_encrypt(data text, key bytea [, options text ]) returns bytea
pgp_pub_encrypt_bytea(data bytea, key bytea [, options text ]) returns bytea
<sect3>
<title><function>pgp_pub_decrypt()</function></title>
+ <indexterm>
+ <primary>pgp_pub_decrypt</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>pgp_pub_decrypt_bytea</primary>
+ </indexterm>
+
<synopsis>
pgp_pub_decrypt(msg bytea, key bytea [, psw text [, options text ]]) returns text
pgp_pub_decrypt_bytea(msg bytea, key bytea [, psw text [, options text ]]) returns bytea
<sect3>
<title><function>pgp_key_id()</function></title>
+ <indexterm>
+ <primary>pgp_key_id</primary>
+ </indexterm>
+
<synopsis>
pgp_key_id(bytea) returns text
</synopsis>
<sect3>
<title><function>armor()</function>, <function>dearmor()</function></title>
+ <indexterm>
+ <primary>armor</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>dearmor</primary>
+ </indexterm>
+
<synopsis>
armor(data bytea) returns text
dearmor(data text) returns bytea
encryption functions is discouraged.
</para>
+ <indexterm>
+ <primary>encrypt</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>decrypt</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>encrypt_iv</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>decrypt_iv</primary>
+ </indexterm>
+
<synopsis>
encrypt(data bytea, key bytea, type text) returns bytea
decrypt(data bytea, key bytea, type text) returns bytea
<sect2>
<title>Random-Data Functions</title>
+ <indexterm>
+ <primary>gen_random_bytes</primary>
+ </indexterm>
+
<synopsis>
gen_random_bytes(count integer) returns bytea
</synopsis>
<variablelist>
<varlistentry>
+ <indexterm>
+ <primary>pg_freespace</primary>
+ </indexterm>
<term>
<function>pg_freespace(rel regclass IN, blkno bigint IN) returns int2</function>
</term>
<sect2>
<title>Overview</title>
+ <indexterm>
+ <primary>pgrowlocks</primary>
+ </indexterm>
+
<synopsis>
pgrowlocks(text) returns setof record
</synopsis>
<variablelist>
<varlistentry>
+ <indexterm>
+ <primary>pg_stat_statements_reset</primary>
+ </indexterm>
+
<term>
<function>pg_stat_statements_reset() returns void</function>
</term>
<variablelist>
<varlistentry>
+ <indexterm>
+ <primary>pgstattuple</primary>
+ </indexterm>
+
<term>
<function>pgstattuple(text) returns record</>
</term>
<varlistentry>
<term>
+ <indexterm>
+ <primary>pgstatindex</primary>
+ </indexterm>
<function>pgstatindex(text) returns record</>
</term>
<varlistentry>
<term>
+ <indexterm>
+ <primary>pgstatginindex</primary>
+ </indexterm>
<function>pgstatginindex(regclass) returns record</>
</term>
<varlistentry>
<term>
+ <indexterm>
+ <primary>pg_relpages</primary>
+ </indexterm>
<function>pg_relpages(text) returns bigint</>
</term>
<tbody>
<row>
- <entry><function>similarity(text, text)</function></entry>
+ <entry><function>similarity(text, text)</function><indexterm><primary>similarity</primary></indexterm></entry>
<entry><type>real</type></entry>
<entry>
Returns a number that indicates how similar the two arguments are.
</entry>
</row>
<row>
- <entry><function>show_trgm(text)</function></entry>
+ <entry><function>show_trgm(text)</function><indexterm><primary>show_trgm</primary></indexterm></entry>
<entry><type>text[]</type></entry>
<entry>
Returns an array of all the trigrams in the given string.
</entry>
</row>
<row>
- <entry><function>show_limit()</function></entry>
+ <entry><function>show_limit()</function><indexterm><primary>show_limit</primary></indexterm></entry>
<entry><type>real</type></entry>
<entry>
Returns the current similarity threshold used by the <literal>%</>
</entry>
</row>
<row>
- <entry><function>set_limit(real)</function></entry>
+ <entry><function>set_limit(real)</function><indexterm><primary>set_limit</primary></indexterm></entry>
<entry><type>real</type></entry>
<entry>
Sets the current similarity threshold that is used by the <literal>%</>
<variablelist>
<varlistentry>
- <term><function>
-ssl_is_used() returns boolean
- </function></term>
+ <indexterm>
+ <primary>ssl_is_used</primary>
+ </indexterm>
+ <term>
+ <function>ssl_is_used() returns boolean</function>
+ </term>
<listitem>
<para>
Returns TRUE if current connection to server uses SSL, and FALSE
</varlistentry>
<varlistentry>
- <term><function>
-ssl_version() returns text
- </function></term>
+ <indexterm>
+ <primary>ssl_version</primary>
+ </indexterm>
+ <term>
+ <function>ssl_version() returns text</function>
+ </term>
<listitem>
<para>
Returns the name of the protocol used for the SSL connection (e.g. SSLv2,
</varlistentry>
<varlistentry>
- <term><function>
-ssl_cipher() returns text
- </function></term>
+ <indexterm>
+ <primary>ssl_cipher</primary>
+ </indexterm>
+ <term>
+ <function>ssl_cipher() returns text</function>
+ </term>
<listitem>
<para>
Returns the name of the cipher used for the SSL connection
</varlistentry>
<varlistentry>
- <term><function>
-ssl_client_cert_present() returns boolean
- </function></term>
+ <indexterm>
+ <primary>ssl_client_cert_present</primary>
+ </indexterm>
+ <term>
+ <function>ssl_client_cert_present() returns boolean</function>
+ </term>
<listitem>
<para>
Returns TRUE if current client has presented a valid SSL client
</varlistentry>
<varlistentry>
- <term><function>
-ssl_client_serial() returns numeric
- </function></term>
+ <indexterm>
+ <primary>ssl_client_serial</primary>
+ </indexterm>
+ <term>
+ <function>ssl_client_serial() returns numeric</function>
+ </term>
<listitem>
<para>
Returns serial number of current client certificate. The combination of
</varlistentry>
<varlistentry>
- <term><function>
-ssl_client_dn() returns text
- </function></term>
+ <indexterm>
+ <primary>ssl_client_dn</primary>
+ </indexterm>
+ <term>
+ <function>ssl_client_dn() returns text</function>
+ </term>
<listitem>
<para>
Returns the full subject of the current client certificate, converting
</varlistentry>
<varlistentry>
- <term><function>
-ssl_issuer_dn() returns text
- </function></term>
+ <indexterm>
+ <primary>ssl_issuer_dn</primary>
+ </indexterm>
+ <term>
+ <function>ssl_issuer_dn() returns text</function>
+ </term>
<listitem>
<para>
Returns the full issuer name of the current client certificate, converting
</varlistentry>
<varlistentry>
- <term><function>
-ssl_client_dn_field(fieldname text) returns text
- </function></term>
+ <indexterm>
+ <primary>ssl_client_dn_field</primary>
+ </indexterm>
+ <term>
+ <function>ssl_client_dn_field(fieldname text) returns text</function>
+ </term>
<listitem>
<para>
This function returns the value of the specified field in the
</varlistentry>
<varlistentry>
- <term><function>
-ssl_issuer_field(fieldname text) returns text
- </function></term>
+ <indexterm>
+ <primary>ssl_issuer_field</primary>
+ </indexterm>
+ <term>
+ <function>ssl_issuer_field(fieldname text) returns text</function>
+ </term>
<listitem>
<para>
Same as <function>ssl_client_dn_field</>, but for the certificate issuer
[, text orderby_fld ], text start_with, int max_depth
[, text branch_delim ])
</function>
+ <indexterm><primary>connectby</primary></indexterm>
</entry>
<entry><type>setof record</></entry>
<entry>
<sect3>
<title><function>normal_rand</function></title>
+ <indexterm>
+ <primary>normal_rand</primary>
+ </indexterm>
+
<synopsis>
normal_rand(int numvals, float8 mean, float8 stddev) returns setof float8
</synopsis>
<sect3>
<title><function>crosstab(text)</function></title>
+ <indexterm>
+ <primary>crosstab</primary>
+ </indexterm>
+
<synopsis>
crosstab(text sql)
crosstab(text sql, int N)
<sect3>
<title><function>crosstab<replaceable>N</>(text)</function></title>
+ <indexterm>
+ <primary>crosstab</primary>
+ </indexterm>
+
<synopsis>
crosstab<replaceable>N</>(text sql)
</synopsis>
<sect3>
<title><function>crosstab(text, text)</function></title>
+ <indexterm>
+ <primary>crosstab</primary>
+ </indexterm>
+
<synopsis>
crosstab(text source_sql, text category_sql)
</synopsis>
<sect3>
<title><function>connectby</function></title>
+ <indexterm>
+ <primary>connectby</primary>
+ </indexterm>
+
<synopsis>
connectby(text relname, text keyid_fld, text parent_keyid_fld
[, text orderby_fld ], text start_with, int max_depth
</thead>
<tbody>
<row>
- <entry><literal>uuid_generate_v1()</literal></entry>
+ <entry><function>uuid_generate_v1()</function><indexterm><primary>uuid_generate_v1</primary></indexterm></entry>
<entry>
<para>
This function generates a version 1 UUID. This involves the MAC
</entry>
</row>
<row>
- <entry><literal>uuid_generate_v1mc()</literal></entry>
+ <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
</entry>
</row>
<row>
- <entry><literal>uuid_generate_v3(namespace uuid, name text)</literal></entry>
+ <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
<sect2>
<title><literal>xpath_table</literal></title>
+ <indexterm>
+ <primary>xpath_table</primary>
+ </indexterm>
+
<synopsis>
xpath_table(text key, text document, text relation, text xpaths, text criteria) returns setof record
</synopsis>
<sect3>
<title><literal>xslt_process</literal></title>
+ <indexterm>
+ <primary>xslt_process</primary>
+ </indexterm>
+
<synopsis>
xslt_process(text document, text stylesheet, text paramlist) returns text
</synopsis>