Re: Extensions vs PGXS' MODULE_PATHNAME handling

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Extensions vs PGXS' MODULE_PATHNAME handling
Date: 2011-02-13 16:28:21
Message-ID: 17109.1297614501@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> But contrib/spi is exactly the case where it *won't* work. We need to
>> somehow figure out that $libdir/autoinc is what to substitute in
>> autoinc-1.0.sql, $libdir/insert_username in insert_username-1.0.sql,
>> etc.

> Indeed. That's why I'm proposing to have that setup in the control
> file, which is per extension, rather than in the common Makefile.

How's that help? In a makefile building more than one extension,
you'd still need a way to decide which extension the current script
file is associated with.

Or are you suggesting substituting for MODULE_PATHNAME during CREATE
EXTENSION, and not during "make" at all? That would work I guess.
I'm hesitant to have any substitutions that happen unconditionally,
but we could add a control parameter like
module_pathname = '$libdir/hstore'
and then things would be pretty clean.

I think we should still change the file naming conventions to use double
dashes, though, since there's more than one reason to want that. Will
work on that next.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2011-02-13 16:42:50 Re: Debian readline/libedit breakage
Previous Message Stephen Frost 2011-02-13 13:26:31 Re: Add support for logging the current role