Subject | Re: [Firebird-Architect] RFC: Proposal for the implementation of Temporary Tables. |
---|---|
Author | Arno Brinkman |
Post date | 2004-11-23T18:38:37Z |
Hi,
<table definition> ::=
CREATE [ <table scope> ] TABLE <table name> <table contents source>
[ ON COMMIT <table commit action> ROWS ]
<table contents source> ::=
<table element list>
| <typed table clause>
| <as subquery clause>
<table scope> ::= <global or local> TEMPORARY
<global or local> ::=
GLOBAL
| LOCAL
<table commit action> ::=
PRESERVE
| DELETE
<as subquery clause> ::=
[ <left paren> <column name list> <right paren> ] AS <subquery>
<with or without data>
<with or without data> ::=
WITH NO DATA
| WITH DATA
So i'm at least missing the GLOBAL | LOCAL here.
but can't read or write data in it, correct?
So a temporary table cannot make a foreign key to a normal table only to an
other temporary table?
RDB$RELATION_TRANSACTION_TYPE a better name for it, because on
RDB$RELATION_TYPE i think of VIEW or TABLE.
Should it be possible to make triggers, indexes on this temporary table (i
think so)?
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81
> Syntax:table are discarded at the end of the transaction that
>
> CREATE TEMPORARY TABLE <table name> <table contents source>
> [ON COMMIT {PRESERVE | DELETE} ROWS]
>
> Syntax:
> If the optional ON COMMIT clause is omitted, the contents of the temporary
> created them.According SQL standard :
<table definition> ::=
CREATE [ <table scope> ] TABLE <table name> <table contents source>
[ ON COMMIT <table commit action> ROWS ]
<table contents source> ::=
<table element list>
| <typed table clause>
| <as subquery clause>
<table scope> ::= <global or local> TEMPORARY
<global or local> ::=
GLOBAL
| LOCAL
<table commit action> ::=
PRESERVE
| DELETE
<as subquery clause> ::=
[ <left paren> <column name list> <right paren> ] AS <subquery>
<with or without data>
<with or without data> ::=
WITH NO DATA
| WITH DATA
So i'm at least missing the GLOBAL | LOCAL here.
> Semantics:table. Entries are made in RDB$RELATION_FIELDS and
> An entry for relation <table name> is made in the RDB$RELATIONS system
> RDB$FIELDS relations describing the fields listed in the <table contentssource>, as they would be for a permanent table. The
> entries in RDB$RELATIONS, RDB$FIELDS, and RDB$RELATION_FIELDS areprovisional and unusable until the transaction which issued the
> CREATE statement commits.tables are part of the global name space. No connection can
>
> All connections can see the definition of temporary tables; temporary
> see data stored in a temporary table by another connection.A connection "b" can see the table created (and commited) by connection "a",
but can't read or write data in it, correct?
> A temporary table can be either the referenced or referencingtable in a foreign key constraint, but the partner table must
> be a temporary table. If either table is ON DELETE COMMIT, both must beON DELETE COMMIT.
So a temporary table cannot make a foreign key to a normal table only to an
other temporary table?
> System table support:that field value has the value RDB$PERMANENT, the table is
> A new field will be added to RDB$RELATIONS, called RDB$RELATION_TYPE. If
> permanent. If the field value is RDB$TEMPORARY_PRESERVE the table istemporary and contents are retained until the connection which
> created them terminates. If the value is a RDB$TEMPORARY_DELETE, thetable is temporary and contents are discarded at the end of
> the transaction which created them.What about RDB$TABLE and RDB$VIEW instead of RDB$PERMANENT or is
RDB$RELATION_TRANSACTION_TYPE a better name for it, because on
RDB$RELATION_TYPE i think of VIEW or TABLE.
> Notes:from permanent to temporary or vice-versa is accomplished
> No changes are proposed to ALTER TABLE or DROP TABLE. Changing a table
> by dropping the table and recreating it.the <table contents source> listed in the syntax above. If
> The syntax AS <query expression> has been suggested as an alternative to
> that syntax is part of the SQL-99 standard, I can't find it.See snipped above.
Should it be possible to make triggers, indexes on this temporary table (i
think so)?
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://80.126.130.81