Table of contents

DBA tools

Alter a column data type in all tables

To list all the indexes of a database

To list all pk’s and fk’s in a database

Design patterns

Calculated columns with a trigger

Remove duplicate records from a table

How to safely delete records ?

A simple audit system

The sandbox framework

A framework for distributed queries where each user has its own database called the sandbox where he maps tables from several databases with the Foreign Data Wrapper protocol of PostgreSQL.

1. Architecture

2. A fdw table definitions server

3. The kernel

4. The function connect_database

5. Utilities

6. The attach functions

7. Usage