This manual is volume 2 of the official reference documentation for PostgreSQL 8.2.4. This volume documents the client and server interfaces to the C/C++ interface libpq, the embedded SQL/C compiler ECPG and the server-side languages PL/pgSQL, PL/Tcl, PL/Perl and PL/Python. Each chapter includes reference documentation and examples. In particular, the use of triggers, rules and views is described in detail. The PL/pgSQL chapter also includes a guide to porting Oracle PL/SQL functions to PostgreSQL. This book is part of a series including volume 1, the "SQL Language Reference" (ISBN 0954612027), and volume 3, the "Server Administration Guide" (ISBN 0954612043). For each copy of this manual sold $1 will be donated to the PostgreSQL project by the publisher.