I have been trying to import a postgres dump (with psql dbname < dump.sql
and its variants, specifying hostname and username and so on), but I have been unsuccessful with it so far.
I am new to Postgres, so I may have been missing the obvious here. Based on the output of importing commands, the extension plpgsql probably doesn't exist. Am I expected to set up the plpgsql extension before I import?
Here are the first few lines of the output:
SET
ERROR: unrecognized configuration parameter "lock_timeout"
SET
SET
SET
SET
CREATE EXTENSION
ERROR: must be owner of extension plpgsql
ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/hstore.control": No such file or directory
ERROR: extension "hstore" does not exist
SET
SET
SET
ERROR: relation "active_admin_comments" already exists
ERROR: role "finalstep" does not exist
ERROR: relation "active_admin_comments_id_seq" already exists
ERROR: role "finalstep" does not exist
ALTER SEQUENCE
ERROR: relation "admin_users" already exists
ERROR: role "finalstep" does not exist
Later down the road, it looks like it's trying to execute some of the content as sql queries (the content contains mathml tags):
ERROR: syntax error at or near "</"
LINE 1: </mo> <msqrt>
^
ERROR: syntax error at or near "&"
LINE 1:
^
ERROR: syntax error at or near "</"
LINE 1: </mi> <mi>α
Any pointers? My Postgres version is 9.1 (it was 9.3 initially, but I downgraded it to 9.1 after seeing the error messages).