On 06/14/2013 11:11 AM, Peter Eisentraut wrote: > A transform is an SQL object that supplies to functions for converting > between data types and procedural languages. For example, a transform > could arrange that hstore is converted to an appropriate hash or > dictionary object in PL/Perl or PL/Python. > > Externally visible changes: > > - new SQL commands CREATE TRANSFORM and DROP TRANSFORM > > - system catalog pg_transform > > - transform support in PL/Perl and PL/Python > > - PL/Perl and PL/Python install their header files for use by external > types I wonder if that should be extended to install headers for hstore, ltree, and while we're at it, intarray as well?
You handle getting access to the headers by using include path flags: PG_CPPFLAGS = -I$(top_srcdir)/src/pl/plpython $(python_includespec) -I$(top_srcdir)/contrib/hstore which is fine for in-tree builds but AFAIK means that pgxs cannot build these extensions. If the extension modules installed their headers that problem would go away; you'd just #include "contrib/hstore/hstore.h" Many modules already have useful non-static functions that work with raw types and aren't callable via the fmgr, as well as the macros and typdefs that make working with them easier. intarray in particular would be extremely useful to use from other extensions, but in the past I've landed up copying it and then adding the extra functions I needed because I couldn't access its header in a PGXS build. Peter's already answered my main worry on this, which is whether any platform would prevent us from doing the required runtime symbol lookup from shared libs loaded at the same level. I knew RTLD_GLOBAL allowed it for dlopen(...), but wasn't sure about other platforms. Thoughts? Should contrib modules be able to install headers and use each others' symbols? I've seen interest in this in the wild from people who want to use hstore in their own extensions and I've had uses for it myself with intarray. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers