Menu

#4 Create db user (silently) fails; error in next sql queries

open-fixed
nobody
None
5
2012-02-02
2012-01-27
Anonymous
No

./osm2postgresql_05rc3.sh --install --file monaco.osm

Postgres installation successful, but the queries that are supposed to create the new database user somehow fails (no error, but no new user visible in pgAdmin), so the following queries throw an error because the user/role does not exist.

Excerpt from the log:
+ echo '-- BEGIN; CREATE USER osm; ALTER USER osm SUPERUSER;
ALTER USER osm WITH PASSWORD '\''osm'\'' ; -- COMMIT;
CREATE DATABASE "OSM2012-01-27_17:59:40" WITH OWNER osm TEMPLATE template_postgis;
\c OSM2012-01-27_17:59:40
\i /home/osm/Postgres841/share/postgresql/contrib/hstore.sql
'
ALTER USER osm WITH PASSWORD 'osm' ;
ERROR: role "osm" does not exist
CREATE DATABASE "OSM2012-01-27_17:59:40" WITH OWNER osm TEMPLATE template_postgis;
ERROR: role "osm" does not exist
\connect: FATAL: database "OSM2012-01-27_17:59:40" does not exist
++ f
++ errcode=2
++ echo 'Error 2. The command which triggered the error was:'
Error 2. The command which triggered the error was:
++ echo '${psql_folder}psql $pgconnect_postgres -d postgres postgres --echo-queries --echo-hidden'
${psql_folder}psql $pgconnect_postgres -d postgres postgres --echo-queries --echo-hidden
++ echo 'on line 368 of the osm2postgresql script.'
on line 368 of the osm2postgresql script.

Discussion

  • Mayeul

    Mayeul - 2012-02-02

    Thanks for reporting. Should be fixed in 0.5rc4 (otherwise please reopen).

     
  • Mayeul

    Mayeul - 2012-02-02
    • status: open --> open-fixed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.