by Hannu Krosing for
Until now some of the extensibility of PostgreSQL was reserved for C-langauge extensions only, as no PL-language (postgreSQLs “pluggable languages") could be used to create functions with most “pseudo types” - notably cstring and internal - which are required for things like type input output function, full-text search pre-processors and some more esoteric support functions for query optimisation.
In this talk I describe the support for types ‘cstring’ and ‘internal’ I am developing for pl/python in upcoming postgreSQL v9.3 version together with some examples of what new extensibility features of postgreSQL can now be easily developed in python.
As an example a pl/python wrapper for BSON binary objects is shown allowing you to store and index BSON (that is the only native datatype in MongoDB) objects and use them together with standard SQL types and PostgreSQL extension types in your SQL queries, taking full advantage of PostgreSQLs superior query optimization features.