Re: SQL:2008 LIMIT/OFFSET
От | Tom Lane |
---|---|
Тема | Re: SQL:2008 LIMIT/OFFSET |
Дата | |
Msg-id | 27312.1224506767@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | SQL:2008 LIMIT/OFFSET (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: SQL:2008 LIMIT/OFFSET
|
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> 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 this isn't actually quite equivalent to LIMIT. > If we want to avoid reshuffling the expression syntax (always good to > avoid) and avoid making ROWS reserved, we need to make some arbitrary > restrictions on what kinds of expressions can be used in these clauses. This syntax seems sufficiently brain-dead that only standards-compliance fanatics would use it. Accordingly, limiting it to match the letter of the standard (literals only) is probably sufficient. BTW, I think it's a bad idea to assign made-up parse locations, as you did here: > + | /*EMPTY*/ { $$ = makeIntConst(1, @$); } Just use -1. regards, tom lane
В списке pgsql-hackers по дате отправления: