[GENERAL] pg_dump without oids

2007-01-17 Thread Stéphane Schildknecht
Hi all,

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.

I'm dumping from 7.4.5 to 8.2.1.
I do have
#default_with_oids = off
in postgresql.conf for 8.2.

Is there a way to prevent creating table with oids ?

A table created by psql client is created without OID.

Thanks by advance

Stéphane Schildknecht


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] pg_dump without oids

2007-01-17 Thread Tom Lane
=?ISO-8859-1?Q?St=E9phane_Schildknecht?= [EMAIL PROTECTED] 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

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org/