Re: Should contrib modules install .h files?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should contrib modules install .h files?
Date: 2018-07-03 06:04:23
Message-ID: CAFj8pRBbsQ2Lbiwkk3qW1HRxfGLpK11iP5HcRa+MRmN1C3gGpw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2018-07-03 6:43 GMT+02:00 Craig Ringer <craig(at)2ndquadrant(dot)com>:

> On 2 July 2018 at 02:23, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
> wrote:
>
>> So I have this immediate problem: a PGXS build of a module, specifically
>> an hstore transform for a non-core PL, is much harder than it should be
>> because it has no way to get at hstore.h since that file is never
>> installed anywhere.
>>
>> Should that be changed?
>>
>>
> I think there's agreement in the thread that it should, and strong +1 from
> me.
>

+1

similar issue is with plpgsql. The header files are exported by not generic
way.

Regards

Pavel

> I just wanted to pipe up with something Petr pointed out during pglogical
> development, which is that Pg offers a handy tool to help extensions link
> up with each other - find_rendezvous_variable(...) from dfmgr.c / fmgr.h
> .
>
> It's a real shame it's not more visible in contrib/ examples and the docs.
> Any suggestions on where it should appear in the docs? Somewhere in
> extend.sgml, presumably.
>
> You still need a header from the other extension to *use* it, but it
> provides a massively easier way to find a struct of API function pointers.
> Prior to using it, I had a hack where I dlopen()ed the other shared library
> directly, and I'd also trialled using the fmgr to call a 'returns internal'
> function to get the API pointers struct that way.
>
> --
> Craig Ringer http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-07-03 06:11:19 Re: pgsql: Clarify use of temporary tables within partition trees
Previous Message David Rowley 2018-07-03 06:00:46 Re: pgsql: Clarify use of temporary tables within partition trees