diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 730ac35b48b64d01fc79cf49c2e9fa76c8c48a3e..1ea9e58f54e6f3a54befb19da0495552c09eced2 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -13216,9 +13216,9 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <primary>lag</primary> </indexterm> <function> - lag(<replaceable class="parameter">value</replaceable> <type>any</> + lag(<replaceable class="parameter">value</replaceable> <type>anyelement</> [, <replaceable class="parameter">offset</replaceable> <type>integer</> - [, <replaceable class="parameter">default</replaceable> <type>any</> ]]) + [, <replaceable class="parameter">default</replaceable> <type>anyelement</> ]]) </function> </entry> <entry> @@ -13228,7 +13228,9 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; returns <replaceable class="parameter">value</replaceable> evaluated at the row that is <replaceable class="parameter">offset</replaceable> rows before the current row within the partition; if there is no such - row, instead return <replaceable class="parameter">default</replaceable>. + row, instead return <replaceable class="parameter">default</replaceable> + (which must be of the same type as + <replaceable class="parameter">value</replaceable>). Both <replaceable class="parameter">offset</replaceable> and <replaceable class="parameter">default</replaceable> are evaluated with respect to the current row. If omitted, @@ -13243,9 +13245,9 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; <primary>lead</primary> </indexterm> <function> - lead(<replaceable class="parameter">value</replaceable> <type>any</> + lead(<replaceable class="parameter">value</replaceable> <type>anyelement</> [, <replaceable class="parameter">offset</replaceable> <type>integer</> - [, <replaceable class="parameter">default</replaceable> <type>any</> ]]) + [, <replaceable class="parameter">default</replaceable> <type>anyelement</> ]]) </function> </entry> <entry> @@ -13255,7 +13257,9 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; returns <replaceable class="parameter">value</replaceable> evaluated at the row that is <replaceable class="parameter">offset</replaceable> rows after the current row within the partition; if there is no such - row, instead return <replaceable class="parameter">default</replaceable>. + row, instead return <replaceable class="parameter">default</replaceable> + (which must be of the same type as + <replaceable class="parameter">value</replaceable>). Both <replaceable class="parameter">offset</replaceable> and <replaceable class="parameter">default</replaceable> are evaluated with respect to the current row. If omitted,