O'Reilly logo

PostgreSQL 9 Administration Cookbook by Hannu Krosing, Simon Riggs

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing a script that either all succeeds or all fails

Database administration often involves applying a coordinated set of changes to the database. One of PostgreSQL's great strengths is the transaction system, where almost all actions can be executed inside a transaction. This allows us to build a script that will either all succeed or all fail, which can be critically important on a production system.

Transactions definitely apply to DDL (Data Definition Language), which refers to the set of SQL commands used to define, modify, and delete database objects. The term DDL goes back many years, though it persists because that subset is a useful short name for the commands that most administrators need to execute: CREATE, ALTER, DROP, and so on. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required