Skip to content

Commit 1821ef1

Browse files
committed
Clarify CREATE FUNCTION documentation about handling of typmods.
The previous text was a bit misleading, as well as unnecessarily vague about what information would be discarded. Per gripe from Craig Skinner.
1 parent 0b336fb commit 1821ef1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

doc/src/sgml/ref/create_function.sgml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,12 +565,13 @@ CREATE FUNCTION foo(int, int default 42) ...
565565

566566
<para>
567567
The full <acronym>SQL</acronym> type syntax is allowed for
568-
input arguments and return value. However, some details of the
569-
type specification (e.g., the precision field for
570-
type <type>numeric</type>) are the responsibility of the
571-
underlying function implementation and are silently swallowed
572-
(i.e., not recognized or
573-
enforced) by the <command>CREATE FUNCTION</command> command.
568+
declaring a function's arguments and return value. However,
569+
parenthesized type modifiers (e.g., the precision field for
570+
type <type>numeric</type>) are discarded by <command>CREATE FUNCTION</>.
571+
Thus for example
572+
<literal>CREATE FUNCTION foo (varchar(10)) ...</>
573+
is exactly the same as
574+
<literal>CREATE FUNCTION foo (varchar) ...</>.
574575
</para>
575576

576577
<para>

0 commit comments

Comments
 (0)