Transactional DDL In PostgreSQL

Recently I came across a comparison of Transactional DDL support in various databases, on the postgresql wiki.

For me  this has been an eye-opener – having started my career with Oracle databases, I was brought up thinking that ddl statements are always outside transactions, without questioning why it must be so.

PostgreSQL not only supports transactional DDL, it does so in the most intuitive way – you just wrap these statements in a transaction block and everything can be rolled back if necessary. No auto-commits (like Oracle/MySQL does), no need for specific Isolation levels (like SQL Server) – works quite robustly without any problems.

Just one more reason for me to pick Postgres as the database of choice for my upcoming projects. Then of course, there is that thing about Postgres actually being the most advanced database and open source at the same time.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax