Book Image

PostgreSQL 11 Server Side Programming Quick Start Guide

By : Luca Ferrari
Book Image

PostgreSQL 11 Server Side Programming Quick Start Guide

By: Luca Ferrari

Overview of this book

PostgreSQL is a rock-solid, scalable, and safe enterprise-level relational database. With a broad range of features and stability, it is ever increasing in popularity.This book shows you how to take advantage of PostgreSQL 11 features for server-side programming. Server-side programming enables strong data encapsulation and coherence. The book begins with the importance of server-side programming and explains the risks of leaving all the checks outside the database. To build your capabilities further, you will learn how to write stored procedures, both functions and the new PostgreSQL 11 procedures, and create triggers to perform encapsulation and maintain data consistency. You will also learn how to produce extensions, the easiest way to package your programs for easy and solid deployment on different PostgreSQL installations.
Table of Contents (12 chapters)

Summary

PostgreSQL provides advanced features that allow you to avoid writing a program to solve common problems when dealing with data structures and SQL statements. Thanks to the RETURNING predicate, it is possible for you to get back automatically generated data, such as an incremental key. Conflict resolution allows us to perform a kind of 'tuple merging' when dealing with INSERT and UPDATE statements against the same tuples, but one of its most powerful features is surely the Common Table Expression, which not only allows us to re-write complex queries by splitting them into more readable pieces, but also allows us to perform statement pipelining and recurse over a result set.

Knowing these features will allow you to interact with a PostgreSQL cluster efficiently and solve common problems in your day-to-day use quickly and easily.

In Chapter 3, The PL/pgSQL Language...