diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-04 22:06:46 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-04 22:06:46 +0000 |
| commit | 03b0a589d1d43c91224bc148d50c3242c6776058 (patch) | |
| tree | 1521f3ea552d3b3e5eafcc094587252c34a045e7 /doc/src | |
| parent | 1ca0874faa235dca5f817dca04f12a29de44350c (diff) | |
Consider interpreting a function call as a trivial (binary-compatible)
type coercion after failing to find an exact match in pg_proc, but before
considering interpretations that involve a function call with one or
more argument type coercions. This avoids surprises wherein what looks
like a type coercion is interpreted as coercing to some third type and
then to the destination type, as in Dave Blasby's bug report of 3-Oct-01.
See subsequent discussion in pghackers.
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/typeconv.sgml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/src/sgml/typeconv.sgml b/doc/src/sgml/typeconv.sgml index fdfc2934f9d..70799e28044 100644 --- a/doc/src/sgml/typeconv.sgml +++ b/doc/src/sgml/typeconv.sgml @@ -458,6 +458,17 @@ this step.) </para></step> <step performance="required"> <para> +If no exact match appears in the catalog, see whether the function call appears +to be a trivial type coercion request. This happens if the function call +has just one argument and the function name is the same as the (internal) +name of some data type. Furthermore, the function argument must be either +an unknown-type literal or a type that is binary-compatible with the named +data type. When these conditions are met, the function argument is coerced +to the named data type without any explicit function call. +</para> +</step> +<step performance="required"> +<para> Look for the best match. </para> <substeps> @@ -519,17 +530,6 @@ then fail. </step> </substeps> </step> -<step performance="required"> -<para> -If no best match could be identified, see whether the function call appears -to be a trivial type coercion request. This happens if the function call -has just one argument and the function name is the same as the (internal) -name of some data type. Furthermore, the function argument must be either -an unknown-type literal or a type that is binary-compatible with the named -data type. When these conditions are met, the function argument is coerced -to the named data type. -</para> -</step> </procedure> <bridgehead renderas="sect2">Examples</bridgehead> |
