Re: [HACKERS] SQL:2008 LIMIT/OFFSET

2008-10-20 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> BTW, I think it's a bad idea to assign made-up parse locations, as >> you did here: > Hmm, @$ is the location of the complete rule, so it should point to the > "empty" spot in theory. Or am I misunderstanding something? Well, yeah

Re: [HACKERS] SQL:2008 LIMIT/OFFSET

2008-10-20 Thread Peter Eisentraut
Tom Lane wrote: Peter Eisentraut <[EMAIL PROTECTED]> writes: SQL:2008 specifies the following syntax for what we have so far called LIMIT and OFFSET SELECT ... [ ORDER BY ... ] OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY What does the "NEXT" option mean? FIRST and NE

Re: [HACKERS] SQL:2008 LIMIT/OFFSET

2008-10-20 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > SQL:2008 specifies the following syntax for what we have so far called > LIMIT and OFFSET > SELECT ... [ ORDER BY ... ] > OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY What does the "NEXT" option mean? I'm a bit worried that th

[HACKERS] SQL:2008 LIMIT/OFFSET

2008-10-20 Thread Peter Eisentraut
SQL:2008 specifies the following syntax for what we have so far called LIMIT and OFFSET SELECT ... [ ORDER BY ... ] OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY For example, SELECT id, name FROM tab1 ORDER BY id OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY; (I understand thi