@@ -15819,6 +15819,14 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
15819
15819
<primary>to_regtype</primary>
15820
15820
</indexterm>
15821
15821
15822
+ <indexterm>
15823
+ <primary>to_regnamespace</primary>
15824
+ </indexterm>
15825
+
15826
+ <indexterm>
15827
+ <primary>to_regrole</primary>
15828
+ </indexterm>
15829
+
15822
15830
<para>
15823
15831
<xref linkend="functions-info-catalog-table"> lists functions that
15824
15832
extract information from the system catalogs.
@@ -16009,6 +16017,16 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
16009
16017
<entry><type>regtype</type></entry>
16010
16018
<entry>get the OID of the named type</entry>
16011
16019
</row>
16020
+ <row>
16021
+ <entry><literal><function>to_regnamespace(<parameter>schema_name</parameter>)</function></literal></entry>
16022
+ <entry><type>regnamespace</type></entry>
16023
+ <entry>get the OID of the named schema</entry>
16024
+ </row>
16025
+ <row>
16026
+ <entry><literal><function>to_regrole(<parameter>role_name</parameter>)</function></literal></entry>
16027
+ <entry><type>regrole</type></entry>
16028
+ <entry>get the OID of the named role</entry>
16029
+ </row>
16012
16030
</tbody>
16013
16031
</tgroup>
16014
16032
</table>
@@ -16152,10 +16170,13 @@ SELECT collation for ('foo' COLLATE "de_DE");
16152
16170
<para>
16153
16171
The <function>to_regclass</function>, <function>to_regproc</function>,
16154
16172
<function>to_regprocedure</function>, <function>to_regoper</function>,
16155
- <function>to_regoperator</function>, and <function>to_regtype</function>
16156
- functions translate relation, function, operator, and type names to objects
16157
- of type <type>regclass</>, <type>regproc</>, <type>regprocedure</type>,
16158
- <type>regoper</>, <type>regoperator</type>, and <type>regtype</>,
16173
+ <function>to_regoperator</function>, <function>to_regtype</function>,
16174
+ <function>to_regnamespace</function>, and <function>to_regrole</function>
16175
+ functions translate relation, function, operator, type, schema, and role
16176
+ names to objects of
16177
+ type <type>regclass</>, <type>regproc</>, <type>regprocedure</type>,
16178
+ <type>regoper</>, <type>regoperator</type>, <type>regtype</>,
16179
+ <type>regnamespace</>, and <type>regrole</>
16159
16180
respectively. These functions differ from a cast from
16160
16181
text in that they don't accept a numeric OID, and that they return null
16161
16182
rather than throwing an error if the name is not found (or, for
0 commit comments