Re: to_regtype() Raises Error

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: to_regtype() Raises Error
Дата
Msg-id 11B52667-0E1B-492D-86F1-DF2382288E76@justatheory.com
обсуждение исходный текст
Ответ на Re: to_regtype() Raises Error  ("David E. Wheeler" <david@justatheory.com>)
Ответы Re: to_regtype() Raises Error  (Erik Wienhold <ewie@ewie.name>)
Список pgsql-hackers
On Feb 2, 2024, at 15:33, David E. Wheeler <david@justatheory.com> wrote:

> Anyway, I’m happy to submit a documentation patch along the lines you suggested.

How’s this?

--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -25460,11 +25460,12 @@ SELECT collation for ('foo' COLLATE "de_DE");
         <returnvalue>regtype</returnvalue>
        </para>
        <para>
-        Translates a textual type name to its OID.  A similar result is
+        Parses a string of text, extracts a potential type name from it, and
+        translates that name into an OID. A similar result is
         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.
+        <xref linkend="datatype-oid"/>). Failure to extract a valid potential
+        type name results in an error; however, if the extracted names is not
+        known to the system, this function will return <literal>NULL</literal>.
        </para></entry>
       </row>
      </tbody>

Does similar wording need to apply to other `to_reg*` functions?

Best,

David



Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Patch: Add parse_type Function
Следующее
От: Peter Smith
Дата:
Сообщение: Re: src/bin/pg_upgrade/t/004_subscription.pl test comment fix