Restore Postgres database dump
<p>Unable to restore Postgres db dump</p>

<p>I have used following commnands</p>

<pre><code> sudo psql my_database_name &lt; feb9.sql
    SET
    SET
    SET
    SET
    SET
    CREATE EXTENSION
    COMMENT
    SET
    SET
    SET
    ERROR:  relation "admin_tools_dashboard_preferences" already exists
    ALTER TABLE
    ERROR:  relation "admin_tools_dashboard_preferences_id_seq" already exists
    ALTER TABLE
    ALTER SEQUENCE
    ERROR:  relation "admin_tools_menu_bookmark" already exists
    ALTER TABLE
    ERROR:  relation "admin_tools_menu_bookmark_id_seq" already exists
    ALTER TABLE
    ALTER SEQUENCE
    ERROR:  relation "auth_group" already exists
    ALTER TABLE
    ERROR:  relation "auth_group_id_seq" already exists



ERROR:  duplicate key value violates unique constraint "product_rateclass_code_uniq"
DETAIL:  Key (code)=(0) already exists.
CONTEXT:  COPY product_rateclass, line 1: "40787    0   Tariff Rates"
 setval 
--------
  40791
(1 row)
ERROR:  relation "admin_tools_menu_bookmark_user_id" already exists
ERROR:  relation "auth_group_name_like" already exists
ERROR:  relation "auth_group_permissions_group_id" already exists
ERROR:  relation "auth_group_permissions_permission_id" already exists
ERROR:  relation "auth_permission_content_type_id" already exists
ERROR:  relation "auth_user_groups_group_id" already exists
ERROR:  relation "auth_user_groups_user_id" already exists
ERROR:  relation "auth_user_user_permissions_permission_id" already exists
ERROR:  relation "auth_user_user_permissions_user_id" already exists
ERROR:  relation "auth_user_username_like" already exists
REVOKE
REVOKE
GRANT
GRANT
</code></pre>

<p>I have received the above error logs (I have such logs running into hundreds of lines, I have used several lines for reference).</p>

<p>Post execution of the command, the database is still containing old records, instead of new records.</p>