Chapter 11. Server-Side Programming

I l @ ve RuBoard

In general, there are two ways to program in PostgreSQL: using one of the internally declared procedural languages (PLs) or using one of the externally available application programming interfaces (APIs). The most basic difference between the two approaches is that procedural languages act as a server-side option, and APIs are used for client-side access.

Server-side programming is code that is actually written, contained, and executed inside the PostgreSQL back-end system. Typically, this code is meant to extend the functionality of the base system and to enable other queries or SQL statements to have access to these customizations.

Client-side programming is used to enable applications that reside outside of the PostgreSQL back end to insert, manipulate, or retrieve data that resides within the PostgreSQL database engine.

The choice of language and approach depends heavily on several factors. Procedural language programming is less complex and therefore enables a faster development cycle. Procedural language programming is the preferred method for performing common extensions to the base PostgreSQL system, and as such, it assists in maximizing code reuse.

Utilizing the external APIs is appropriate when fine-grained control and/or speed of execution is required. Moreover, utilizing the externally available APIs might be the only way to interface custom applications with the back-end system in specific cases.

I l @ ve RuBoard


PostgreSQL Essential Reference
PostgreSQL Essential Reference
ISBN: 0735711216
EAN: 2147483647
Year: 2001
Pages: 118
Authors: Barry Stinson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net