I use Postgres 9.1 on Xubuntu 11.10. I've created a db 'aus' and user 'aus', granted ALL on the db to the user. Now I try to import the data, and it outputs this error:
$ osm2pgsql --create --database aus --username aus --prefix planet australia.osm -S /usr/share/osm2pgsql/default.style
osm2pgsql SVN version 0.70.5
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_point
NOTICE: table "planet_point" does not exist, skipping
NOTICE: table "planet_point_tmp" does not exist, skipping
SELECT AddGeometryColumn('planet_point', 'way', 900913, 'POINT', 2 );
failed: ERROR: permission denied for relation geometry_columns
CONTEXT: SQL statement "DELETE FROM geometry_columns WHERE
f_table_catalog = '' AND f_table_schema = 'public' AND f_table_name = 'planet_point' AND f_geometry_column = 'way'"
PL/pgSQL function "addgeometrycolumn" line 133 at EXECUTE statement
SQL statement "SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5)"
PL/pgSQL function "addgeometrycolumn" line 5 at SQL statement
What's wrong with my database?
edit: the solution:
$ sudo su -l postgres
$ psql -d aus
# grant all on database aus to aus;
# alter database aus owner to aus;
^D
^D
$ osm2pgsql ...
here we go...