[OSM-dev] troubles importing osm data via osm2pgsql: skipping table creation, no function match, permission issue?
Christopher Stevens
owntheweb at gmail.com
Sat Aug 7 15:29:51 BST 2010
OS: Mac OSX 10.6
Terminal output:
====================
$ time /usr/local/bin/osm2pgsql --slim -d gis
/users/chris/Desktop/coloradoOSM/colorado.osm.highway
osm2pgsql SVN version 0.69-exported
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE: table "planet_osm_point" does not exist, skipping
NOTICE: table "planet_osm_point_tmp" does not exist, skipping
SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, 'POINT', 2 );
failed: ERROR: function addgeometrycolumn(unknown, unknown, integer,
unknown, integer) does not exist
LINE 1: SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, ...
^
HINT: No function matches the given name and argument types. You
might need to add explicit type casts.
Error occurred, cleaning up
real 0m0.190s
user 0m0.004s
sys 0m0.007s
====================
Initial research suggested that my mac user didn't have proper
privileges. I ran this when setting up my user:
$ psql #reeived an error as I didn't specify a database (FATAL:
database "chris" does not exist), no biggie I think
$ createuser --superuser chris -U postgres
Then created the database:
$ createdb gis
Here's the list of databases and who owns them:
====================
$ psql -l
List of databases
Name | Owner | Encoding
-----------+----------+----------
gis | chris | UTF8
gisdata | chris | UTF8
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8
(5 rows)
====================
I even tried importing data after the following:
sudo su - postgres
No luck. Maybe it's not a permission issue, or I'm missing a step? Let
me know what you think. I appreciate the feedback.
Chris
More information about the dev
mailing list