From 5e74a427854fa17babfbb0e22c4ca95e4f48f2fe Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Mon, 11 Mar 2019 18:14:05 -0400 Subject: [PATCH] Document incompatibility of comparison expressions with VARIADIC array arguments COALESCE, GREATEST and LEAST all look like functions taking variable numbers of arguments, but in fact they are not functions, and so VARIADIC array arguments don't work with them. Add a note to the docs explaining this fact. The consensus is not to try to make this work, but just to document the limitation. Discussion: https://postgr.es/m/CAFj8pRCaAtuXuRtvXf5GmPbAVriUQrNMo7-=TXUFN025S31R_w@mail.gmail.com --- doc/src/sgml/func.sgml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 03859a78eaa..7fbcdfeae56 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -12481,6 +12481,15 @@ SELECT setval('foo', 42, false); Next nextval + + + Although COALESCE, GREATEST, and + LEAST are syntactically similar to functions, they are + not strictly functions, and thus cannot be used with explicit + VARIADIC array arguments. + + + <literal>CASE</literal> -- 2.39.5