]> granicus.if.org Git - postgresql/commitdiff
Clarify CREATE FUNCTION documentation about handling of typmods.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 13 Nov 2013 18:29:45 +0000 (13:29 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 13 Nov 2013 18:29:45 +0000 (13:29 -0500)
The previous text was a bit misleading, as well as unnecessarily vague
about what information would be discarded.  Per gripe from Craig Skinner.

doc/src/sgml/ref/create_function.sgml

index ebdcd8b01b86a46b0c06cdaf14080edaff79614c..c33bab8484afefd18b993a1338a9cf2154d1a713 100644 (file)
@@ -484,12 +484,13 @@ CREATE [ OR REPLACE ] FUNCTION
 
    <para>
     The full <acronym>SQL</acronym> type syntax is allowed for
-    input arguments and return value. However, some details of the
-    type specification (e.g., the precision field for
-    type <type>numeric</type>) are the responsibility of the
-    underlying function implementation and are silently swallowed
-    (i.e., not recognized or
-    enforced) by the <command>CREATE FUNCTION</command> command.
+    declaring a function's arguments and return value.  However,
+    parenthesized type modifiers (e.g., the precision field for
+    type <type>numeric</type>) are discarded by <command>CREATE FUNCTION</>.
+    Thus for example
+    <literal>CREATE FUNCTION foo (varchar(10)) ...</>
+    is exactly the same as
+    <literal>CREATE FUNCTION foo (varchar) ...</>.
    </para>
 
    <para>