Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b284262

Browse files
committed
docs: Only first instance of a PREPARE parameter sets data type
If the first reference to $1 is "($1 = col) or ($1 is null)", the data type can be determined, but not for "($1 is null) or ($1 = col)". This change documents this. Reported-by: Morgan Owens Discussion: https://postgr.es/m/153233728858.1404.15268121695358514937@wrigleys.postgresql.org Backpatch-through: 9.3
1 parent 31380bc commit b284262

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/src/sgml/ref/prepare.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ PREPARE <replaceable class="parameter">name</replaceable> [ ( <replaceable class
5252
parameter data types can optionally be specified. When a
5353
parameter's data type is not specified or is declared as
5454
<literal>unknown</literal>, the type is inferred from the context
55-
in which the parameter is used (if possible). When executing the
55+
in which the parameter is first referenced (if possible). When executing the
5656
statement, specify the actual values for these parameters in the
5757
<command>EXECUTE</command> statement. Refer to <xref
5858
linkend="sql-execute"/> for more
@@ -104,7 +104,7 @@ PREPARE <replaceable class="parameter">name</replaceable> [ ( <replaceable class
104104
The data type of a parameter to the prepared statement. If the
105105
data type of a particular parameter is unspecified or is
106106
specified as <literal>unknown</literal>, it will be inferred
107-
from the context in which the parameter is used. To refer to the
107+
from the context in which the parameter is first referenced. To refer to the
108108
parameters in the prepared statement itself, use
109109
<literal>$1</literal>, <literal>$2</literal>, etc.
110110
</para>

0 commit comments

Comments
 (0)