February 25th, 2013, 11:13 AM
Restore pg_dump errors
I am getting the following errors while trying to restore a dump -
ERROR: function echo_update_to_ser() does not exist
ERROR: function echo_insert_to_ser() does not exist
The strange part is that I see the function being created prior to the trigger calling the function -
CREATE FUNCTION echo_insert_to_ser() RETURNS "trigger"
CREATE TRIGGER echo_insert_bank_to_ser
AFTER INSERT ON tb_bank
FOR EACH ROW
EXECUTE PROCEDURE echo_insert_to_ser();
The pg_dump was taken from pgsql version 8.1, OS - Linux. And I attempted to restore on pgsql version 8.4, OS - Linux.
Any help would be appreciated. I am quite the beginner when it comes to postgres.
March 18th, 2013, 03:12 PM
if you did a dump with --clean or -c it trys to drop the obejects or functions prior to creation. if it is not there you will get the error and then the object will get created.