diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 75e614a4256..6fa708a9439 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1,5 +1,5 @@
@@ -4191,18 +4191,18 @@ SELECT NULLIF(value, '(none)') ...
- current_user>
- name>
+ current_user>
+ name>
user name of current execution context>
- session_user>
- name>
+ session_user>
+ name>
session user name>
- user>
- name>
+ user>
+ name>
equivalent to current_user>>
@@ -4216,7 +4216,7 @@ SELECT NULLIF(value, '(none)') ...
The session_user> is the user that initiated a database
- connection and is fixed for the duration of that connection. The
+ connection; it is fixed for the duration of that connection. The
current_user> is the user identifier that is applicable
for permission checking. Currently it is always equal to the session
user, but in the future there might be setuid> functions and
@@ -4226,7 +4226,7 @@ SELECT NULLIF(value, '(none)') ...
- Note that these functions have special syntactic status in SQL>;
+ Note that these functions have special syntactic status in SQL>:
they must be called without trailing parentheses.
@@ -4238,6 +4238,32 @@ SELECT NULLIF(value, '(none)') ...
+
+ System Information Functions>
+
+
+ Name> Return Type> Description>
+
+
+
+
+ version>
+ text>
+ PostgreSQL version information>
+
+
+
+
+
+
+ version
+
+
+
+ version()> returns a string describing the PostgreSQL
+ server's version.
+
+
Access Privilege Inquiry Functions>
@@ -4272,7 +4298,9 @@ SELECT NULLIF(value, '(none)') ...
has_table_privilege> determines whether a user
can access a table in a particular way. The user can be
- specified by name or by ID (pg_user>.usesysid>) or if the argument is omitted
+ specified by name or by ID
+ (pg_user>.usesysid>), or if the argument is
+ omitted
current_user> is assumed. The table can be specified
by name or by OID. (Thus, there are actually six variants of
has_table_privilege>, which can be distinguished by
@@ -4284,7 +4312,7 @@ SELECT NULLIF(value, '(none)') ...
- System Information Functions>
+ Catalog Information Functions>
Name> Return Type> Description>
@@ -4292,21 +4320,53 @@ SELECT NULLIF(value, '(none)') ...
- version>
- text>
- PostgreSQL version information>
+ pg_get_viewdef>(viewname)
+ text>
+ Get CREATE VIEW command for view>
+
+
+ pg_get_ruledef>(rulename)
+ text>
+ Get CREATE RULE command for rule>
+
+
+ pg_get_indexdef>(indexOID)
+ text>
+ Get CREATE INDEX command for index>
+
+
+ pg_get_userbyid>(userid)
+ name>
+ Get user name given sysid>
- version
+ pg_get_viewdef
+
+
+
+ pg_get_ruledef
+
+
+
+ pg_get_indexdef
+
+
+
+ pg_get_userbyid
- version()> returns a string describing the PostgreSQL
- server's version.
+ These functions extract information from the system catalogs.
+ pg_get_viewdef()>, pg_get_ruledef()>, and
+ pg_get_indexdef()> respectively reconstruct the creating
+ command for a view, rule, or index. (Note that this is a decompiled
+ reconstruction, not the verbatim text of the command.)
+ pg_get_userbyid()> extracts a user's name given a
+ usesysid> value.