pgsql: Improve the error message given for modifying a window with fram

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Improve the error message given for modifying a window with fram
Дата
Msg-id E1VdtKi-0004Cs-Uk@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve the error message given for modifying a window with frame clause.

For rather inscrutable reasons, SQL:2008 disallows copying-and-modifying a
window definition that has any explicit framing clause.  The error message
we gave for this only made sense if the referencing window definition
itself contains an explicit framing clause, which it might well not.
Moreover, in the context of an OVER clause it's not exactly obvious that
"OVER (windowname)" implies copy-and-modify while "OVER windowname" does
not.  This has led to multiple complaints, eg bug #5199 from Iliya
Krapchatov.  Change to a hopefully more intelligible error message, and
in the case where we have just "OVER (windowname)", add a HINT suggesting
that omitting the parentheses will fix it.  Also improve the related
documentation.  Back-patch to all supported branches.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/b47487138533075be1c558310685d4d822b7acb9

Modified Files
--------------
doc/src/sgml/syntax.sgml          |   21 ++++++++++-----------
src/backend/parser/parse_clause.c |   31 ++++++++++++++++++++++++++-----
2 files changed, 36 insertions(+), 16 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Improve the error message given for modifying a window with fram
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Improve the error message given for modifying a window with fram