O'Reilly logo

PostgreSQL Server Programming by Jim Mlodgenski, Kirk Roybal, Hannu Krosing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unpackaged extensions

Starting with Version 9.1, PostgreSQL provides a convenient way to move from the primordial ooze of unversioned contrib modules into the brave new world of extensions. Basically, you provide an SQL file to show the relationship of the objects to the extension. The contrib module's cube provides a good example of this in cube--unpackaged--1.0.sql:

/* contrib/cube/cube--unpackaged--1.0.sql */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION cube" to load this file. \quit ALTER EXTENSION cube ADD type cube; ALTER EXTENSION cube ADD function cube_in(cstring); ALTER EXTENSION cube ADD function cube(double precision[],double precision[]); ALTER EXTENSION cube ADD function cube(double ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required