Chapter 7. Database Administration

In this chapter, we will cover the following recipes:

  • Writing a script that either succeeds entirely or fails entirely
  • Writing a psql script that exits on the first error
  • Performing actions on many tables
  • Adding/removing columns on a table
  • Changing the data type of a column
  • Changing the definition of a data type
  • Adding/removing schemas
  • Moving objects between schemas
  • Adding/removing tablespaces
  • Moving objects between tablespaces
  • Accessing objects in other PostgreSQL databases
  • Accessing objects in other foreign databases
  • Updatable views
  • Using materialized views

Introduction

In Chapter 5, Tables and Data, we looked at the contents of tables and various complexities. Now, we'll turn our attention to larger administration tasks that ...

Get PostgreSQL 9 Administration Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.