Re: regress bug

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: regress bug
Date: 2012-03-08 21:45:15
Message-ID: 4F59286B.1090406@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/08/2012 04:33 PM, David E. Wheeler wrote:
> On Mar 8, 2012, at 12:59 PM, Tom Lane wrote:
>
>> Huh? MODULE_PATHNAME is not substituted by pg_regress at all (anymore
>> anyway).
> Yeah, sorry, I meant `make`.
>
>> There's still some vestigial support for it in pgxs.mk, but
>> the future of that code is to vanish, not get improved. You should
>> not be needing it to get substituted at build time either.
> I still see this pattern a *lot*; I removed it from PL/Proxy last week. The attached tarball demonstrates it:
>
> > make
> sed 's,MODULE_PATHNAME,$libdir/sql/exttest,g' sql/exttest.sql.in>sql/exttest.sql
> make: *** No rule to make target `exttest.so', needed by `all'. Stop.
>
> So MODULE_PATHNAME is replaced with $libdir/sql/exttest rather than $libdir/exttest. Maybe that should not be fixed, but there are a *lot* of extensions out there using this approach (copied from contrib, which used it for years, albeit without the .sql.in files in a subdirectory).
>
> So perhaps DATA_built is to be removed from pgxs.mk? And if so, is the idea then that one should just put the module name in the .sql file, rather than MODULE_PATHNAME in a .sql.in file?
>

Extensions (unlike non-extension modules) should not monkey with
MODULE_PATHNAME at all.

Change the Makefile def from DATA_built to DATA and rename the file to
exttest.sql

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2012-03-08 21:49:23 Re: regress bug
Previous Message A.M. 2012-03-08 21:44:55 Re: pg_upgrade --logfile option documentation