Building and Distributing PostgreSQL Extensions Without Learning C

Talk Type: 
45 Minute Talk
Technical Level: 
Creative Commons - No Commercial

PostgreSQL is extensible like a dynamic programming language. Support for custom functions, operators, types, domains, and other database objects is built right into SQL. Maybe you've done a bit of experimenting with these features and want to do more. Perhaps you'd even like to distribute extensions so that others can take advantage of your efforts.

If so, then this talk is for you. We'll take you through the process of creating a pure-SQL extension and distributing it on PGXN, the "CPAN for PostgreSQL extensions." Here's how:

  • Create an extension in pure SQL. No C. No Java. No PL/Perl. Well, okay, PL/pgSQL might be involved, but you get the idea.
  • Unit test the extension. Also in pure SQL. With pgTAP.
  • Use the PostgreSQL extension-building toolchain to configure and install the extension. And run the unit tests.
  • Create the metadata for PGXN.
  • Package up the distribution and upload it to PGXN.
  • Watch it appear on the PGXN mirrors and in the PGXN index.
  • Brag.

We'll also cover the details of PGXN and why you'd want to distribute your extensions there.

Come help us expand the universe of quality PostgreSQL extensions!