Subject Re: [firebird-support] Known Bugs
Author Ann W. Harrison
At 02:25 PM 3/3/2004, jrodenhi wrote:


>... SQL, PSQL, sometimes DSQL and sometimes
>ISQL. Why not just one version? I really like Firebird, but I wonder
>why I can't DECLARE a variable in a script. Or better, use the
>terrific FOR SELECT INTO DO syntax in a script I type into the
>Interactive SQL window in IBOConsole.

Much of the reason is buried in history. The program ISQL which IBOConsole
probably invokes, started life as an SQL test engine, not an serious
interactive tool. It was "adapted" to be an interactive tool, but does a
bare minimum of stuff itself. It recognizes connect statements, SHOW
statements, and a few others. Everything else gets shipped off to the
server as soon as the tool finds a terminator. That's why you have to do a
"set terminator" to define procedures and triggers with semi-colons
embedded. ISQL has no more idea than the man in the moon what you're
trying to do. ISQL was "good enough" for V4, but it was going to be
replaced by a wonderful whoopeedoo GUI in the next release. The GUI never
happened.

The syntax used in procedures and triggers has a similar genesis. You
can't write procedures and triggers in plain SQL-92. You need
conditionals, loops, and error handling. So those features got added, just
for procedures and triggers, not for the language as a whole.


Regards,

Ann
www.ibphoenix.com
We have answers.