Wrowser and Postgresql 9.4

Asked by Omai bigee

Hello,

I've installed the Wroser, however I am encountering several problems while running the scripts needed to create the simdb database and to create the user for the database.
Any suggestions on how to adapt the scripts for Postgresql 9.4 ?
The errors are pasted here below.

Thanks in advance for the help.
Kind regards.

-----------------------------------

$ psql -U postgres -d simdb -f setupSimDB.sql
Password for user postgres:
psql:setupSimDB.sql:1: ERROR: language "plpgsql" already exists
..
psql:setupSimDB.sql:178: ERROR: syntax error at or near "."
LINE 11: ...ELECT pg_total_relation_size(\'' || user_name || '.scenarios...
                                                              ^
psql:setupSimDB.sql:180: ERROR: function administration.calculate_campaign_size(integer) does not exist
..
psql:setupSimDB.sql:1864: ERROR: syntax error at or near "\"
LINE 95: type_string text DEFAULT \'\'
                                       ^
CREATE FUNCTION
ALTER FUNCTION
psql:setupSimDB.sql:1931: ERROR: trigger "users_trigger" for relation "users" already exists

----------------------------------------------------

$ ./createUser.py
Local installation of wrowser found.

Please enter the password of the 'postgres' super user:
Traceback (most recent call last):
  File "./createUser.py", line 75, in <module>
    curs.execute('INSERT INTO administration.users (user_name, full_name, password, group_account) VALUES (\'%s\', \'%s\', \'%s\', \'%s\')' % (userName, pwd.getpwnam(userName)[4],
psycopg2.ProgrammingError: function administration.create_user(integer, text, text, text) does not exist
LINE 1: SELECT administration.create_user(NEW.id, NEW.user_name, NEW...
               ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT administration.create_user(NEW.id, NEW.user_name, NEW.full_name, NEW.password)
CONTEXT: PL/pgSQL function users() line 16 at PERFORM

fmiatton@debian:~/workspace/wrowser/openwns/wrowser/simdb/scripts$ vi createUser.py
fmiatton@debian:~/workspace/wrowser/openwns/wrowser/simdb/scripts$ ./createUser.py
Local installation of wrowser found.
Prepending /home/fmiatton/workspace/wrowser to sys.path
Please enter the password of the 'postgres' super user:
Traceback (most recent call last):
  File "./createUser.py", line 75, in <module>
    curs.execute('INSERT INTO administration.users (user_name, full_name, password, group_account) VALUES (\'%s\', \'%s\', \'%s\', \'%s\')' % (userName, pwd.getpwnam(userName)[4],
psycopg2.ProgrammingError: function administration.create_user(integer, text, text, text) does not exist
LINE 1: SELECT administration.create_user(NEW.id, NEW.user_name, NEW...
               ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT administration.create_user(NEW.id, NEW.user_name, NEW.full_name, NEW.password)
CONTEXT: PL/pgSQL function users() line 16 at PERFORM

Question information

Language:
English Edit question
Status:
Solved
For:
openWNS Wrowser Edit question
Assignee:
No assignee Edit question
Solved by:
Omai bigee
Solved:
Last query:
Last reply:
Revision history for this message
Omai bigee (o-maib-g) said :
#1