| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
| Cc: | Iliya Krapchatov <my_working(at)inbox(dot)ru>, pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #5199: Window frame clause wrong (?) behaviour |
| Date: | 2009-11-19 19:55:09 |
| Message-ID: | 28470.1258660509@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Masterton | 2009-11-19 21:09:33 | BUG #5200: Use of min suffix in autovacuum_naptime ignored |
| Previous Message | Jaime Casanova | 2009-11-19 19:55:05 | Re: data shown from down to up |