@@ -15819,6 +15819,14 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1581915819 <primary>to_regtype</primary>
1582015820 </indexterm>
1582115821
15822+ <indexterm>
15823+ <primary>to_regnamespace</primary>
15824+ </indexterm>
15825+
15826+ <indexterm>
15827+ <primary>to_regrole</primary>
15828+ </indexterm>
15829+
1582215830 <para>
1582315831 <xref linkend="functions-info-catalog-table"> lists functions that
1582415832 extract information from the system catalogs.
@@ -16009,6 +16017,16 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1600916017 <entry><type>regtype</type></entry>
1601016018 <entry>get the OID of the named type</entry>
1601116019 </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>
1601216030 </tbody>
1601316031 </tgroup>
1601416032 </table>
@@ -16152,10 +16170,13 @@ SELECT collation for ('foo' COLLATE "de_DE");
1615216170 <para>
1615316171 The <function>to_regclass</function>, <function>to_regproc</function>,
1615416172 <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</>
1615916180 respectively. These functions differ from a cast from
1616016181 text in that they don't accept a numeric OID, and that they return null
1616116182 rather than throwing an error if the name is not found (or, for
0 commit comments