Subject Re: [Firebird-Architect] RFC: Proposal for the implementation of Temporary Tables.
Author Martijn Tonies
> >As almost everybody mentioned, GLOBAL and LOCAL are missing ;-)
>
> Let me see if I can follow all of this through. Does everyone agree
> that the standard specifies that the data in temporary tables are
> SQL-session objects and that a SQL-session is equivalent to a connection?
>
> OK, now does everyone agree that the standard uses LOCAL and GLOBAL
> to define the scope of temporary table data between SQL-client modules
> and that we don't support SQL-client modules?
>
> >Oracle supports GLOBAL TEMPORARY TABLE with global schema and
> >session-specific data. AFAIU, this is what you propose. Oracle does not
> >support LOCAL TEMPORARY TABLE (at least in v9).
>
> OK, so if we added { GLOBAL | LOCAL } with LOCAL ::= notYetImplemented,
> then we'd be consistent with the standard (my opinion at least) and
> with Oracle.

Yes.

> >AFAIU, InterBase 7.5 offers exactly the same semantics. Sybase ASA - the
> >same.
>
> And with Sybase and InterBase. (Wow, the company we keep!)

Very well.

IMO, if "local" isn't implemented, then it doesn't mind we should drop out
the "GLOBAL" syntax thingy for perhaps a future "local" implemenation.
Looks like Oracle did that too with the eye on the future.

> >DB2 offers DECLARE GLOBAL
> >TEMPORARY TABLE which is not included into the system schema and hence is
> >visible only on a per-session basis.
>
> Which is OK, because GLOBAL refers to the scope with regard to modules,
> not schemas.
>
> > MSSQL has both global and local temp
> >tables defined via the non-standard syntax with specific scopes (all
> >sessions or current session) and global temp tables have data shared
between
> >sessions.
>
> OK, how many people think we should show our independence by ignoring
> the standard and the four implementations that are more or less compliant
> with it and follow the lead of MSSQL?

Oh no! MS SQL uses a "#" in front of the name for local temp tables, and
"##" for global temp tables. Sounds very logical *g*

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com