Subject | Re: [firebird-support] Re: Renaming a table |
---|---|
Author | Lester Caine |
Post date | 2004-06-11T04:50:51Z |
ben_ata wrote:
done with Firebird. With the discussions on the developer list on how
changes like these can be CORRECTLY incorporated into the MGA (multi
generational architecture) I can see WHY Create and Drop IS the right
route, because transactions in progress need to be able to see the old
table or correctly 'crash' cleanly when committing against a non
existent table - so even RENAME will work internally like create and
drop - but with the advantage that the data is copied just by linking to
the correct table header.
Given the number of examples recently of sites going off-line while
damage to databases are repaired or upgrades go wrong, it would be nice
to establish if on line changes to database structure IS safe :)
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
>>It is not part of the SQL standard, yet. It has been suggested toPersonally I will always use the Create and Drop route, so rename CAN be
> add
>
>>to the standard the statement RENAME TABLE, but it is just a
>>suggestion as of now and not part of SQL-2003(only mentioned in 2
>>lines of text). Although, MS-SQL doesn't support it, Oracle does.
>>So, my guess is that it is Oracle that submitted the RENAME TABLE
>>syntax to be included in the standard.
>
>
> Oracle isn't the only DBMS supporting this:
>
> PostgreSQL, MySQL and Sybase SQL Anywhere support renaming a table as
> well. To my knowledge SQL Server does support it as well via the
> sp_rename stored procedure.
done with Firebird. With the discussions on the developer list on how
changes like these can be CORRECTLY incorporated into the MGA (multi
generational architecture) I can see WHY Create and Drop IS the right
route, because transactions in progress need to be able to see the old
table or correctly 'crash' cleanly when committing against a non
existent table - so even RENAME will work internally like create and
drop - but with the advantage that the data is copied just by linking to
the correct table header.
Given the number of examples recently of sites going off-line while
damage to databases are repaired or upgrades go wrong, it would be nice
to establish if on line changes to database structure IS safe :)
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services