or
Jack Douglas
oracle
It [has been suggested](http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7072180788422#7084625440626) that DDL is logically performed something like this:


    begin
        COMMIT;
        perform any appropriate pre-DDL trigger code;
        do the ddl;
        perform any appropriate post-DDL trigger code;
        COMMIT;
    exception
        when others then
             ROLLBACK;
             raise;
    end;

Which would suggest that any error in a trigger would cause the DDL to be rolled back. Is this the case?
Top Answer
Jack Douglas
The answer, at least on 11.2, is "It depends":

This `create table` is rolled back:

<>https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=2dfdc24c2296a9014f6947c902b5ca46

But this `truncate` is not:

<>https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=8f0e71b119b01e441e372e7c218858f7
If an 'after' DDL trigger causes an error, is the DDL rolled back?
GeorgePalacios replying to Jack Douglas
@Jack my point was that posting purposefully damaging content rather than just flagging it as an issue in Meta just creates more work for us all
GeorgePalacios
@Jack my point was that posting purposefully damaging content rather than just flagging it as an issue in Meta just creates more work for us all
Jack Douglas replying to GeorgePalacios
it might be, but I don't think we should worry about signal:noise over here in the chat. In the Q&A for this particular question, the signal:noise ratio is good and that is where it matters
GeorgePalacios
Signal-noise ratio is already getting hard to manage based on this - adding more noise at this early stage is counter-productive, IMHO
monkeywrench replying to Paul White
You are correct. I'm not sorry in any sense other than in the generic sense given by the common (if strange) English turn of phrase.
Paul White replying to monkeywrench
You don't sound sorry at all ;)  
Look, yes we know there are gaps in the system. Pointing them out on meta is sufficient - we don't always need a demo.  
I understand you all are well-meaning, but it is consuming time (mine and others) that could be better spent elsewhere right now.
monkeywrench replying to Paul White
I'm sorry Paul but I think you're missing the point. If you think one *friendly* troll showing where obvious weak points in the system are is a waste of time –and your solution is to ask the friendly troll to stop– then the system is no where close to being prepared for the real world. I've very carefully refrained from doing anything actually disruptive (so far contained to 2 posts that don't involve non TA developers) or that I can't also easily undo. The first real troll, spamer, sock puppeter, or vindicative user you get will not be so oblidging.
Paul White replying to monkeywrench
Please find another way of making your point that doesn't unnecessarily consume other peoples' time.
littlebobbytables replying to monkeywrench
*Pip squeek!* Who said I wanted help? [I got this.](http://www.littlebobbycomic.com/projects/week-228/).
monkeywrench
Cleanup crew, please do counterflag!
monkeywrench
The flag on this post is an illustration of [this problem](https://topanswers.xyz/meta?q=431). This account (which could have been 100% anonymous if I'd taken more care to cover my tracks) was created in support of litlebobbytables' cause and should not have been alowed trusted with a tool as powerful as flagging.
Jack Douglas replying to Colin 't Hart
I do hope so — it naively seem like it should be easier with postgres's in-heap row versioning, but it's been discussed on the mailing lists and I think there are various difficulties. iiuc it used to exist in the very early days
Colin 't Hart replying to Jack Douglas
I suspect someone will build flashback query functionality within the next few years.
Jack Douglas
but i do miss flashback query!
Jack Douglas replying to Colin 't Hart
when we update the TopAnswers api (the internal api that the webserver uses to communicate with postgres), we run a script that drops the entire api (views, functions etc) and recreates it. if there is an error anywhere in the script it rolls all the way back and no-one notices — that's something I really appreciate about Postrgres coming from an Oracle background!
Colin 't Hart
@Jack Wow, I love Oracle. So glad I don't have to use it anymore.
Jack Douglas
I've rolled back my edit :)
Jack Douglas
@littlebobbytables this post will be a good testing ground for the flagging/deletion feature once it is released, thanks (genuinely!)
littlebobbytables
I realize this is messy but better me than the next guy. At least I picked your post to mess with — but I did pick one where you are unable to vote on the OTHER answer so you aren't tempted to paper over the problem with not having down-votes.
Jack Douglas replying to littlebobbytables
the edit was before I worked out what was going on, feel free to edit it back :)
littlebobbytables
@Jack Just [editing](https://topanswers.xyz/answer-history?id=183) deliberately malicious content into view so people are more likely to vote on the other post doesn't quite fix the underlying issue, but I'm glad you see the problem.
Jack Douglas
@littlebobbytables your point is cleverly made :)