[postgis-devel] Re: PostGIS datastore creation

Greg Troxel gdt at ir.bbn.com
Fri Sep 22 05:13:01 PDT 2006


  The issue then, is that the actual template database creation script
  (postgis-setup) has be be "made" during the postgis compilation
  process, for whatever platform you are compiling it for.

Yes, that's what I meant.

  In addition, the postgis installer (package manager script, or
  windows installer) would need to run the postgis setup script,
  probably with a parameter specifying the location of the postgis.sql
  script (and also port, username and password).

There's no need to give the location of postgis.sql because that's
installed as well and thus postgis-setup.in can @subst@ it to it will
be right.

In pkgsrc, I'd leave the setup to be done by the system admin;
often packages get installed but not started.  But that's easy for
package systems to choose and make optional.

  [from a different msg]
  Actually, if you have the right postgis.sql, all you need is psql to
  install it. There is our installer! Just change postgis.sql to create
  and switch to "template_postgis", and perhaps rename it to
  "install_postgis_template.sql". Then we don't have to worry about
  platforms, etc., as we can safely assume that psql is already
  available to us.
 
That's true, but part of the point of an install script is to reduce
the amount of understanding that someone needs.  Even a script that
just does

psql -f @prefix@/share/postgresql/contrib/postgis.sql

is useful, and even more so if checks for being the db user or root
and su's.  (On NetBSD/pkgsrc, there's pgsql uid which is a db
superuser in a clean install; I'm guessing other systems are like
that.)

    Greg Troxel <gdt at ir.bbn.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20060922/30ee4c84/attachment.sig>


More information about the postgis-devel mailing list