aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-01-05 12:35:18 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-01-05 12:35:18 -0500
commit41abf185024c2a7d36c09e30654efe3d939362b7 (patch)
tree848e137aaec380b3012c5c2150d0b77f8e3d6c68
parentcdd4ed5449bf317cc71b45a8deee0173822e7592 (diff)
downloadpostgresql-41abf185024c2a7d36c09e30654efe3d939362b7.tar.gz
postgresql-41abf185024c2a7d36c09e30654efe3d939362b7.zip
Add to_regnamespace() and to_regrole() to the documentation.
Commits cb9fa802b32b222b and 0c90f6769de6a60f added these functions, but did not bother with documentation.
-rw-r--r--doc/src/sgml/func.sgml29
1 files changed, 25 insertions, 4 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index a520a14cab3..deed1833431 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -15788,6 +15788,14 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<primary>to_regtype</primary>
</indexterm>
+ <indexterm>
+ <primary>to_regnamespace</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>to_regrole</primary>
+ </indexterm>
+
<para>
<xref linkend="functions-info-catalog-table"> lists functions that
extract information from the system catalogs.
@@ -15978,6 +15986,16 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<entry><type>regtype</type></entry>
<entry>get the OID of the named type</entry>
</row>
+ <row>
+ <entry><literal><function>to_regnamespace(<parameter>schema_name</parameter>)</function></literal></entry>
+ <entry><type>regnamespace</type></entry>
+ <entry>get the OID of the named schema</entry>
+ </row>
+ <row>
+ <entry><literal><function>to_regrole(<parameter>role_name</parameter>)</function></literal></entry>
+ <entry><type>regrole</type></entry>
+ <entry>get the OID of the named role</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -16121,10 +16139,13 @@ SELECT collation for ('foo' COLLATE "de_DE");
<para>
The <function>to_regclass</function>, <function>to_regproc</function>,
<function>to_regprocedure</function>, <function>to_regoper</function>,
- <function>to_regoperator</function>, and <function>to_regtype</function>
- functions translate relation, function, operator, and type names to objects
- of type <type>regclass</>, <type>regproc</>, <type>regprocedure</type>,
- <type>regoper</>, <type>regoperator</type>, and <type>regtype</>,
+ <function>to_regoperator</function>, <function>to_regtype</function>,
+ <function>to_regnamespace</function>, and <function>to_regrole</function>
+ functions translate relation, function, operator, type, schema, and role
+ names to objects of
+ type <type>regclass</>, <type>regproc</>, <type>regprocedure</type>,
+ <type>regoper</>, <type>regoperator</type>, <type>regtype</>,
+ <type>regnamespace</>, and <type>regrole</>
respectively. These functions differ from a cast from
text in that they don't accept a numeric OID, and that they return null
rather than throwing an error if the name is not found (or, for