Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D39D9B5DBDA for ; Wed, 12 Oct 2011 10:13:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 94109-09 for ; Wed, 12 Oct 2011 13:13:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.122]) by mail.postgresql.org (Postfix) with ESMTP id 5C530B5DBD0 for ; Wed, 12 Oct 2011 10:13:21 -0300 (ADT) X-Authority-Analysis: v=2.0 cv=O6u7TWBW c=1 sm=0 a=CKNHKMF03bXAQcv19zyZwQ==:17 a=FR8lIomz6REA:10 a=KREk6HCtZjIA:10 a=Acs96HtBqXsA:10 a=8nJEP1OIZ-IA:10 a=danhDmx_AAAA:8 a=uN2Ou8D6jjyymFmjZg0A:9 a=P1T8rRBllgUigt0j3icA:7 a=wPNLvfGTeEIA:10 a=CKNHKMF03bXAQcv19zyZwQ==:117 X-Cloudmark-Score: 0 X-Originating-IP: 98.27.54.176 Received: from [98.27.54.176] ([98.27.54.176:44842] helo=[192.168.10.146]) by cdptpa-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 84/9E-06600-072959E4; Wed, 12 Oct 2011 13:13:21 +0000 Message-ID: <4E959270.3040803@dunslane.net> Date: Wed, 12 Oct 2011 09:13:20 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: Heikki Linnakangas CC: Stefan Kaltenbrunner , PostgreSQL Subject: Re: [BUGS] *.sql contrib files contain unresolvable MODULE_PATHNAME References: <20111012075314.GA25470@piware.de> <4E954895.6040701@kaltenbrunner.cc> <4E95523E.1010608@enterprisedb.com> In-Reply-To: <4E95523E.1010608@enterprisedb.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201110/700 X-Sequence-Number: 196506 On 10/12/2011 04:39 AM, Heikki Linnakangas wrote: > On 12.10.2011 10:58, Stefan Kaltenbrunner wrote: >> On 10/12/2011 09:53 AM, Martin Pitt wrote: >>> Hello all, >>> >>> In https://launchpad.net/bugs/835502 it was reported that the 9.1.1 >>> contrib *.sql files contain the token "MODULE_PATHNAME", which is >>> unknown: >>> >>> psql test< /usr/share/postgresql/9.1/extension/intarray--1.0.sql >>> >>> This fails with a ton of errors about the file "MODULE_PATHNAME" not >>> existing. >>> >>> When I replace this with "$libdir/_int", it works: >>> >>> sed 's!MODULE_PATHNAME!$libdir/_int!g' >>> /usr/share/postgresql/9.1/extension/intarray--1.0.sql | psql test >>> >>> Is that something I'm doing wrong in the packaging, or should the >>> contrib Makefiles be fixed to do this substitution? >>> >>> It doesn't only affect intarray, but pretty much all *.sql files. >> >> uh - the reason is that contrib is now packaged as extensions and that >> you are supposed to use "CREATE EXTENSION intarray;" on the SQL level >> instead of manually loading sql-scripts through psql. > > 9.1 has been out for only a couple of months, and we've seen a lot of > people trying to do that already. In hindsight, we probably should've > chosen a different filename extension for those files, to make it > clear that you can't just run them in psql. It's too late for that, > but a comment at the top of the .sql files would be good: > > I've made this mistake myself in an unthinking moment. I suggest that we deprecate calling them something.sql and add code ASAP providing for some other suffix ( .xtn ?) with legacy support for falling back to .sql. I'd almost be inclined to backpatch it while there are so few third party extensions out there. cheers andrew