Claudio Valderrama C. wrote:
>>-----Original Message-----
>>From: firebird-devel-admin@...
>>[mailto:firebird-devel-admin@... Behalf Of Mark
>>O'Donohue
>>Sent: Lunes 30 de Julio de 2001 21:12
>>
>>Mainly Im suggesting this becuase limit(x,y) is obviously going to
>>result in some confusionif it means limit(start, endpos) or limit(start,
>>length) or limit(length, skipnum)
>>
>
>How many more keywords would users tolerate?
>:-)
>
>
> - (much like most substring commands
>
>>result in similar confusion).
>>
>
>Mark, please explain how this syntax is confusing:
>select substring(field FROM startpos FOR length) from tbl
>
Sorry claudio, I was talking substring in general, not just sql.
Substrings can be either substring(startPos, len) or substring(startPos,
endPos) (The later being rarer nowadays) but seeing substring(12,14)
doesn't tell you which one is being used. With position only parameters
it's not possible to give any context to what the parameter means. I
see in the above (now remember I've never used substring in sql
statements, probably because Im a java programmer) but I agree that the
syntax above is clear.
So would you suggest:
limit from 30 for 200 ?
(Actually offset was the token in postgres (as I look back over old
posts from Sean))
so from postgres post from Sean,
LIMIT Clause
> >
> > LIMIT { count | ALL } [ { OFFSET | , } start ]
> > OFFSET start
LIMIT 200 OFFSET 30 -- is the postgresql way
but I think Seans reading of it was that OFFSET cannot occur by itself so
select * from table
offset 30
was illegal. can anyone confirm that?
OFFSET is however a bit obscure, SKIP in my opinion is better, but that
probably makes OFFSET a perfect candidate for a SQL standard :-).
>
>The SQL committee is a great friend of verbosity and I adhered to the
>standard syntax.
>
Clarity is fine, verbosity for its own sake is a pain, (just ask vax/vms
dcl programmer why they all have rsi :-).
On another point, since you checked out the fb2 tree, Claudio, the fb2
tree is not entirely complete, I still need to checkin a few new files,
(configure.in being one of them). I know this because I've now tried to
check it out at work and it's not all there yet.
Cheers
Mark
|