Subject Re: [firebird-support] Renaming a table
Author Daniel Rail
Hi,

At June 9, 2004, 08:00, Martijn Tonies wrote:

>> It is not part of the SQL standard, yet. It has been suggested to 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.
>>
>> I would support the feature myself, but it would have to be something
>> that is performed with an exclusive connection. And, the
>> implementation would have to be well thought out, since there can
>> (more likely will) be dependencies on the table being renamed.

> Indeed. FKs and so on will be "easy", but not triggers/procedures...

> Guess it's time for my "invalid objects" push again ;-)

I think it should be possible to have the changes propagate to
triggers and SPs, and have them automatically recompile, since the
parameters are not changing. But, I do recognize that some exceptions
might be applicable, and not permit the renaming to be performed or
cause "invalid objects"(i.e.: if someone deleted the source from the
RDB$PROCEDURE_SOURCE or RDB$TRIGGER_SOURCE columns). Also, just look
at the support for external procedures that is in development at the
moment, a person might not know if one of them depends on the table
that is being renamed.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)