diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2019-03-11 18:14:05 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2019-03-11 18:14:05 -0400 |
commit | 5e74a427854fa17babfbb0e22c4ca95e4f48f2fe (patch) | |
tree | 8626b2ffa62d12ff68097558ab311b7c4d28bf64 /doc/src | |
parent | 32b8f0b0332ef96c67f06ded4d458a3ce12fe2ef (diff) | |
download | postgresql-5e74a427854fa17babfbb0e22c4ca95e4f48f2fe.tar.gz postgresql-5e74a427854fa17babfbb0e22c4ca95e4f48f2fe.zip |
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
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 9 |
1 files changed, 9 insertions, 0 deletions
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); <lineannotation>Next <function>nextval</func </para> </tip> + <note> + <para> + Although <token>COALESCE</token>, <token>GREATEST</token>, and + <token>LEAST</token> are syntactically similar to functions, they are + not strictly functions, and thus cannot be used with explicit + <token>VARIADIC</token> array arguments. + </para> + </note> + <sect2 id="functions-case"> <title><literal>CASE</literal></title> |