Re: BUG #5199: Window frame clause wrong (?) behaviour

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5199: Window frame clause wrong (?) behaviour
Дата
Msg-id 28470.1258660509@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #5199: Window frame clause wrong (?) behaviour  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-bugs
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Try without the parenthesis in OVER:
> ...
> I'm quite surprised by the error message that produces, though...

It's actually correct: the syntax with parens specifies copying
and modifying the named WINDOW definition, but you're not allowed to
copy-and-modify a definition that has a FRAME clause.  (Why the spec
says that is beyond me; replacing the FRAME clause seems sensible
enough, but ...)

This isn't terribly well explained in our docs, as far as I can
find at the moment.  The SELECT reference page mentions the rule
in the context of a dependent WINDOW-clause definition, but
doesn't explain that OVER with parens acts the same way.
And maybe the error message wording could be improved.

            regards, tom lane

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

Предыдущее
От: "Orange"
Дата:
Сообщение: data shown from down to up
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: data shown from down to up