Subject RE: [IB-Architect] SQL Scripts
Author Claudio Valderrama C.
> -----Original Message-----
> From: Marco Lauria [mailto:mslauria@...]
> Sent: Viernes 7 de Diciembre de 2001 18:45
>
> Also I am thinking now about nested transactions, but
> FB doesn't support them...
> and it is another story.

I only have seen nightmares as a result of nested transactions. What are
they good for?


> I answer also to a message of Jim regarding this topic:
> For the error handling I think it's not a problem,
> use the absolute line from the beginning of the script can be the
> right choice.

Ok, this assumes the engine should hold the whole script as a big string to
be able to calculate the position. Otherwise, the engine is psychic and
knows where a script starts and finishes as opposed to individual
interactive commands. A Russian developer gave me a SQL script that weights
more than 1.2 MB... and it's only made up of DDL statements. I can't imagine
why the engine has to load 1.2 MB in memory and start executing. Any tool
you know sends one command at a time: isql, IBConsole, ib_sql, Marathon,
etc. Will we create BEGIN SCRIPT and END SCRIPT markers in isql?


> For the prepare....
> can't we prepare the entire script?

Naive. Every statement should be compiled to be prepared. The compilation of
one statement has virtually nothing to do with the compilation of the next
statement. It would be funny to know what a tool does when it receives an
array of 400 statement handles in response to an script. Also, why would
anyone put such burden in the engine?

C.