I wrote:
> Hmm. It seemed to work as expected in current --- maybe there is
> another bug still lurking in 6.5.*. I'll look when I get a chance.
Yup, this change that was already in current is also needed:
*** src/backend/parser/gram.y.orig Mon Oct 18 23:59:35 1999
--- src/backend/parser/gram.y Mon Oct 18 23:55:18 1999
***************
*** 2768,2773 ****
--- 2768,2775 ---- /* finally attach the sort clause */ first_select->sortClause =
$2; first_select->forUpdate = $3;
+ first_select->limitOffset = nth(0, $4);
+ first_select->limitCount = nth(1, $4); $$ = (Node *)first_select;
} if (((SelectStmt *)$$)->forUpdate != NULL && QueryIsRule)
I have updated both current and REL6_5 branches.
regards, tom lane