aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2018-07-28 20:08:01 -0700
committerNoah Misch <noah@leadboat.com>2018-07-28 20:08:01 -0700
commite09144e6ce2b3ec120d0405ead2b062183f26c6b (patch)
tree8207a13857591e5fd503f446437043e920ccdb99 /src/backend/utils/adt/ruleutils.c
parent6bf0bc842bd75877e31727eb559c6a69e237f831 (diff)
downloadpostgresql-e09144e6ce2b3ec120d0405ead2b062183f26c6b.tar.gz
postgresql-e09144e6ce2b3ec120d0405ead2b062183f26c6b.zip
Document security implications of qualified names.
Commit 5770172cb0c9df9e6ce27c507b449557e5b45124 documented secure schema usage, and that advice suffices for using unqualified names securely. Document, in typeconv-func primarily, the additional issues that arise with qualified names. Back-patch to 9.3 (all supported versions). Reviewed by Jonathan S. Katz. Discussion: https://postgr.es/m/20180721012446.GA1840594@rfd.leadboat.com
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r--src/backend/utils/adt/ruleutils.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index a38aed2065f..5a61d2dac00 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -10761,16 +10761,11 @@ generate_function_name(Oid funcid, int nargs, List *argnames, Oid *argtypes,
* Determine whether VARIADIC should be printed. We must do this first
* since it affects the lookup rules in func_get_detail().
*
- * Currently, we always print VARIADIC if the function has a merged
- * variadic-array argument. Note that this is always the case for
- * functions taking a VARIADIC argument type other than VARIADIC ANY.
- *
- * In principle, if VARIADIC wasn't originally specified and the array
- * actual argument is deconstructable, we could print the array elements
- * separately and not print VARIADIC, thus more nearly reproducing the
- * original input. For the moment that seems like too much complication
- * for the benefit, and anyway we do not know whether VARIADIC was
- * originally specified if it's a non-ANY type.
+ * We always print VARIADIC if the function has a merged variadic-array
+ * argument. Note that this is always the case for functions taking a
+ * VARIADIC argument type other than VARIADIC ANY. If we omitted VARIADIC
+ * and printed the array elements as separate arguments, the call could
+ * match a newer non-VARIADIC function.
*/
if (use_variadic_p)
{