Benefits of Procedural Languages

I l @ ve RuBoard

This chapter specifically focuses on using the procedural languages (PL) available in PostgreSQL. Regardless of the specific PL chosen , they all share a common set of advantages to the developer. Those advantages include the following:

  • Extensibility. Utilizing the internal PLs enables developers to quickly create custom functions, triggers, and rules to add functionality not already present in the base system. Moreover, once these extensions are enabled, they become available to other SQL statements present in the system.

  • Control structures. By default, the SQL language does not allow the programmer to use the rich set of control structures and conditional evaluations included in other common programming languages. For this reason, the included PLs allow a developer to marry such traditional control structures with the SQL language. This is particularly useful when creating complex computations and triggers.

  • Productivity and compatibility. By using the included PostgreSQL PLs, the developer can have access to all the included data types, operators, and functions already present in the base system. This can significantly increase productivity because the programmer does not need to re-create common elements already defined in PostgreSQL in his or her own custom code. Additionally, the developer can have a high level of assurance that the returned data types and comparison results will be compatible with the PostgreSQL back end.

  • Security. The included PostgreSQL PLs are trusted by the back-end system and only have access to a limited set of system-wide functions. In particular, the included PLs operate , on a system level, with the same permissions granted to the base postgres user . This is because it implies that extraneous file system objects will be safe from any errant code.

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