Chapter 16. Extending PostgreSQL s Core Features


Chapter 16. Extending PostgreSQL's Core Features

PostgreSQL is one of the most flexible databases available ”for many reasons. On one hand, PostgreSQL can be used for many purposes. On the other hand, PostgreSQL can easily be extended and provides many programming interfaces, which are designed to extend the core features of PostgreSQL.

In this section, you take a closer look at extensibility. As you have already learned, PostgreSQL is one of the most flexible and most extensible database systems available.

Defining new database aggregate functions or operators is an easy task in PostgreSQL. This section is dedicated to all programmers who need additional functionalities, and to those who just want to have a good time hacking PostgreSQL code.

The key to PostgreSQL flexibility and extensibility lies in the way PostgreSQL treats operations. Information about operations is stored in a set of tables (Oracle calls it a data dictionary ), so it is an easy task to perform modifications ”as long as you know what has to be done.

The advantage of a database-driven system is that the behavior of the database can be changed by almost everyone at runtime. Therefore, prototyping is easy with the help of PostgreSQL.

Two kinds of datatypes are supported by PostgreSQL:

  • Base datatypes . Base datatypes, such as int4 , are the fundamental datatypes in PostgreSQL and are those that are also implemented in programming languages such as C.

  • Composite datatypes. Composite datatypes are built on other datatypes, and therefore additional functions have to be available to tell the database how a datatype has to be used.

Not only datatypes can be added to PostgreSQL. In the next section, you see how other components can be defined.



PostgreSQL Developer's Handbook2001
PostgreSQL Developer's Handbook2001
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 125

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