How to create a custom windowing function for PostgreSQL? (Running Average Example)

前端 未结 4 600
清歌不尽
清歌不尽 2021-01-05 00:34

I would really like to better understand what is involved in creating a UDF that operates over windows in PostgreSQL. I did some searching about how to create UDFs in genera

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-05 01:02

    PL/R provides such functionality. See here for some examples. That said, I'm not sure that it (currently) meets your requirement of "keep[ing] a running sum and observation count and [not] sum[ming] up almost identical sets of rows at each iteration" (see here).

提交回复
热议问题