I am very new to PostgreSQL so I apologize if the question is elementary.
During PostgreSQL database restore, from sql file, I am getting an error "invalid input syntax for type bytea" and I believe the data is not copied to the table, i.e. the table is empty.
This is the error message:
2015-02-20 08:56:14 EST ERROR: invalid input syntax for type bytea
2015-02-20 08:56:14 EST CONTEXT: COPY ir_ui_menu, line 166, column web_icon_data: "\x6956424f5277304b47676f414141414e5355684555674141414751414141426b43414d41414142485047566d4141414143..."
2015-02-20 08:56:14 EST STATEMENT: COPY ir_ui_menu (id, parent_id, name, icon, create_uid, create_date, write_date, write_uid, web_icon_data, web_icon, sequence, web_icon_hover, web_icon_hover_data) FROM stdin;
The database backup dump is created like this:
pg_dump -U user_name database_name -f backup_file.sql
The database restore is done like this:
psql -U user_name -d destination_db -f backup_file.sql
Source database (to get backup from) is PostgreSQL version 9.1.15 on one server and destination (to restore to) database is PostgreSQL 8.3.4, on another server.
Is there any way to resolve this issue? Thanks in advance for your help.