diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-12-27 12:33:04 -0500 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-12-27 12:33:04 -0500 |
| commit | 3ea7329c9a79ade27b5d3742d1a41ce6d0d9aca8 (patch) | |
| tree | 08a71245e4f44e9084fd183775de22af38536195 /doc/src | |
| parent | 858e776c84f48841e7e16fba7b690b76e54f3675 (diff) | |
Simplify the implementations of the to_reg* functions.
Given the soft-input-error feature, we can reduce these functions
to be just thin wrappers around a soft-error call of the
corresponding datatype input function. This means less code and
more certainty that the to_reg* functions match the normal input
behavior.
Notably, it also means that they will accept numeric OID input,
which they didn't before. It's not clear to me if that omission
had more than laziness behind it, but it doesn't seem like
something we need to work hard to preserve.
Discussion: https://postgr.es/m/3910031.1672095600@sss.pgh.pa.us
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/func.sgml | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 836b9254fbc..3bf8d021c3c 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -24100,8 +24100,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); obtained by casting the string to type <type>regclass</type> (see <xref linkend="datatype-oid"/>); however, this function will return <literal>NULL</literal> rather than throwing an error if the name is - not found. Also unlike the cast, this does not accept - a numeric OID as input. + not found. </para></entry> </row> @@ -24118,8 +24117,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); obtained by casting the string to type <type>regcollation</type> (see <xref linkend="datatype-oid"/>); however, this function will return <literal>NULL</literal> rather than throwing an error if the name is - not found. Also unlike the cast, this does not accept - a numeric OID as input. + not found. </para></entry> </row> @@ -24136,8 +24134,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); obtained by casting the string to type <type>regnamespace</type> (see <xref linkend="datatype-oid"/>); however, this function will return <literal>NULL</literal> rather than throwing an error if the name is - not found. Also unlike the cast, this does not accept - a numeric OID as input. + not found. </para></entry> </row> @@ -24154,8 +24151,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); obtained by casting the string to type <type>regoper</type> (see <xref linkend="datatype-oid"/>); however, this function will return <literal>NULL</literal> rather than throwing an error if the name is - not found or is ambiguous. Also unlike the cast, this does not accept - a numeric OID as input. + not found or is ambiguous. </para></entry> </row> @@ -24172,8 +24168,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); obtained by casting the string to type <type>regoperator</type> (see <xref linkend="datatype-oid"/>); however, this function will return <literal>NULL</literal> rather than throwing an error if the name is - not found. Also unlike the cast, this does not accept - a numeric OID as input. + not found. </para></entry> </row> @@ -24190,8 +24185,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); obtained by casting the string to type <type>regproc</type> (see <xref linkend="datatype-oid"/>); however, this function will return <literal>NULL</literal> rather than throwing an error if the name is - not found or is ambiguous. Also unlike the cast, this does not accept - a numeric OID as input. + not found or is ambiguous. </para></entry> </row> @@ -24208,8 +24202,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); obtained by casting the string to type <type>regprocedure</type> (see <xref linkend="datatype-oid"/>); however, this function will return <literal>NULL</literal> rather than throwing an error if the name is - not found. Also unlike the cast, this does not accept - a numeric OID as input. + not found. </para></entry> </row> @@ -24226,8 +24219,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); obtained by casting the string to type <type>regrole</type> (see <xref linkend="datatype-oid"/>); however, this function will return <literal>NULL</literal> rather than throwing an error if the name is - not found. Also unlike the cast, this does not accept - a numeric OID as input. + not found. </para></entry> </row> @@ -24244,8 +24236,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); obtained by casting the string to type <type>regtype</type> (see <xref linkend="datatype-oid"/>); however, this function will return <literal>NULL</literal> rather than throwing an error if the name is - not found. Also unlike the cast, this does not accept - a numeric OID as input. + not found. </para></entry> </row> </tbody> |
