Allow window functions to use ROWS mode internally when RANGE mode is specified but unnecessary (David Rowley)
But the improvement (fix to some degree) also applies to the much more common case where no mode has been specified, RANGE unfortunately being the default.
That includes the most common use case "row_number() OVER (ORDER BY col)", where RANGE mode should not be applied to begin with, according to SQL specs. This is what made me investigate, test and eventually propose a fix in the first place. See:
Also, I was hoping to be mentioned in the release note for working this out:
Allow window functions to use the faster ROWS mode internally when RANGE mode is specified or would be default, but unnecessary (David Rowley, Erwin Brandstetter)
Thanks,
Erwin
On Sat, 19 Aug 2023 at 04:02, Bruce Momjian <bruce@momjian.us> wrote:
I have completed the first draft of the PG 16 release notes. You can see the output here: