> On Sat, May 6, 2023 at 4:44 PM Tatsuo Ishii wrote:
>
>> Currently Window function nth_value is coded as following:
>>
>> nth = DatumGetInt32(WinGetFuncArgCurrent(winobj, 1, &isnull));
>> if (isnull)
>> PG_RETURN_NULL();
>> const_offset = get_fn_expr_arg_s
On Sat, May 6, 2023 at 4:44 PM Tatsuo Ishii wrote:
> Currently Window function nth_value is coded as following:
>
> nth = DatumGetInt32(WinGetFuncArgCurrent(winobj, 1, &isnull));
> if (isnull)
> PG_RETURN_NULL();
> const_offset = get_fn_expr_arg_stable(fcin
Currently Window function nth_value is coded as following:
nth = DatumGetInt32(WinGetFuncArgCurrent(winobj, 1, &isnull));
if (isnull)
PG_RETURN_NULL();
const_offset = get_fn_expr_arg_stable(fcinfo->flinfo, 1);
if (nth <= 0)
ereport(E