I enrolled into a web-host plan so I could have my rails apps published. They provided me with a server and access to it. This is a shared CentOS Linux server and I can access its bash.
I was trying to load my database schema into the postgres database (v8.4) they are offering but it gives me an error when doing so. When I execute:
RAILS_ENV=production rake db:schema:load
The following error is generated:
-- enable_extension("plpgsql")
rake aborted!
ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: syntax error at or near "EXTENSION"
LINE 1: CREATE EXTENSION IF NOT EXISTS "plpgsql"
^
: CREATE EXTENSION IF NOT EXISTS "plpgsql"
/home/user/path-to-app/db/schema.rb:17:in `block in <top (required)>'
/home/user/path-to-app/db/schema.rb:14:in `<top (required)>'
PG::SyntaxError: ERROR: syntax error at or near "EXTENSION"
LINE 1: CREATE EXTENSION IF NOT EXISTS "plpgsql"
^
/home/user/path-to-app/db/schema.rb:17:in `block in <top (required)>'
/home/user/path-to-app/db/schema.rb:14:in `<top (required)>'
Tasks: TOP => db:schema:load
(See full trace by running task with --trace)
Because the web-host provider does not allow many db privileges, and due to my unfamiliarity with PostgreSQL, I would prefer a solution changing something on the rails side...
Is there something I can do on the rails side to work around (or hopefully address) this issue?
If nothing can be really done from the rails side I would have to be specific with the privileges necessary.
This PostgreSQL EXTENSION object seems to demand privileges my db user does not have...
What would be the minimum privileges for the rails database user running the db migration in PostgeSQL?
Update
This is about PostgreSQL 8.4, witch according to the comments here do not have the "CREATE EXTENSION" command.