Subject Re: [IBO] ClientSql vs ServerSql
Author Helen Borrie
At 09:44 AM 14/11/2008, you wrote:
>Hi
>What is the difference between ClientSql and ServerSql. I know that in
>general both contain what exactly was sent to the server. But as i've
>tested both had same value.

There is no "ClientSQL" vs "ServerSQL" distinction. Clients pass requests to the server in SQL. In its various modules the server translates SQL structures into a binary format (known as BLR) and in some places, into an internal query language called GDML. But clients don't talk BLR or GDML to the server. (Some people do know how to!) The server talks to itself in C++. ;-)

The SQL that we send from clients that use the API, as IBO does, is often called DSQL ("dynamic SQL"). There is a superset of SQL known as "embedded SQL" (ESQL) that is precompiled into C code. This precompiled SQL is referred to as "static SQL" (which is why we have the term "dynamic SQL" - it simply means statements that are not precompiled!) Hardly anyone uses ESQL these days, although it is used in Firebird's build process to generate the message files and the employee database. ESQL doesn't use the API and API applications don't touch ESQL at all.

Then, on the server, we have the procedural language for stored procedures and triggers (PSQL). PSQL uses DSQL plus a set of programming constructs. It used to be that the PSQL set was available only on the server; but EXECUTE BLOCK (from Firebird 2.0 onward) has changed that.

Helen