Re: *.sql contrib files contain unresolvable MODULE_PATHNAME

From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: *.sql contrib files contain unresolvable MODULE_PATHNAME
Date: 2011-10-12 07:58:13
Message-ID: 4E954895.6040701@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

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.

Stefan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2011-10-12 08:39:26 Re: [BUGS] *.sql contrib files contain unresolvable MODULE_PATHNAME
Previous Message Martin Pitt 2011-10-12 07:53:14 *.sql contrib files contain unresolvable MODULE_PATHNAME

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-10-12 08:26:14 Re: Overhead cost of Serializable Snapshot Isolation
Previous Message Fujii Masao 2011-10-12 07:53:52 Re: Online base backup from the hot-standby