Re: Why does pg_dump set default_with_oids to true? - Mailing list pgsql-general

From Tom Lane
Subject Re: Why does pg_dump set default_with_oids to true?
Date
Msg-id 15045.1256587916@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why does pg_dump set default_with_oids to true?  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Why does pg_dump set default_with_oids to true?
List pgsql-general
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Kynn Jones escribi�:
>> The documentation deprecates setting this variable to true.  Why does
>> pg_dump do it?

> To dump tables that were created WITH OIDS.

What is deprecated is the use of the WITH OIDS feature, not the variable
;-).  But it is not pg_dump's charter to enforce that deprecation.

Maybe what you are asking is why it uses SET default_with_oids rather
than attaching WITH OIDS to the CREATE TABLE commands.  That was done
as a compatibility measure so that the dump files would still be
readable by PG versions that didn't understand WITH OIDS --- they'd
reject the SET commands but still accept the CREATE TABLE commands.
By the same token the files are a shade more portable to other DBMSes
than they would be with WITH OIDS clauses.  Neither of these arguments
is hugely compelling, perhaps, but avoiding the use of a variable isn't
very compelling either ...

            regards, tom lane

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Logging statements with errors in PostgreSQL 8.1
Next
From: Dave Page
Date:
Subject: Re: [ANNOUNCE] [pgeu-general] PGDay.EU 2009 - approaching fast!