Subject RE: [IB-Architect] 'Order By' Issue
Author David Berg

Thanks, it's good to know the underlying support is there - that's

Considering the open source nature of Interbase it's perfectly fair for you
to dump it back in my lap. I'm a little busy at the moment, but I'll file
your notes and hopefully I can get to it sometime soon. It would certainly
be an interesting learning experience.


P.S. I agree that SQL is an abomination of a language. I've had a number of
discussions with Fabian Pascal on the subject, which led me to believe that
even Codd and Date would agree on that score. It was never intended as a
commercial relational language.

Unfortunately, it is something of a standard, and for better or worse the
standard is lacking in many areas, not the least of which is enforcement
(since many companies claim compliance but are only marginally "entry level"
compliant, with three levels of compliance where's the incentive of
companies to be fully compliant?).

-----Original Message-----
From: Jim Starkey [mailto:jas@...]
Sent: Wednesday, December 20, 2000 9:17 AM
Subject: RE: [IB-Architect] 'Order By' Issue

At 11:02 AM 12/20/00 -0500, Leyne, Sean wrote:
>First let me say that I believe that IB/Firebird needs to support the
>TOP {x} syntax and your top 10/100 example is right on point and is a
>real shortcoming for IB/Firebird, but...

It isn't a deficiency of the Engine. GDML and BLR have supported
a "first n" clause since day 0. And on that unfortunate day that
the code transfered to Borland, the optimizer used that as a hint
to use index navigation rather than sort (I implemented the feature
for dBase emulation).

The original Interbase philosphy towards SQL was "we don't fix it,
we don't extend it, we just implemented it." Innovation was done
in GDML. The basic idea was that if wasn't portable, why break
the SQL standard? We took great pains to allow "seamless" (gag gag)
integration of GDML and SQL so that the portable stuff was actual

Borland's marketters (may they all have their lifesavings invested
in Borland) decided to deep-6 GDML in favor of SQL. This wasn't
completely unreasonable, since the world had bought the fantasy
that SQL was a standard rather than a theme. But what they should
have done, and didn't, was to move functionality accessible
exclusively from GDML to "SQL".

By all means invent and/or steal a "first" or "top" syntax and map
it forthwith and directly into blr_first. Just remember that the
more ughly the syntax and obscure the semantics the more likely
that the SQL committee will bless it.

Jim Starkey

To unsubscribe from this group, send an email to: