Subject Re: [Firebird-Architect] rfc: TRUNCATE TABLE
Author Jim Starkey
Vlad Khorsun wrote:
>> Vlad Khorsun wrote:
>>
>>>> The SQL committee not-with-standing, almost every serious designer
>>>> having contemplated the runtime and permission problems has decided that
>>>> TRUNCATE is a DDL, not DML, operation.
>>>>
>>>>
>>> Agree. Note, we already agreed to implement TRUNCATE as DDL.
>>>
>>>
>>>
>> If I can make a meta-recommendation, the Firebird project will be well
>> served if decisions were not made until the discussion was finished.
>> Racing to see who can first declare a winner is the kind of
>> organizational stupidity that leads to things like George Bush and John
>> McCain. I know that everyone out there is smarter, more experienced,
>> and more knowledgeable than I am, but I often find that other people
>> have noticed subtleties or contradictions that I have missed.
>> Open technical discussion is a very good thing. Rushing to close it off
>> leads to folly and things like MySQL.
>>
>
> Hmm... not sure i understand you correct. I thought you told than TRUNCATE is more DDL
> than DML and you don't object if it will be guarded by some access privileges. Both points was
> agreed with all other participants. Nobody closed the discussion ;)
>

I do think that TRUNCATE is DDL, not DML, but I'm not convinced that
consensus has been reached. How the decision is reached is just as
important as the decision itself.

That said, may I recommend that new pointer page and index root page be
created and RDB$PAGES updated (and flushed) before deleting old pointer,
data, and index pages? That way the system will be validate over a
crash/restart.