Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS
Date
Msg-id 16263.1234197143@sss.pgh.pa.us
Whole thread Raw
In response to Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS
Next
From: Robert Haas
Date:
Subject: Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS