anthonyknape (1) [Avatar] Offline
#1
I am in that early stage of trying to figure out the directory structure.
Mac Binaries successfully loaded from KyngChaos.
Not sure what to do next.
This is a copy of my attempt.

bash4-4.0$ ./createuser
Enter name of role to add: postgres
Shall the new role be a superuser? (y/n) y
bash4-4.0$ ./psql -d postgres -U postgres
psql (9.0.4)
Type "help" for help.

postgres=# CREATE DATABASE template_postgis WITH TEMPLATE = template1 ENCODING = 'UTF8';
ERROR: database "template_postgis" already exists
postgres=# c template_postgis;
You are now connected to database "template_postgis".
template_postgis=# i /usr/share/psql/contrib/postgis-1.5/postgis.sql;
/usr/share/psql/contrib/postgis-1.5/postgis.sql: No such file or directory
template_postgis=# i /usr/share/pgsql/contrib/postgis-1.5/spatial_ref_sys.sql;
/usr/share/pgsql/contrib/postgis-1.5/spatial_ref_sys.sql: No such file or directory
template_postgis=# i /usr/share/pgsql/contrib/postgis-1.5/postgis_comments.sql;
/usr/share/pgsql/contrib/postgis-1.5/postgis_comments.sql: No such file or directory
template_postgis=# UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
UPDATE 1
template_postgis=# GRANT ALL ON geometry_columns TO PUBLIC;
ERROR: relation "geometry_columns" does not exist
template_postgis=# GRANT ALL ON spatial_ref_sys TO PUBLIC;
ERROR: relation "spatial_ref_sys" does not exist
template_postgis=# q
regina.leo (265) [Avatar] Offline
#2
Re: Lost between page 424 and finding POSTGIS
Anthony,

I don't have a Mac to test with and not sure where the default paths are for KyngChaos. They are often different for each OS platform including Linux. Each distro puts it somewhere else.

The best place to get help on this is thru the PostGIS users group.
http://www.postgis.org/mailman/listinfo/postgis-users

The Kyng hangs out there a lot and does answer several Mac questions of users. In addition there are other mac users on the list that will be more than happy to help you out.


From below, it looks like you already have a template_postgis, so your command should be more like

CREATE DATABASE mygisdb WITH TEMPLATE = template_postgis ENCODING = 'UTF8';

Hope that helps,
Regina
http://www.postgis.us