Andrew Dunstan <andrew@dunslane.net> writes:
> Heikki Linnakangas wrote:
>> Andrew Dunstan wrote:
>>> How about a pg_dump flag that simply suppresses OIDs from the data
>>> and schema?
>>
>> pg_dump -s postgres | sed -e 's/SET default_with_oids = true;/-- &/'
> No good for non-text dumps.
Also it would fail badly if the dump had in fact been made with -o.
Currently there are two behaviors in pg_dump:
1. With -o: preserve both the existence of oid columns and their
exact contents
2. Without -o: preserve the existence of oid columns, but don't
worry about duplicating their contents (default).
It might be worth extending the switch to provide a third option
to get rid of oid columns altogether, but I'm really not convinced
that this is better than suggesting that people run ALTER SET WITHOUT
OIDS on all their tables.
regards, tom lane