Subject Re: [Firebird-Architect] RFC: Proposal for the implementation of Temporary Tables.
Author Alexandre Benson Smith
Hi Ann,

Ann W. Harrison wrote:

>At 11:45 AM 11/23/2004, Alexandre Benson Smith wrote:
>>Sorry for my ignorance... but what happens if 2 connections try to
>>create a temporary table with the same name ?
>The same thing that happens if two connections try to
>create a permanent table with the same name - one gets
>an obscure index duplicate error indicating that the
>table name is in use (actually, the error may be less
>awful). There's no semantic difference between creating
>a temporary table and creating a permanent table - data
>is stored in the system tables and nothing is instantiated
>until the transaction that created the table commits.
>If two connection store into a temporary table, neither
>will see the other's records. In practice, the data will
>be stored in different locations, as if into different
So I cannot put a "create temporary table" inside my app since it could
cause an exception ?

Or I will have to create temporary tables with random names to avoid it ?

I just used Temporary Tables on MSSQL, I could create it inside SP's
(what I think will not occur in FB right now), So different users could
run the same SP at the same time, but the Temporary Tables are just
visible for the connection.

I thought that temporary tables should only be visible inside the
connection that created it, or if defined as GLOBAL (as Martijn
suggested) could be seen for every connection...

see you !


Alexandre Benson Smith
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil