Subject Re: [Firebird-Architect] RFC: Proposal for the implementation of Temporary Tables.
Author Alexandre Benson Smith
Paul Beach wrote:

> CREATE TEMPORARY TABLE <table name> <table contents source>
> If the optional ON COMMIT clause is omitted, the contents of the temporary table are discarded at the end of the transaction that
>created them.
> An entry for relation <table name> is made in the RDB$RELATIONS system table. Entries are made in RDB$RELATION_FIELDS and
>RDB$FIELDS relations describing the fields listed in the <table contents source>, as they would be for a permanent table. The
>entries in RDB$RELATIONS, RDB$FIELDS, and RDB$RELATION_FIELDS are provisional and unusable until the transaction which issued the
>CREATE statement commits.
> All connections can see the definition of temporary tables; temporary tables are part of the global name space. No connection can
>see data stored in a temporary table by another connection.
Sorry for my ignorance... but what happens if 2 connections try to
create a temporary table with the same name ?

1.) The same table will be used, but only the rows that belongs to each
connection will be visible ?
2.) An error occurs ?
3.) The system will identify in some way that are different tables ?
4.) None of the above

If in case of option "1" and if the tables have different structures ?



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