From: | Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> |
---|---|
To: | Stefan Schwarzer <stefan(dot)schwarzer(at)unep(dot)org> |
Cc: | Tomas Vondra <tv(at)fuzzy(dot)cz>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to include Tablefunc as an extension |
Date: | 2012-06-19 07:32:59 |
Message-ID: | CAP7QgmkGUWUtwMrS4=oZ49C5pbXYeGXCkA_mR7xuOsmkgL872g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Jun 18, 2012 at 11:34 PM, Stefan Schwarzer
<stefan(dot)schwarzer(at)unep(dot)org> wrote:
>
>>> I read through the Postgres doc and many Google results, but it seems
>>> still unclear to me how to include additional packages into my postgres
>>> database. I see that there are a few installed under
>>> "/usr/local/pgsql-9.1/share/extension/" (I am on Lion and installed the
>>> Kyngchaos libs). But as I want to install crosstab now, I downloaded the
>>> source code for postgres, run a make/install - and now wonder what to do
>>> with it. I could eventually load the .sql file as usual; but it seems this
>>> should be now avoided, and loaded as an extension. I tried to copy three
>>> files (--1.0.sql, --unpackaged.sql and the normal .sql) to the folder and
>>> then load it from PgAdmin, but this results in an error message ("could
>>> not access file "$libdir/tablefunc"").
>>
>> This should do the trick:
>>
>> CREATE EXTENSION crosstab;
>
> Thanks a lot. Yes, that's the command I used when it launches the above error message. The question is more about: "where do I need to place the tablefunc files (and which ones) in order to execute successfully that command"?
make install should copy files including $libdir/tablefunc. If not,
you should take a look at the output of the make command. Make sure
your PATH points to pg_config that your database is running with.
Thanks,
--
Hitoshi Harada
From | Date | Subject | |
---|---|---|---|
Next Message | pandorino | 2012-06-19 07:58:29 | pgstat wait timeout : permission denied |
Previous Message | Peter Bex | 2012-06-19 07:24:28 | Re: Feature discussion: Should syntax errors abort a transaction? |