Support SQL Standard OFFSET .. FETCH instead of Informix FIRST .. SKIP or
rather unique ROWS .. TO clause
---------------------------------------------------------------------------------------------------------
Key: CORE-4526
URL: http://tracker.firebirdsql.org/browse/CORE-4526
Project: Firebird Core
Issue Type: New Feature
Components: Engine
Affects Versions: 2.5.3
Reporter: Lukas Eder
The Firebird 2.5 documentation states:
> In Firebird 2.0 and up, use the SQL-compliant ROWS syntax instead.
>From
>http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-select.html#langrefupd25-first-skip
I strongly disagree with the fact that this is "SQL-compliant". FIRST .. SKIP
may be a vendor-specific extension (mimicking Informix syntax), but it matches
Transact-SQL's TOP .. START AT (START AT only supported by Sybase SQL
Anywhere). And it also essentially matches the SQL Standard OFFSET .. FETCH
clause, which should be the long-term goal for Firebird as well:
7.13 <query expression>
<result offset clause> ::=
OFFSET <offset row count> { ROW | ROWS }
<fetch first clause> ::=
FETCH { FIRST | NEXT } [ <fetch first quantity> ] { ROW | ROWS } { ONLY
| WITH TIES }
The current ROWS .. TO implementation is the only syntax that I'm aware of that
doesn't have fixed "limits", but instead needs to specify two offsets. I.e.
when you want 10 rows, users always have to calculate row numbers from the
OFFSET. Also, a lower offset is always necessary, which is a bit tedious
compared to the SQL standard OFFSET .. FETCH (or PostgreSQL / MySQL's LIMIT ..
OFFSET), where the OFFSET is optional
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel