@@ -15788,6 +15788,14 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
15788
15788
<primary>to_regtype</primary>
15789
15789
</indexterm>
15790
15790
15791
+ <indexterm>
15792
+ <primary>to_regnamespace</primary>
15793
+ </indexterm>
15794
+
15795
+ <indexterm>
15796
+ <primary>to_regrole</primary>
15797
+ </indexterm>
15798
+
15791
15799
<para>
15792
15800
<xref linkend="functions-info-catalog-table"> lists functions that
15793
15801
extract information from the system catalogs.
@@ -15978,6 +15986,16 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
15978
15986
<entry><type>regtype</type></entry>
15979
15987
<entry>get the OID of the named type</entry>
15980
15988
</row>
15989
+ <row>
15990
+ <entry><literal><function>to_regnamespace(<parameter>schema_name</parameter>)</function></literal></entry>
15991
+ <entry><type>regnamespace</type></entry>
15992
+ <entry>get the OID of the named schema</entry>
15993
+ </row>
15994
+ <row>
15995
+ <entry><literal><function>to_regrole(<parameter>role_name</parameter>)</function></literal></entry>
15996
+ <entry><type>regrole</type></entry>
15997
+ <entry>get the OID of the named role</entry>
15998
+ </row>
15981
15999
</tbody>
15982
16000
</tgroup>
15983
16001
</table>
@@ -16121,10 +16139,13 @@ SELECT collation for ('foo' COLLATE "de_DE");
16121
16139
<para>
16122
16140
The <function>to_regclass</function>, <function>to_regproc</function>,
16123
16141
<function>to_regprocedure</function>, <function>to_regoper</function>,
16124
- <function>to_regoperator</function>, and <function>to_regtype</function>
16125
- functions translate relation, function, operator, and type names to objects
16126
- of type <type>regclass</>, <type>regproc</>, <type>regprocedure</type>,
16127
- <type>regoper</>, <type>regoperator</type>, and <type>regtype</>,
16142
+ <function>to_regoperator</function>, <function>to_regtype</function>,
16143
+ <function>to_regnamespace</function>, and <function>to_regrole</function>
16144
+ functions translate relation, function, operator, type, schema, and role
16145
+ names to objects of
16146
+ type <type>regclass</>, <type>regproc</>, <type>regprocedure</type>,
16147
+ <type>regoper</>, <type>regoperator</type>, <type>regtype</>,
16148
+ <type>regnamespace</>, and <type>regrole</>
16128
16149
respectively. These functions differ from a cast from
16129
16150
text in that they don't accept a numeric OID, and that they return null
16130
16151
rather than throwing an error if the name is not found (or, for