]> granicus.if.org Git - postgresql/commit
Docs: be explicit about datatype matching for lead/lag functions.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 25 Aug 2015 23:12:57 +0000 (19:12 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 25 Aug 2015 23:12:57 +0000 (19:12 -0400)
commit23ddcd77b72bdbec4f8e5fb618febefa1fea4d2d
tree4e90eb466a0b7765b5b861fc5c7f1a2fe58d307a
parent7c57449fc5855361d3a69374192c58fb68ce3e67
Docs: be explicit about datatype matching for lead/lag functions.

The default argument, if given, has to be of exactly the same datatype
as the first argument; but this was not stated in so many words, and
the error message you get about it might not lead your thought in the
right direction.  Per bug #13587 from Robert McGehee.

A quick scan says that these are the only two built-in functions with two
anyelement arguments and no other polymorphic arguments.  There are plenty
of cases of, eg, anyarray and anyelement, but those seem less likely to
confuse.  For instance this doesn't seem terribly hard to figure out:
"function array_remove(integer[], numeric) does not exist".  So I've
contented myself with fixing these two cases.
doc/src/sgml/func.sgml