Re: BUG #15262: "unexpected end of tuplestore" error when using new GROUPS window function clause
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: lukas.eder@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2018-07-09T22:29:34Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix bugs with degenerate window ORDER BY clauses in GROUPS/RANGE mode.
- 8893d48e7fbf 11.0 landed
- ff4f8891648c 12.0 landed
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes: > This error can be reproduced easily as follows > postgres=# SELECT count(*) OVER (GROUPS 1 PRECEDING) FROM (VALUES (1), > (2), (2)) t(v); > ERROR: unexpected end of tuplestore In an assert-enabled build I get an assert failure from this. I think this is the same problem Masahiko Sawada noted in https://www.postgresql.org/message-id/CAD21AoDrWqycq-w_+Bx1cjc+YUhZ11XTj9rfxNiNDojjBx8Fjw@mail.gmail.com and as in that thread, I think what we really should be doing here is giving a parse error. What would you expect GROUPS mode to do without an ORDER BY to define the grouping? regards, tom lane