On 18 December 2019 19:28:07 EET, "gmail Vladimir Koković" 
<vladimir.koko...@gmail.com> wrote:
>Is there somewhere a script that can do a restore backup file "with 
>oids" in some newer DB where there is no term "with oids"?

There is nothing automatic, some manual work is needed. A couple of ideas:

1. Install an older version of PostgreSQL that still supports WITH OIDS, and 
restore the dump there. Use ALTER TABLE SET WITHOUT OIDS, and dump the database 
again (preferably with v12 of pg_dump).

2. Create the table manually, but with a regular oid-type column in place of 
the system column. Do a data-only restore. 

You didn't mention what format the backup dump is. If it's in custom format, 
you can do a data-only restore easily. If it's a text sql file, and it's not 
too large, you can load it in a text exitor and edit manually.

- Heikki


Reply via email to