Re: How do I include PostGIS geofunctions to a new database after I have already installed PostGIS.

From: Paul Ramsey <pramsey(at)cleverelephant(dot)ca>
To: John Mitchell <mitchelljj98(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How do I include PostGIS geofunctions to a new database after I have already installed PostGIS.
Date: 2009-11-06 21:29:27
Message-ID: 30fe546d0911061329t5aeab1d2xbff8b2ef5d9568a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The simplest trick is to install PostGIS in a blank database and then
use that database as a template hence forth. But how to install
PostGIS at all?

Track down the postgis SQL file (either postgis-1.4.sql or
lwpostgis.sql depending on your version).

createlang plpgsql yourdatabase
psql -f lwpostgis.sql -d yourdatabase
psql -f spatial_ref_sys.sql -d yourdatabase

On Fri, Nov 6, 2009 at 1:22 PM, John Mitchell <mitchelljj98(at)gmail(dot)com> wrote:
> Hi,
>
> I have PostgreSQL 8.4 and I have a database which was created when PostGIS
> was installed which has the geofunctions within it.
>
> When I try to create a new database it does not include these geofunctions.
>
> How do I include PostGIS geofunctions to a new database after I have already
> installed PostGIS.
>
> Thanks,
>
> John
>
> --
> John J. Mitchell
>

Browse pgsql-general by date

  From Date Subject
Next Message stanciutheone@gmail.com 2009-11-07 00:38:49 alter table is taking a long time
Previous Message Greg Smith 2009-11-06 21:17:32 Re: warm standby resume and take online problems