Re: pg_dump without oids

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stéphane Schildknecht <stephane(dot)schildknecht(at)postgresqlfr(dot)org>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dump without oids
Date: 2007-01-17 20:20:12
Message-ID: 4855.1169065212@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?ISO-8859-1?Q?St=E9phane_Schildknecht?= <stephane(dot)schildknecht(at)postgresqlfr(dot)org> writes:
> pg_dump and pg_dumpall have the -o option that should tell them to
> include oids in dump. I didn't chose this option, and the dump doesn't
> include "WITH OIDS", but the tables are created with oids when restoring
> this dump.

You misunderstand what that option is for: it's for trying to preserve
the exact OID values present in your old installation. It's not about
adding or removing OID columns.

> Is there a way to prevent creating table with oids ?

No, and I don't think it'd be within pg_dump's charter to editorialize
on table definitions like that. Instead see ALTER TABLE SET WITHOUT OIDS.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vivek Khera 2007-01-17 20:51:52 Re: Index bloat of 4x
Previous Message Sterpu Victor 2007-01-17 20:13:36 FATAL: invalid frontend message type 47 server closed the connection unexpectedly