Extending Functions

Most acts of extension require the defining of special functions. For instance, to define a new data type, a C shared-object function describing the new data type must first be created. There are three fundamental types of custom function (also refer to Chapter 12, “Creating Custom Functions,” for a more relevant discussion of created SQL or PL functions):

  • SQL functions. These functions consist purely of standard SQL code. No external database objects must exist in order for these to be executed. They can be defined on-the-fly regardless of the configuration of the base system.

  • PL functions. These functions are written in a non-native code (for example, PL/pgTCL). For these functions to execute, an external shared-object ...

Get PostgreSQL Essential Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.